Commit Graph

3997 Commits

Author SHA1 Message Date
Sivakumar Subramani fb6a825b09 S2IO: Fixes for MSI and MSIX
- Added debug statements to print a debug message if the MSI/MSI-X vector (or)
  data is zero.

- This patch removes the code that will enable NAPI for the case of single
  ring and MSI-X / MSI case. There are some issue in the enabling NAPI with
  MSI/MSI-X.  So we are turning off NAPI in the case of MSI/MSI-X.

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:27:11 -05:00
Benjamin Li ed227dcc2d qla3xxx: Bumping driver version number
Signed-off-by: Benjamin Li <benjamin.li@qlogic.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:21:45 -05:00
Benjamin Li e8f4df2491 qla3xxx: Kernic Panic on pSeries under stress conditions
To reproduce this panic consistently, we run an intensive network
application like 'netperf'. After waiting for a couple of seconds,
you will see a stack trace and a kernel panic where we are calling
pci_unmap_single() in ql_poll().

Changes:
1)  Check the flags on the Response MAC IO Control block to check for
errors
2)  Ensure that if we are on the 4022 we only use one segment
3)  Before, we were reading the memory mapped producer index register
everytime we iterated in the loop when clearing the queue.  We should
only be iterating to a known point, not as the producer index
is being updated.

Signed-off-by: Benjamin Li <benjamin.li@qlogic.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:21:45 -05:00
Ron Mercer 63b66d12de qla3xxx: bugfix tx reset after stress conditions.
To Reproduce the Problem:
To reproduce this panic consistently, we run an intensive network
application like 'netperf' and then switch to a different console.
After waiting for a couple of seconds, you will see a tx reset has occured.

Reason:
We enable interrupts even if we were not running.

Solution:
Now we will enable interrupts only after we are ready to give up the poll
routine.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:21:44 -05:00
Benjamin Li 0f8ab89e82 qla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list(), ql_populate_free_queue(), ql_alloc_large_buffers(), and ql3xxx_send()
pci_map_single() could fail.  We need to properly check the return
code from pci_map_single().  If we can not properly map this address,
then we should cleanup and return the proper return code.

Signed-off-by: Benjamin Li <benjamin.li@qlogic.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:21:44 -05:00
Ron Mercer 3e71f6dd47 qla3xxx: bugfix: Fixed jumbo frame handling for 3032 chip.
The scatter/gather lists were not being build correctly.  When
large frames spanned several buffers the chip would panic.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:21:44 -05:00
Ron Mercer 97916330e1 qla3xxx: Clean up receive process.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:21:44 -05:00
Ron Mercer 1357bfcf71 qla3xxx: Dynamically size the rx buffer queue based on the MTU.
This change removes use of constants for rx buffer queue size
and instead calculates the queue length based on what he MTU
is set to.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:21:44 -05:00
Ron Mercer cb8bac12ec qla3xxx: Remove API to change MTU.
This network device driver shares the same hardware as the qla4xxx
iSCSI driver. Changing the MTU via the device interface will
cause qla4xxx to crash as there is no way to make notification.
Users wishing to change the MTU must do so using an iSCSI
utility such as Qlogic SanSurfer. This forces the user to
unload/reload this network device driver after the MTU
value has been changed in flash.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:21:44 -05:00
Benjamin Li 04f1077353 qla3xxx: Fix deadlock issue on error paths
1) Fix deadlock issue when in QL_RESET_ACTIVE state and traversing
   through the Link State Machine
2) Fix deadlock issue when ethtool would call ql_get_settings()
3) Fix deadlock issue when adaptor is ifup'ed but adaptor fails to initialize

Signed-off-by: Benjamin Li <benjamin.li@qlogic.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:21:44 -05:00
Benjamin Li cd238faa32 qla3xxx: Changed to use netdev_alloc_skb() from dev_alloc_skb
Signed-off-by: Benjamin Li <benjamin.li@qlogic.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:21:43 -05:00
Benjamin Li d2d76b8db4 qla3xxx: Remove unnecessary memset() in qla3xxx_send()
We do not need to zero out the 64 byte MAC request I/O control block.
  By zeroing out the control block and setting it to proper fields is
redundant work.  This is because in the qla3xxx_send() function we will
already set the proper fields in this structure.  The unused fields are
not looked at by the hardware and do not need to be zeroed out.

Signed-off-by: Benjamin Li <benjamin.li@qlogic.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:21:43 -05:00
Benjamin Li 546faf077e qla3xxx: Return proper error codes when the 4022/4032 is being probed
The return code was not properly set when when allocating memory or mapping
memory failed.  Depending on the stack, the return code would sometimes
return 0, which indicates everything was ok, when in fact there was an error.
  This would cause trouble when the module was removed.  Now, we will pass
back the proper return code when an error occurs during the PCI probe.

Signed-off-by: Benjamin Li <benjamin.li@qlogic.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:21:43 -05:00
Ralf Baechle 908b637fe7 Alignment in mv643xx_eth
The driver contains this little piece of candy:

#if defined(CONFIG_DMA_NONCOHERENT) || defined(CONFIG_NOT_COHERENT_CACHE)
#define ETH_DMA_ALIGN           L1_CACHE_BYTES
#else
#define ETH_DMA_ALIGN           8
#endif

Any reason why we're not using dma_get_cache_alignment() instead?

  Ralf

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:21:25 -05:00
Ralf Baechle 92b0c4e240 sgiseeq: Don't include unnecessary headerfiles.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:21:25 -05:00
Timur Tabi e9eb70c921 ucc_geth: use of_get_mac_address()
Update ucc_geth_probe() to use function of_get_mac_address() to obtain the MAC
address.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:21:25 -05:00
Stephen Hemminger f19841f517 skge: comma consistency
Use comma's consistently.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:16:04 -05:00
Stephen Hemminger c4cd29d205 skge: fix transmitter flow control
It looks like the skge driver inherited another bug from the sk98lin code.
If I send from 1000mbit port to a machine on 100mbit port, the switch should
be doing hardware flow control, but no pause frames show up in the statistics.

This is the analog of the recent sky2 fixes. The device needs to listen
for multicast pause frames and then not discard them.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:16:04 -05:00
Brice Goglin 9dc6f0e789 myri10ge: workaround buggy adopted firmwares
Work around a bug which occurs when adopting firmware versions
1.4.4 though 1.4.11 where broadcasts are filtered as if they
were multicasts.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:16:04 -05:00
Amit S. Kale b1adf031a1 NetXen: Driver ifconfig fix
Signed-off-by: Amit S. Kale <amitkale@netxen.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:16:04 -05:00
Amit S. Kale 9de0661066 NetXen: Driver unload fixes
Signed-off-by: Amit S. Kale <amitkale@netxen.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:16:04 -05:00
Linas Vepstas 7376e73256 spidernet: janitorial, typos
Janitorial patch. Undo long lines, fix typo in err msg.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
Cc: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:16:03 -05:00
Linas Vepstas 5c8e98fe47 spidernet: transmit race
Multiple threads performing a transmit can race into
the spidernet tx ring cleanup code. This puts the
relevant check under a lock.

Signed-off-by: Linas Vepstas <lins@austin.ibm.com>
Cc: Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
Cc: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:16:03 -05:00
Linas Vepstas d9c199ee78 spidernet: fix racy double-free of skb
It appears that under certain circumstances, a race will result
in a double-free of an skb. This patch null's out the skb pointer
upon the skb free, avoiding the inadvertent deref of bogus data.
The next patch fixes the actual race.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
Cc: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:16:03 -05:00
Linas Vepstas 4cb6f9e57d spidernet: separate hardware state from driver state.
This patch separates the hardware descriptor state from the
driver descriptor state, per (old) suggestion from Ben Herrenschmidt.
This compiles and boots and seems to work.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
Cc: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:16:03 -05:00
Jens Osterkamp 4b23a554db spidernet: move medium variable into card struct
This moves the medium variable into the spidernet card structure.
It renames the GMII_ variables to BCM54XX specific ones.

Signed-off-by: Jens Osterkamp <jens@de.ibm.com>
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:16:03 -05:00
Ishizaki Kou fc8e13da91 spidernet: remove txram full logging
This patches removes logging for SPIDER_NET_GTMFLLINT interrupts.
Since the interrupts are not irregular, and they happen frequently
when using 100Mbps network switches.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:16:03 -05:00
Kou Ishizaki 3342cf0e59 spidernet: spidernet: add support for Celleb
This patch adds or changes some HW specific settings for spider_net on
Celleb.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:16:03 -05:00
Kou Ishizaki 3cf761ddcc spidernet: load firmware when open
This patch moves calling init_firmware() from spider_net_probe() to
spider_net_open() so as to use the driver by built-in.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:16:03 -05:00
Kou Ishizaki abdb66b566 spidernet: autoneg support for Celleb
Add auto negotiation support for Celleb.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:16:02 -05:00
Linas Vepstas d406eafee8 spidernet: compile break.
As of 2.6.20-git4, the spider_net driver does not compile.
This appears to be due to some archaic usage involving kobjects.

It also fixes a nasty double-free during ifdown of the interface.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
Cc: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:16:02 -05:00
Jens Osterkamp eb5b5b2ff9 sungem_phy: support bcm5461 phy, autoneg.
This version moves the medium variable to the card specific structure and
changes the GMII_* to BCM54XX_* #defines.

This patch adds improved version of enable_fiber for both the 5421 and
the 5461 phy. It is now possible to specify with these wether you want
autonegotiation or not. This is needed for bladecenter switches where
some expect autonegotiation and some dont seem to like this at all.
Depending on this flag it sets phy->autoneg accordingly for the fiber mode.

More importantly it implements proper read_link and poll_link functions
for both phys which can handle both copper and fiber mode by determining
the medium first and then branching to the required functions. For fiber
they all work fine, for copper they are not tested but return the result
of the genmii_* function anyway which is supposed to work.

The patch moves the genmii_* functions around to avoid foreward declarations.

Signed-off-by: Jens Osterkamp <jens@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:16:02 -05:00
Ayaz Abdulla 6fedae1f6e forcedeth: fix checksum feature in mcp65
This patch removes checksum offload feature in mcp65 chipsets as they
are not supported in hw.

Signed-Off-By: Ayaz Abdulla <aabdulla@nvidia.com>

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:16:02 -05:00
Ayaz Abdulla caf96469e8 forcedeth: disable msix
There seems to be an issue when both MSI-X is enabled and NAPI is
configured. This patch disables MSI-X until the issue is root caused.

Signed-Off-By: Ayaz Abdulla <aabdulla@nvidia.com>

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:16:02 -05:00
Ayaz Abdulla e0379a14fc forcedeth: fixed missing call in napi poll
The napi poll routine was missing the call to the optimized rx process
routine. This patch adds the missing call for the optimized path.

Signed-Off-By: Ayaz Abdulla <aabdulla@nvidia.com>

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:16:02 -05:00
Jeff Garzik 420e85241e [netdrvr] tc35815: fix obvious bugs
* clear_page() use is wrong.  We might have multiple pages.
  Use memset() instead.
* Call pci_unregister_driver() in module exit.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:11:05 -05:00
Linus Torvalds b0138a6cb7 Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (78 commits)
  [PARISC] Use symbolic last syscall in __NR_Linux_syscalls
  [PARISC] Add missing statfs64 and fstatfs64 syscalls
  Revert "[PARISC] Optimize TLB flush on SMP systems"
  [PARISC] Compat signal fixes for 64-bit parisc
  [PARISC] Reorder syscalls to match unistd.h
  Revert "[PATCH] make kernel/signal.c:kill_proc_info() static"
  [PARISC] fix sys_rt_sigqueueinfo
  [PARISC] fix section mismatch warnings in harmony sound driver
  [PARISC] do not export get_register/set_register
  [PARISC] add ENTRY()/ENDPROC() and simplify assembly of HP/UX emulation code
  [PARISC] convert to use CONFIG_64BIT instead of __LP64__
  [PARISC] use CONFIG_64BIT instead of __LP64__
  [PARISC] add ASM_EXCEPTIONTABLE_ENTRY() macro
  [PARISC] more ENTRY(), ENDPROC(), END() conversions
  [PARISC] fix ENTRY() and ENDPROC() for 64bit-parisc
  [PARISC] Fixes /proc/cpuinfo cache output on B160L
  [PARISC] implement standard ENTRY(), END() and ENDPROC()
  [PARISC] kill ENTRY_SYS_CPUS
  [PARISC] clean up debugging printks in smp.c
  [PARISC] factor syscall_restart code out of do_signal
  ...

Fix conflict in include/linux/sched.h due to kill_proc_info() being made
publicly available to PARISC again.
2007-02-26 12:48:06 -08:00
Michael Chan 7f62ad5d37 [TG3]: TSO workaround fixes.
1.  Add race condition check after netif_stop_queue().  tg3_tx() runs
    without netif_tx_lock and can race with tg3_start_xmit_dma_bug() ->
    tg3_tso_bug().

2.  Firmware TSO in 5703/5704/5705 also have the same TSO limitation,
    i.e. they cannot handle TSO headers bigger than 80 bytes.  Rename
    TG3_FL2_HW_TSO_1_BUG to TG3_FL2_TSO_BUG and set this flag on
    these chips as well.

3.  Update version to 3.74.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-02-26 11:42:47 -08:00
Linus Torvalds b5bf28cde8 Revert "e1000: fix shared interrupt warning message"
This reverts commit d2ed16356f.

As Thomas Gleixner reports:
  "e1000 is not working anymore. ifup fails permanentely.
    ADDRCONF(NETDEV_UP): eth0: link is not ready
   nothing else"

The broken commit was identified with "git bisect".

Auke Kok says:
  "I think we need to drop this now.  The report that says that this
   *fixes* something might have been on regular interrupts only.  I
   currently suspect that it breaks all MSI interrupts, which would make
   sense if I look a the code.  Very bad indeed."

Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Auke Kok <auke-jan.h.kok@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-21 11:21:44 -08:00
Linus Torvalds 91aa69315e Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (21 commits)
  natsemi: Support Aculab E1/T1 PMXc cPCI carrier cards
  natsemi: Add support for using MII port with no PHY
  skge: race with workq and RTNL
  Replace local random function with random32()
  s2io: RTNL and flush_scheduled_work deadlock
  8139too: RTNL and flush_scheduled_work deadlock
  sis190: RTNL and flush_scheduled_work deadlock
  r8169: RTNL and flush_scheduled_work deadlock
  [PATCH] ieee80211softmac: Fix setting of initial transmit rates
  [PATCH] bcm43xx: OFDM fix for rev 1 cards
  [PATCH] bcm43xx: Fix for 4311 and 02/07/07 specification changes
  [PATCH] prism54: correct assignment of DOT1XENABLE in WE-19 codepaths
  [PATCH] zd1211rw: Readd zd_addr_t cast
  [PATCH] bcm43xx: Fix for oops on resume
  [PATCH] bcm43xx: Ignore ampdu status reports
  [PATCH] wavelan: Use ARRAY_SIZE macro when appropriate
  [PATCH] hostap: Use ARRAY_SIZE macro when appropriate
  [PATCH] misc-wireless: Use ARRAY_SIZE macro when appropriate
  [PATCH] ipw2100: Use ARRAY_SIZE macro when appropriate
  [PATCH] bcm43xx: Janitorial change - remove two unused variables
  ...
2007-02-20 10:26:46 -08:00
Dale Farnsworth f00a3ec4d4 [NET] Eliminate user-selectable CONFIG_MV643XX_ETH_[012]
Remove the use of CONFIG_MV643XX_ETH_[012] variables on most platforms.
Instead, platform-specific code enables the ports supported by the
hardware.  After this patch, these config variables are only used in
arch/ppc, so also move them from drivers/net/Kconfig to arch/ppc/Kconfig.

Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Jeff Garzik <jeff@garzik.org>
Cc: Paul Mackerras <paulus@samba.org>
2007-02-20 17:11:55 +00:00
Jeff Garzik 6606e17a7f Merge branch 'upstream-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream 2007-02-20 11:28:42 -05:00
Mark Brown 6aab44475a natsemi: Support Aculab E1/T1 PMXc cPCI carrier cards
Aculab E1/T1 PMXc cPCI carrier card cards present a natsemi on the cPCI
bus with an oversized EEPROM using a direct MII<->MII connection with no
PHY.  This patch adds a new device table entry supporting these cards.

Signed-Off-By: Mark Brown <broonie@sirena.org.uk>

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-20 11:18:13 -05:00
Mark Brown 68c90166e4 natsemi: Add support for using MII port with no PHY
This patch provides code paths which allow the natsemi driver to use the
external MII port on the chip but ignore any PHYs that may be attached to it.
The link state will be left as it was when the driver started and can be
configured via ethtool.  Any PHYs that are present can be accessed via the MII
ioctl()s.

This is useful for systems where the device is connected without a PHY
or where either information or actions outside the scope of the driver
are required in order to use the PHYs.

Signed-Off-By: Mark Brown <broonie@sirena.org.uk>

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-20 11:18:13 -05:00
Stephen Hemminger 208491d8f9 skge: race with workq and RTNL
If a workqueue function that needs RTNL is running when skge_down
is called then a deadlock is possible. Fix by only clearing the timer,
and handling the flush_scheduled_work on removal. This work queue is only
ever used for the old fiber based boards.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-20 11:18:13 -05:00
Ralf Baechle 8b5b467181 Replace local random function with random32()
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-20 11:18:13 -05:00
Francois Romieu 22747d6b41 s2io: RTNL and flush_scheduled_work deadlock
Mantra: don't use flush_scheduled_work with RTNL held.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-20 11:18:13 -05:00
Francois Romieu 83cbb4d257 8139too: RTNL and flush_scheduled_work deadlock
Your usual dont-flush_scheduled_work-with-RTNL-held stuff.

It is a bit different here since the thread runs permanently
or is only occasionally kicked for recovery depending on the
hardware revision.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-20 11:18:12 -05:00
Francois Romieu c014f6c8f8 sis190: RTNL and flush_scheduled_work deadlock
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-20 11:18:12 -05:00
Francois Romieu eb2a021c47 r8169: RTNL and flush_scheduled_work deadlock
flush_scheduled_work() in net_device->close has a slight tendency
to deadlock with tasks on the workqueue that hold RTNL.

rtl8169_close/down simply need the recovery tasks to not meddle
with the hardware while the device is going down.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-20 11:18:12 -05:00