Archived
14
0
Fork 0
Commit graph

3873 commits

Author SHA1 Message Date
Stephen Hemminger
24a427cf76 chelsio: more rx speedup
Cleanup receive processing some more:
   * do the reserve padding of skb during setup
   * don't pass constants to get_packet
   * do smart prefetch of skb
   * make copybreak a module parameter

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:47 -05:00
Stephen Hemminger
3de00b8958 chelsio: NAPI speed improvement
Speedup and cleanup the receive processing by eliminating the
mmio read and a lock round trip.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:46 -05:00
Divy Le Ray
4d22de3e6c Add support for the latest 1G/10G Chelsio adapter, T3.
This driver is required by the Chelsio T3 RDMA driver posted by
Steve Wise.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:46 -05:00
Adrian Bunk
0bf94faf64 make hdlc_setup() static again
hdlc_setup was exported, but this export was never used.

If a driver using it actually shows up it can still be exported again.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:46 -05:00
Ayaz Abdulla
0d63fb32b2 forcedeth: rx skb recycle
This patch removes the code that recycled the skb on error. This will
help in reducing the branches in the main data paths.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:46 -05:00
Ayaz Abdulla
164a86e40e forcedeth: tx locking
This patch reduces the amount of code within the lock to only the
critical sections.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:46 -05:00
Ayaz Abdulla
761fcd9e3e forcedeth: ring access
This patch modifys ring access by using pointers. This avoids computing
the current index and avoids accessing the base address of the rings.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:46 -05:00
Ayaz Abdulla
d2f7841277 forcedeth: dma access
This patch allows the hardware to fetch the tx and rx ring descriptors
with 64 bytes per access instead of 32 bytes.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:46 -05:00
Adrian Bunk
95f48a71a2 remove the broken SKMC driver
The SKMC driver has:
- already been marked as BROKEN in 2.6.0 three years ago and
- is still marked as BROKEN.

Drivers that had been marked as BROKEN for such a long time seem to be
unlikely to be revived in the forseeable future.

But if anyone wants to ever revive this driver, the code is still
present in the older kernel releases.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:46 -05:00
Cesar Eduardo Barros
bf34570729 driver for Silan SC92031 netdev
This is a driver for the Silan SC92031/Rsltek 8139D NIC chip.

This chip is found on at least one counterfeit Encore ENL832-TX-RENT NIC
[1], which came with a mini-CD with the 2.4 driver.  A slightly older
version of the driver was found at [2].  The main difference between them
is that the newer one has a small bugfix in the RX path, a lot of
gratuitous renaming of functions, all the printable strings changed to show
as a "Rsltek 8139D" [sic], and a PCI ID of 8139 instead of 2031.  The
driver on this patch is a rewrite of the vendor drivers (based mostly on
the older one).

Changes from the previous patch sent to netdev:
- Use MMIO instead of PIO
- Changed TX bounce buffers allocation
- Use skb_copy_and_csum_dev
- Several small bug fixes
- Tested for more than just a few minutes each time

[1] See http://www.encore-usa.com/faq.php under ENL832-TX-RENT for more
    information
[2] Look for SL_LINUX.ZIP (which is really a .tar.gz) at
    http://broadbandforum.in/dataone_Intex_LAN_cardlinux-t4207-s15.html
[3] To compile on 2.6.17, simply add back the last argument to the
    interrupt handler in two places, and copy the boolean declarations
    from 2.6.19

[akpm@osdl.org: build fixes]
Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:45 -05:00
Stephen Hemminger
ae306cca3a sky2: better power state management
Improve power management and error handling by using pci_set_power_state(),
instead of driver doing PCI PM register changes in the driver.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:45 -05:00
Arjan van de Ven
1d39ed565c remove NETIF_F_TSO ifdefery
Remove the NETIF_F_TSO #ifdef-ery in drivers/net; this was
for old-old-2.4 compat (even current 2.4 has NETIF_F_TSO)
but it's time to get rid of it by now.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:45 -05:00
Linas Vepstas
6d24998f07 Spidernet RX Debugging printout
Add some debugging and error printing.

The show_rx_chain() prints out the status of the rx chain,
which shows that the status of the descriptors gets
messed up after the second & subsequent RX ramfulls.

Print out contents of bad packets if error occurs.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:45 -05:00
Linas Vepstas
df519ab2c5 Spidernet Avoid possible RX chain corruption
Delete possible source of chain corruption; the hardware
already knows the location of the tail, and writing it
again is likely to mess it up.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:45 -05:00
Linas Vepstas
90476a20fa Spidernet Memory barrier
Add memory barrier to make sure that the rest of the
RX descriptor state is flushed to memory before we tell
the hardware that its ready to go.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:45 -05:00
Linas Vepstas
2c307db7e4 Spidernet RX Chain tail
Tell the hardware the location of the rx ring tail.
More punctuation cleanup.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:44 -05:00
Linas Vepstas
a4182c50bc Spidernet Remove unused variable
Remove unused variable; this makes code easier to read.
Tweak commentary.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:44 -05:00
Linas Vepstas
80dab7c7e5 Spidernet RX Refill
The invocation of the rx ring refill routine is haphazard,
it can be called from a central location.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:44 -05:00
Linas Vepstas
7f7223b8f1 Spidernet Cleanup return codes
Simplify the somewhat convoluted use of return codes
in the rx buffer handling.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:44 -05:00
Linas Vepstas
366684bd0d Spidernet another skb mem leak
Another skb leak in an error branch. Fix this by adding
call to dev_kfree_skb_irq() after moving to a more
appropriate spot.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:44 -05:00
Linas Vepstas
05b346b552 Spidernet RX skb mem leak
One of the unlikely error branches has an skb memory leak.
Fix this by handling the error conditions consistently.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:44 -05:00
Linas Vepstas
1cd173f66c Spidernet cleanup un-needed API
There is no need to pass a flag into spider_net_decode_one_descr()
so remove this, and perform some othre minor cleanup.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:44 -05:00
Linas Vepstas
75856175c2 Spidernet remove rxramfull tasklet
Get rid of the rxramfull tasklet, and let the NAPI poll routine
deal with this situation. (The rxramfull interrupt is simply
stating that the h/w has run out of room for incoming packets).

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:44 -05:00
Linas Vepstas
5a028877d2 Spidernet add net_ratelimit to suppress long output
This patch adds net_ratelimit to many of the printks in order to
limit extraneous warning messages (created in response to Bug 28554).
This patch supercedes all previous ratelimit patches.
This has been tested, please apply.

From: James K Lewis <jklewis@us.ibm.com>
Signed-off-by: James K Lewis <jklewis@us.ibm.com>
Signed-off-by: Linas Vepstas <jlinas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:44 -05:00
Linas Vepstas
d4ed8f8d1f Spidernet DMA coalescing
The current driver code performs 512 DMA mappings of a bunch of
32-byte ring descriptor structures. This is silly, as they are
all in contiguous memory. This patch changes the code to
dma_map_coherent() each rx/tx ring as a whole.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:43 -05:00
Francois Romieu
834324687d chelsio: tabulate the update of the statistic counters
Let's try to avoid some code duplication.

- cxgb2
  The data are contiguous. Use plain memcpy.

- ixf1010/pm3393/vsc7326
  The cast of &mac->stats to (u64 *) is not wonderful but it is not clear
  if it is worth to add an ad-hoc union under the struct cmac_statistics.

vsc7326_reg.h suggests that more statistics could be available.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2007-02-05 16:58:43 -05:00
Francois Romieu
3e0f75be52 chelsio: misc cleanups in sge
- duplicated code in sge::free_cmdQ_buffers ;
- NET_IP_ALIGN is already defined in (included) <linux/skbuff.h> ;
- pci_alloc_consistent() returns void * ;
- pci_alloc_consistent() returns a zeroed chunk of memory ;
- early return in restart_tx_queues.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2007-02-05 16:58:43 -05:00
Francois Romieu
47cbe6f47d chelsio: useless test in cxgb2::remove_one
pci_get_drvadata() is necessarily distinct from NULL if
cxgb2::init_one succeeded. cxgb2::remove_one is solely
issued through the PCI device callback.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2007-02-05 16:58:43 -05:00
Francois Romieu
d7487421b6 chelsio: useless curly braces
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2007-02-05 16:58:43 -05:00
Francois Romieu
356bd1460d chelsio: spaces, tabs and friends
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2007-02-05 16:58:43 -05:00
Francois Romieu
b7d58394e6 chelsio: the return statement is not a function
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2007-02-05 16:58:43 -05:00
Francois Romieu
c697f83e8c chelsio: move return, break and continue statements on their own line
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2007-02-05 16:58:43 -05:00
Zhu Yi
ea8862dc86 [PATCH] ipw2200: add iwconfig rts/frag auto support
This patch add ipw2200 support for iwconfig rts/frag auto.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-02-05 16:58:43 -05:00
Daniel Drake
2e9b2467de [PATCH] zd1211rw: Add ID for ZyXEL ZyAIR G-220 v2
Tested by Marijn Schouten
zd1211b chip 0586:340f v4810 high 00-13-49 AL2230_RF pa0 g---
FCC ID: I88G220V2

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-02-05 16:58:42 -05:00
Kai Engert
ff86a543e9 [PATCH] prism54: add ethtool -i interface
Add support for "ethtool -i" to prism54 driver.

ethtool -i queries the specified device for
associated driver information.

This helps tools like Fedora's system-config-network to
provide GUI management of network devices.
I learned how to write this patch by reading the ipw2100
driver code.

Signed-off-by: Kai Engert <kengert@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-02-05 16:58:42 -05:00
Larry Finger
0191738286 [PATCH] bcm43xx: Interrogate hardware-enable switch and update LEDs
The current bcm43xx driver ignores any wireless-enable switches on mini-PCI
and mini-PCI-E cards. This patch implements a new routine to interrogate the
radio hardware enabled bit in the interface, logs the initial state and any
changes in the switch (if debugging enabled), activates the LED to show the
state, and changes the periodic work handler to provide 1 second response
to switch changes and to account for changes in the periodic work specs.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-02-05 16:58:42 -05:00
Daniel Drake
33218ba1d1 [PATCH] zd1211rw: Add ID for Linksys WUSBF54G
Tested by Henrik Hjelte
zd1211b chip 13b1:0024 v4802 high 00-14-bf AL2230_RF pa0 ----

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-02-05 16:58:42 -05:00
Daniel Drake
0ce34bc8f7 [PATCH] zd1211rw: Remove addressing abstraction
Instead of passing our own custom 32-bit addresses around and
translating them, this patch makes all our register address constants
absolute and removes the translation.

There are two ugly parts:
 - fw_reg_addr() is needed to compute addresses of firmware registers, as this
   is dynamic based upon firmware
 - inc_addr() needs a small hack to handle byte vs word addressing

However, both of those are only small, and we don't use fw_regs a whole
lot anyway.

The bonuses here include simplicity and improved driver readability. Also, the
fact that registers are now referenced by 16-bit absolute addresses (as
opposed to 32-bit pseudo addresses) means that over 2kb compiled code size has
been shaved off.

Includes some touchups and sparse fixes from Ulrich Kunitz.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-02-05 16:58:42 -05:00
Daniel Drake
ee30276774 [PATCH] zd1211rw: Consistency for address space constants
The zd1211rw address space has confused me once too many times. This
patch introduces the following naming notation:

Memory space is split into segments (cr, fw, eeprom) and segments may
contain components (e.g. boot code inside eeprom). These names are
arbitrary and only for the description below:

x_START: Absolute address of segment start
(previously these were named such as CR_BASE_OFFSET, but they weren't
really offsets unless you were considering them as an offset to 0)

x_LEN: Segment length

x_y_LEN: Length of component y of segment x

x_y_OFFSET: Relative address of component y into segment x. The absolute
address for this component is (x_START + x_y_OFFSET)

I also renamed EEPROM registers to EEPROM data. These 'registers' can't
be written to using standard I/O and really represent predefined data
from the vendor.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-02-05 16:58:42 -05:00
Daniel Drake
a2bdcc6792 [PATCH] zd1211rw: 2 new ZD1211B device ID's
Philips SNU5600, tested by unibrow
zd1211b chip 0471:1236 v4810 high 00-12-bf AL2230_RF pa0 g--

SMC Ez Connect 802.11g (SMCWUSB-G), tested by Victorino Sanz Prat
zd1211b chip 083a:4505 v4810 full 00-13-f7 AL2230_RF pa0 g--N

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-02-05 16:58:42 -05:00
Daniel Drake
34c4491264 [PATCH] zd1211rw: Generic HMAC initialization
Many of the registers written during ZD1211 HMAC initialization are
duplicated exactly for ZD1211B. Move the identical ones into a generic
part, and write the hardware-specific ones separately.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-02-05 16:58:41 -05:00
Auke Kok
7e72157947 e1000: update version to 7.3.20-k2
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2007-02-05 16:58:41 -05:00
Jesse Brandeburg
7753b171c4 e1000: tune our dynamic itr transmit packet accounting
The driver was still mis-calculating the number of bytes sent during
transmit, now the driver computes what appears to be exactly 100%
correct byte counts (not including CRC) when figuring out how many
bytes and frames were sent during the current transmit packet.
2007-02-05 16:58:41 -05:00
Bruce Allan
f6c57bafcd e1000: clear ip csum info from context descriptor
Since the driver sets the IP checksum insertion bit (IXSM in Status
field) in transmit context descriptors, it should clear the IP checksum
bits of any garbage so as not to confuse the hardware.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2007-02-05 16:58:41 -05:00
Auke Kok
9669f53b98 e1000: display flow control of link status at link up
Print RX/TX flow control setting at link up time to display the
actual link FC properties instead of the advertised values.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2007-02-05 16:58:41 -05:00
Jesse Brandeburg
60cba200f1 e1000: fix NAPI performance on 4-port adapters
This fix attempts to solve a customer (IBM) reported issue with NAPI
enabled e1000 having bad performance when transmitting simultaneously
on four ports.  The issue comes down to an interaction between NAPI,
hardware interrupt balancing, and the driver rescheduling poll on
the same processor.  Try to fix by allowing the driver to re-enable
interrupts sooner instead of polling one more time, when there was
recently all the work completed in cleanup.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2007-02-05 16:58:41 -05:00
Jesse Brandeburg
b5fc8f0c43 e1000: Fix MSI only interrupt handler routine
Unfortunately the read-free MSI interrupt handler needs to flush write
the icr register and thus we can't be read-free. Our MSI irq routine
thus becomes a lot more simpler since we don't need to track link state
anymore.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2007-02-05 16:58:41 -05:00
Auke Kok
bf3cea4d8a e1000: clean up debug output defines
Remove unused MSGOUT macro and add "\n" to function debug output.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2007-02-05 16:58:41 -05:00
Jesse Brandeburg
9990fa3cbd e1000: simplify case handling gigabit at half duplex
Remvoe duplicate code handling erraneous user supplied wrong case
of gigabit speed with half duplex.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2007-02-05 16:58:41 -05:00
Peter Korsgaard
24d8f6aded [PATCH] net/smc911x: match up spin lock/unlock
smc911x_phy_configure's error handling unconditionally unlocks the
spinlock even if it wasn't locked. Patch fixes it.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-03 11:26:06 -08:00
Linus Torvalds
222335b755 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:
  spidernet : fix memory leak in spider_net_stop
  e100: fix napi ifdefs removing needed code
  netxen patches
2007-02-02 08:13:23 -08:00
Jens Osterkamp
a55eb05a57 spidernet : fix memory leak in spider_net_stop
We forget to call spider_net_free_rx_chain_contents which does the
actual dev_kfree_skb. New skbs are allocated from skbuff_head_cache
on each "ifconfig up" letting the cache grow infinitely.

This patch fixes it.

Signed-off-by: Jens Osterkamp <jens@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-02 08:34:10 -05:00
Auke Kok
a53a33da86 e100: fix napi ifdefs removing needed code
e100: fix napi ifdefs removing needed code

From: Auke Kok <auke-jan.h.kok@intel.com>

The e100 driver is NAPI mode only. We need to netif_poll_disable
during suspend and shutdown. The non-NAPI driver code was removed
and is only avaiable in the out-of-tree e100 kernel driver.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-02 08:34:10 -05:00
Jeff Garzik
ae2c27a78f Merge ../linux-2.6 2007-02-02 08:31:55 -05:00
Michael Chan
b659f44e4e [BNX2]: PHY workaround for 5709 A0.
5709 A0 copper devices will not link up with some link partners
without this workaround.

Update driver to 1.5.5.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-02-02 00:46:35 -08:00
Al Viro
9d6ed92196 [PATCH] radio modems sitting on serial port are not for s390
Won't build (request_irq()/free_irq()), even if you manage to find an
s390 box with 8250-compatible UART they are expecting.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-01 16:17:06 -08:00
Al Viro
a608ab9cb6 netxen patches
Have fun.

>From 24f4a1a77431575a9cdfaae25adda85842099f70 Mon Sep 17 00:00:00 2001
From: Al Viro <viro@zeniv.linux.org.uk>
Date: Mon, 1 Jan 2007 15:22:56 -0500
Subject: [PATCH] netxen trivial annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-31 04:59:08 -05:00
Linus Torvalds
bcdddfb66c Revert "net: ifb error path loop fix"
This reverts commit 0c0b3ae68e.

Quoth David:

  "Jeff, please revert

   It's wrong.  We had a lengthy analysis of this piece of code
   several months ago, and it is correct.

   Consider, if we run the loop and we get an error
   the following happens:

   1) attempt of ifb_init_one(i) fails, therefore we should
      not try to "ifb_free_one()" on "i" since it failed
   2) the loop iteration first increments "i", then it
      check for error

   Therefore we must decrement "i" twice before the first
   free during the cleanup.  One to "undo" the for() loop
   increment, and one to "skip" the ifb_init_one() case which
   failed."

Reported-by: David Miller <davem@davemloft.net>
Acked-by: Jeff Garzik <jgarzik@pobox.com>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-01-30 14:11:12 -08:00
Dmitriy Monakhov
90afd0e574 Broadcom 4400 resume small fix
Some issues in b44_resume().

- Return value of pci_enable_device() was ignored.

- If request_irq() has failed we have to just disable device and exit.

Signed-off-by: Dmitriy Monakhov <dmonakhov@openvz.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-30 09:36:02 -05:00
Al Viro
00576e9380 b44: src_desc->addr is little-endian
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-30 09:36:02 -05:00
Auke Kok
518d833825 e100: fix irq leak on suspend/resume
e100: fix irq leak on suspend/resume

From: Frederik Deweerdt <frederik.deweerdt@gmail.com>

The e100_resume() function should be calling netif_device_detach and
free_irq. This fixes multiple irq's being allocated after resume.

Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-30 09:36:02 -05:00
Andy Gospodarek
f8a8ccd56d bonding: ARP monitoring broken on x86_64
While working with the latest bonding code I noticed a nasty problem that
will prevent arp monitoring from always functioning correctly on x86_64
systems.  Comparing ints to longs and expecting reliable results on x86_64
is a bad idea.  With this patch, arp monitoring works correctly again.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Stephen Hemminger <shemminger@osdl.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-30 09:36:02 -05:00
Thomas Klein
d4150a2731 ehea: Fixed missing tasklet_kill() call
NEQ-Tasklet wasn't killed when module is removed.

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-30 09:36:02 -05:00
Thomas Klein
9c750b7d14 ehea: Fixed wrong jumbo frames status query
This patch fixes the wrong query and logging of the per interface jumbo frames
enabled/disabled status.

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-30 09:36:02 -05:00
Andrew Morton
9e8e83d1ba 82596 warning fixes
drivers/net/82596.c: In function 'i596_start_xmit':
drivers/net/82596.c:1069: warning: cast from pointer to integer of different size
drivers/net/82596.c: In function 'i82596_probe':
drivers/net/82596.c:1249: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int'

Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-30 09:36:01 -05:00
Vitaly Bordug
b1f54ba34f FS_ENET: OF-related fixup for FEC and SCC MAC's
Updated direct resource pass with ioremap call, make it grant proper IRQ
mapping, stuff incompatible with the new approach were respectively put
under #ifndef CONFIG_PPC_MERGE.  It is required so that both ppc and
powerpc could utilize fs_enet effectively.

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-30 09:36:01 -05:00
Mariusz Kozlowski
0c0b3ae68e net: ifb error path loop fix
On error we should start freeing resources at [i-1] not [i-2].

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-30 09:36:01 -05:00
Michael Chan
5fc7d61aee b44: Fix frequent link changes
This fixes the issue of frequent link changes under heavy traffic reported
below:

http://bugzilla.kernel.org/show_bug.cgi?id=7696
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=216338

The b44 chip occasionally needs to be reset when ISTAT_ERRORS are
encountered.  The reset sequence includes a PHY reset that will take many
seconds to complete and cause the link to go down and up.  By skipping the
PHY reset, it will greatly reduce the interruption when ISTAT_ERRORS are
encountered.

Change the full_reset parameter to reset_kind parameter in b44_init_hw().
This will allow PHY reset to be skipped when ISTAT_ERRORS are encountered.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-30 09:36:01 -05:00
Stephen Hemminger
4cbf2aa35e [PATCH] sky2: revert IRQ dance on suspend/resume
Let's just backout the IRQ hack, and for those crap machines (like some
Sony VAIO's) can just disable MSI with the module parameter.

This reverts 44ade17824.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Frédéric Riss <frederic.riss@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-01-29 17:50:14 -08:00
Michael Chan
24cb230b58 [BNX2]: Fix 2nd port's MAC address.
On the 5709, we need to add the proper offset to calculate the shared
memory base address of the 2nd port correctly.  Otherwise, the 2nd
port's MAC address and other information will be the same as the 1st
port.

Update version to 1.5.4.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-01-25 15:49:56 -08:00
Linus Torvalds
6f3776c9cd Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (23 commits)
  [SCTP]: Fix compiler warning.
  [IP] TUNNEL: Fix to be built with user application.
  [IPV6]: Fixed the size of the netlink message notified by inet6_rt_notify().
  [TCP]: rare bad TCP checksum with 2.6.19
  [NET]: Process include/linux/if_{addr,link}.h with unifdef
  [NETFILTER]: Fix iptables ABI breakage on (at least) CRIS
  [IRDA] vlsi_ir.{h,c}: remove kernel 2.4 code
  [TCP]: skb is unexpectedly freed.
  [IPSEC]: Policy list disorder
  [IrDA]: Removed incorrect IRDA_ASSERT()
  [IrDA]: irda-usb TX path optimization (was Re: IrDA spams logfiles - since 2.6.19)
  [X.25]: Add missing sock_put in x25_receive_data
  [SCTP]: Fix SACK sequence during shutdown
  [SCTP]: Correctly handle unexpected INIT-ACK chunk.
  [SCTP]: Verify some mandatory parameters.
  [SCTP]: Set correct error cause value for missing parameters
  [NETFILTER]: fix xt_state compile failure
  [NETFILTER]: ctnetlink: fix leak in ctnetlink_create_conntrack error path
  [SELINUX]: increment flow cache genid
  [IPV6] MCAST: Fix joining all-node multicast group on device initialization.
  ...
2007-01-24 07:45:35 -08:00
Jeff Garzik
e47b207a5b Merge branch 'master' into upstream-fixes 2007-01-24 02:14:25 -05:00
Adrian Bunk
778a43fd62 [IRDA] vlsi_ir.{h,c}: remove kernel 2.4 code
This patch removes kernel 2.4 compatibility code.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-01-23 21:16:40 -08:00
Samuel Ortiz
8f1adb5f27 [IrDA]: Removed incorrect IRDA_ASSERT()
With USB2.0 bulk out MTU can be 512 bytes, so checking it only for 64
bytes is incorrect.

Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-01-23 20:25:50 -08:00
Samuel Ortiz
3958fb34ef [IrDA]: irda-usb TX path optimization (was Re: IrDA spams logfiles - since 2.6.19)
Since we stop using dev_alloc_skb on the IrDA TX frame, we constantly run
into the case of the skb headroom being 0, and thus we call skb_cow for
every IrDA TX frame.
This patch uses a local buffer and memcpy the skb to it, saving us a
kmalloc for each of those IrDA TX frames.

Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-01-23 20:25:49 -08:00
Stephen Hemminger
65ebe63420 [PATCH] email change for shemminger@osdl.org
Change my email address to reflect OSDL merger.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
[ The irony. Somebody still has his sign-off message hardcoded
  in a script or his brainstem ;^]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-01-23 14:18:49 -08:00
Dale Farnsworth
d344bff9c3 mv643xx_eth: Fix race condition in mv643xx_eth_free_tx_descs
mv643xx_eth: Fix race condition in mv643xx_eth_free_tx_descs

This bug was found and isolated by Thibaut VARENE <T-Bone@parisc-linux.org>
and Jarek Poplawski <jarkao2@o2.pl>.  This patch is a modification of their
fixes.  We acquire and release the lock for each descriptor that is freed
to minimize the time the lock is held.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-23 16:28:53 -05:00
Al Viro
3196265e97 s2io bogus memset
memset() after kmalloc() on size * 8 would better be on size * 8, not
just size; fixed by switching to kcalloc() - it's more idiomatic anyway.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-23 16:26:33 -05:00
Al Viro
4384247b69 [PATCH] s2io bogus memset
memset() after kmalloc() on size * 8 would better be on size * 8, not
just size; fixed by switching to kcalloc() - it's more idiomatic anyway.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-01-23 11:09:49 -08:00
Amit S. Kale
184231bdb4 NetXen: Use pci_register_driver() instead of pci_module_init() in init_module
This will use pci_register_driver() instead of pci_module_init().

Signed-off-by: Amit S. Kale <amitkale@netxen.com>
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-23 01:02:11 -05:00
Amit S. Kale
90f8b1d295 NetXen: Firmware check modifications
This patch is to make the driver work with multiple minor firmware versions

Signed-off-by: Amit S. Kale <amitkale@netxen.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-23 01:02:11 -05:00
Thomas Klein
41b69c7051 ehea: Fixed possible nullpointer access
Fixed possible nullpointer access in event queue processing

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-23 00:59:21 -05:00
Thomas Klein
bb3a6449c1 ehea: Added logging off associated errors
Added logging of error events associated with a specific queue pair

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-23 00:59:21 -05:00
Thomas Klein
7674a588e9 ehea: Improved logging of permission issues
Disabled dump of hcall regs on some permission issues and
fixed appropriate misleading logmessages

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-23 00:59:21 -05:00
Thomas Klein
4e996b32e0 ehea: New method to determine number of available ports
Count OFDT nodes to determine the number of available ports
instead of using the possibly outdated value from the hypervisor

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-23 00:59:20 -05:00
Thomas Klein
e919b5938b ehea: Modified initial autoneg state determination
Logical partitions are not allowed to (try to) set the autonegotiation status.
This patch removes the respective function call from the port setup function.

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-23 00:59:20 -05:00
Thomas Klein
602e0d100d ehea: Fixing firmware queue config issue
Fix to use exactly one queue for incoming packets in all
firmware configurations

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-23 00:59:20 -05:00
Thomas Klein
061bf3cdba ehea: Fixed wrong dereferencation
Not only check the pointer against 0 but also the dereferenced value

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-23 00:59:20 -05:00
Kumar Gala
9f6d55d084 PHY: Export phy ethtool helpers
We need to export phy_ethtool_gset and phy_ethtool_sset to allow drivers that
use these functions to be built as modules.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-23 00:51:33 -05:00
Komuro
d08d283974 modify 3c589_cs to be SMP safe
1. EL3WINDOW is always 1 when lock is not held.

2. The second argument of el3_interrupt is 'void *dev_id',
not 'struct el3_private *lp'.

Signed-off-by: komurojun-mbn@nifty.com
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-23 00:19:12 -05:00
Francois Romieu
7939aae0c0 sis190: failure to set the MAC address from EEPROM
Fix from http://bugzilla.kernel.org/show_bug.cgi?id=7747

Signed-off-by: Andrew Morton <akpm@osdl.org>
Cc: <sleepy@mike-neko.net>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-18 22:02:13 -05:00
Timur Tabi
6bf446522b Fix phy_read/write redefinition errors in ucc_geth_phy.c
The local versions of phy_read() and phy_write() in ucc_geth_phy.c conflict
with the prototypes in include/linux/phy.h, so this patch renames them,
moves them to the top of the file (while eliminating the redundant prototype),
and makes them static.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-18 12:17:02 -05:00
Timur Tabi
df19b6b020 Update ucc_geth.c for new workqueue structure
The workqueue interface changed with David Howell's patch on 11/22/2006
(SHA 65f27f3844).  Several drivers were
updated with that patch to handle the new interface, but ucc_geth.c
was not one of them.  This patch updates ucc_geth.c to support the new
model.

A compiler warning in set_mac_addr() was also fixed.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-18 12:03:48 -05:00
Brice Goglin
b2db8dd4fd myri10ge: update driver version to 1.2.0
Driver is now at version 1.2.0.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-18 12:02:41 -05:00
Brice Goglin
21d05db175 myri10ge: check that we can get an irq
Now that IRQ allocation is done in myri10ge_open(), we want to still
check when loading the driver that IRQ allocation could succeed later.

Additionaly, we fix the initialization and printing of netdev->irq.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-18 12:02:41 -05:00
Brice Goglin
6ebc087a10 myri10ge: make wc_fifo usage load-time tunable
Under some circumstances, using WC without the WC fifo is faster.
So we make it possible to tune wc_fifo with a module parameter.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-18 12:02:41 -05:00
Chris Lalancette
553af56775 8139cp: Don't blindly enable interrupts
Similar to this commit:

http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=d15e9c4d9a75702b30e00cdf95c71c88e3f3f51e

It's not safe in cp_start_xmit to blindly call spin_lock_irq and then
spin_unlock_irq, since it may very well be the case that cp_start_xmit
was called with interrupts already disabled (I came across this bug in
the context of netdump in RedHat kernels, but the same issue holds, for
example, in netconsole). Therefore, replace all instances of
spin_lock_irq and spin_unlock_irq with spin_lock_irqsave and
spin_unlock_irqrestore, respectively, in cp_start_xmit(). I tested this
against a fully-virtualized Xen guest using netdump, which happens to
use the 8139cp driver to talk to the emulated hardware. I don't have a
real piece of 8139cp hardware to test on, so someone else will have to
do that.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-18 11:47:22 -05:00
Larry Finger
10764889c6 [PATCH] bcm43xx: Fix failure to deliver PCI-E interrupts
The PCI-E modifications to bcm43xx do not set up the interrupt vector
correctly. Tested with BCM4311 (PCI-E) on x86_64 and BCM4306 (PCI) on i386.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-01-18 04:29:23 -05:00
Daniel Ritz
e176d397ad [PATCH] PCMCIA: fix drivers broken by recent cleanup
Setting .ConfigBase and .Present is now done at the pcmcia core.

The driver cleanup missed a few places where the driver did set .Present
to PRESENT_OPTION and later to the values from the CIS.  Setting to
PRESENT_OPTION now overrides the values from the CIS.  So just remove
those lines.

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2007-01-11 18:24:39 -08:00
Linus Torvalds
76a2f04788 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [TCP]: Fix iov_len calculation in tcp_v4_send_ack().
  [NETFILTER]: nf_conntrack_netbios_ns: fix uninitialized member in expectation
  [TG3]: Add PHY workaround for 5755M.
  [BNX2]: Update version and reldate.
  [BNX2]: Fix bug in bnx2_nvram_write().
  [BNX2]: Fix 5709 Serdes detection.
  [BNX2]: Don't apply CRC PHY workaround to 5709.
  NetLabel: correct CIPSO tag handling when adding new DOI definitions
  NetLabel: correct locking in selinux_netlbl_socket_setsid()
  [Bluetooth] Correct SCO buffer for Broadcom based Dell laptops
  [Bluetooth] Correct SCO buffer for Broadcom based HP laptops
  [Bluetooth] Correct SCO buffer size for another ThinkPad laptop
  [Bluetooth] Handle device registration failures
  [Bluetooth] Fix uninitialized return value for RFCOMM sendmsg()
  [Bluetooth] More checks if DLC is still attached to the TTY
  [Bluetooth] Add packet size checks for CAPI messages
  [X25]: Trivial, SOCK_DEBUG's in x25_facilities missing newlines
  [INET]: Fix incorrect "inet_sock->is_icsk" assignment.
2007-01-09 09:37:18 -08:00
Michael Chan
c1d2a1965a [TG3]: Add PHY workaround for 5755M.
Some PHY trim values need to be fine-tuned on 5755M to be
IEEE-compliant.

Update version to 3.72.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-01-09 00:30:06 -08:00
Michael Chan
d6aa4aceba [BNX2]: Update version and reldate.
Update version to 1.5.3.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-01-09 00:30:05 -08:00
Michael Chan
e6be763f63 [BNX2]: Fix bug in bnx2_nvram_write().
The bug was a bogus pointer being passed to kfree().  The pointer was
incremented in the write loop and then passed to kfree().

The fix is to use align_buf to save the original address.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-01-09 00:30:04 -08:00
Michael Chan
253c8b7554 [BNX2]: Fix 5709 Serdes detection.
5709 has a new register to detect copper/fiber PHYs.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-01-09 00:30:03 -08:00
Michael Chan
261dd5ca05 [BNX2]: Don't apply CRC PHY workaround to 5709.
The workaround is only needed on 5706/5708 and cannot be applied on
5709.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-01-09 00:30:02 -08:00
Komuro
77aab8bf22 pcnet_cs : add new id
pcnet_cs: add new id.
 corega K.K. (CG-LAPCCTXD)
 Logitec LPM-LN10TE

Signed-off-by: Komuro <komurojun-mbn@nifty.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-09 02:25:37 -05:00
Stephen Hemminger
ab3b1c7e82 chelsio: error path fix
Fix handling of allocation failure.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-09 02:24:37 -05:00
Ayaz Abdulla
f35723ec48 forcedeth: sideband management fix
This patch contains a fix that implements proper communication with the
sideband management unit. Also, it makes sure that the speed is
correctly set for gigabit phys in the case where sideband mgmt unit
initialized the phy. Refer to bug #7684 for more details.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-09 02:14:35 -05:00
Jeff Garzik
e6331173c8 Revert "[PATCH] e1000: disable TSO on the 82544 with slab debugging"
This reverts commit 72f3ab7462, which was
superceded by commit 683a2aa339
("e1000: Do not truncate TSO TCP header with 82544 workaround"), which
fixed the real problem.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-07 22:57:38 -05:00
Jeff Garzik
11897539a9 Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes 2007-01-07 22:44:56 -05:00
Ron Mercer
80b02e595c qla3xxx: Add delay to NVRAM register access.
When accessing the 93LC86 serial prom the clock high and low times must be at least 250ns each.  We have seen on some systems where the access times were much lower casing bit errors.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-07 22:37:36 -05:00
Ron Mercer
ca16497a75 qla3xxx: Remove NETIF_F_LLTX from driver features.
Driver TX locking was removed some time ago, but the flag was overlooked.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-07 22:37:35 -05:00
Jeff Garzik
81ebd49888 Merge branch 'upstream-fixes' of git://lost.foo-projects.org/~ahkok/git/netdev-2.6 into upstream-fixes 2007-01-07 22:33:56 -05:00
Aaron Salter
a3ffab8758 ixgb: Write RA register high word first, increment version
We need to disable the AV bit before flushing the low register.

Signed-off-by: <aaron.k.salter@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2007-01-06 09:51:41 -08:00
Jesse Brandeburg
dfd341e4e4 ixgb: Maybe stop TX if not enough free descriptors
A similar patch to commit 65c7973fa5
but now for ixgb.

Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2007-01-06 09:51:38 -08:00
Jesse Brandeburg
5d92785375 ixgb: Fix early TSO completion
This fix was already merged in commit 96f9c2e277
but reverted in commit 989316ddfe. After
stresstesting we found that the fix does not add new regressions and
works around a TX hang spotted by several users.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2007-01-06 09:51:23 -08:00
Benjamin Herrenschmidt
63ea998a26 [SUNGEM]: PHY updates & pause fixes (#2)
This patch adds support for a few more PHYs used by Apple and fixes
advertising and detecting of Pause (we were missing setting the bit in
MII_ADVERTISE and weren't testing in LPA for all PHYs).

Note that I currently only advertise pause, not asymetric pause. I
don't know for sure the details there, I suppose I should read a bit
more 802.3 references, and I don't now what sungem is capable of, but
I noticed the PCS code (originated from you) does the same.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-01-03 18:54:43 -08:00
Adrian Bunk
60903f2c66 [NET] drivers/net/loopback.c: convert to module_init()
This patch converts drivers/net/loopback.c to using module_init().

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-01-03 18:38:10 -08:00
dean gaudet
3136dcb3cd [NET]: ifb double-counts packets
Signed-off-by: dean gaudet <dean@arctic.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-01-03 18:38:08 -08:00
Zhu Yi
fe5f8e2a1c [PATCH] ipw2100: Fix dropping fragmented small packet problem
The rx_data.header struct is ieee80211_hdr_4addr. If a wireless frame uses
ieee80211_hdr_3addr header and is less than 6 bytes, it will be discarded.
This is not likely going to happen for normal packets (since there is TCP, IP
headers). But if fragmentation is used, there will be such small trailing
packets. And they will be lost for ever.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-01-02 20:56:26 -05:00
Linus Torvalds
6c722e90d7 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: (42 commits)
  r8169: extraneous Cmd{Tx/Rx}Enb write
  forcedeth: modified comment header
  NetXen: Reducing ring sizes for IOMMU issue.
  NetXen: Fix for PPC machines.
  NetXen: work queue fixes.
  NetXen: Link status message correction for quad port cards.
  NetXen: Multiple adapter fix.
  NetXen: Using correct CHECKSUM flag.
  NetXen: driver reload fix for newer firmware.
  NetXen: Adding new device ids.
  PHY probe not working properly for ibm_emac (PPC4xx)
  ep93xx: some minor cleanups to the ep93xx eth driver
  sky2: phy power down needs PCI config write enabled
  sky2: power management/MSI workaround
  sky2: dual port NAPI problem
  via-velocity uses INET interfaces
  e1000: Do not truncate TSO TCP header with 82544 workaround
  myri10ge: handle failures in suspend and resume
  myri10ge: no need to save MSI and PCIe state in the driver
  myri10ge: make msi configurable at runtime through sysfs
  ...
2006-12-29 10:03:54 -08:00
Francois Romieu
81f4e6c190 r8169: extraneous Cmd{Tx/Rx}Enb write
Checked in Realtek's driver, this one has no business being there.
The driver still works but there is a noticeable performance drop.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2006-12-26 23:28:02 +01:00
Ayaz Abdulla
87046e5062 forcedeth: modified comment header
This patch removes comment that forcedeth is not supported by NVIDIA.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:50:57 -05:00
Amit S. Kale
bd56c6b15e NetXen: Reducing ring sizes for IOMMU issue.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>

 netxen_nic.h |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:46:39 -05:00
Amit S. Kale
ed33ebe464 NetXen: Fix for PPC machines.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>

 netxen_nic.h      |    2 +-
 netxen_nic_init.c |   12 ++++++------
 netxen_nic_main.c |    4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:46:39 -05:00
Amit S. Kale
6c58664416 NetXen: work queue fixes.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>

 netxen_nic.h      |    3 +--
 netxen_nic_init.c |    2 +-
 netxen_nic_main.c |   15 +++++++--------
 3 files changed, 9 insertions(+), 11 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:46:05 -05:00
Amit S. Kale
d2378e8972 NetXen: Link status message correction for quad port cards.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>

 netxen_nic_isr.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:45:26 -05:00
Amit S. Kale
a379cb3c13 NetXen: Multiple adapter fix.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>

 netxen_nic.h      |    3 +--
 netxen_nic_main.c |   12 ------------
 2 files changed, 1 insertion(+), 14 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:45:26 -05:00
Amit S. Kale
c75e86b47f NetXen: Using correct CHECKSUM flag.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>

netxen_nic_hw.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:45:25 -05:00
Amit S. Kale
b0d541dbb9 NetXen: driver reload fix for newer firmware.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>

netxen_nic_main.c |    7 +++++++
 1 files changed, 7 insertions(+)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:45:25 -05:00
Amit S. Kale
0d39073484 NetXen: Adding new device ids.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>

netxen_nic_main.c |    2 ++
 1 files changed, 2 insertions(+)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:45:25 -05:00
Hynek Petrak
3e65bb94a9 PHY probe not working properly for ibm_emac (PPC4xx)
I have a system with AMCC PowerPC 405EP and PHY Intel LXT971A.  Linux
2.6.18.3 is not able to detect the PHY ID correctly.  The PHY ID
detected is 0, but should be 0x1d.

This is because phy_read() (__emac_mdio_read() resp.) from
drivers/net/ibm_emac/ibm_emac_core.c might return -ETIMEDOUT or
-EREMOTEIO on error.  This is ignored inside the

int mii_phy_probe(struct mii_phy *phy, int address)
from drivers/net/ibm_emac/ibm_emac_phy.c

as the return value is assigned to an u32 variable.

Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:41:08 -05:00
Yan Burman
ebf5112ca7 ep93xx: some minor cleanups to the ep93xx eth driver
Small cleanup in the Cirrus Logic EP93xx ethernet driver: Check for NULL
pointer before dereferencing it instead of after.  Remove unreferenced
variable.

Signed-off-by: Yan Burman <burman.yan@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:41:08 -05:00
Jeff Garzik
3a960f7e35 Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes 2006-12-26 16:38:31 -05:00
Stephen Hemminger
aed2cec45c sky2: phy power down needs PCI config write enabled
In order to change PCI registers (via the iomap'd window),
it needs to be enabled; this wasn't being done in sky2_phy_power
the function that turns on/off power to the PHY.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:36:42 -05:00
Stephen Hemminger
44ade17824 sky2: power management/MSI workaround
MSI doesn't work properly on resume on many platforms because the
BIOS goes and changes it back to INTx mode after the sky2 driver has
restored in resume.

It is really a bug in the base power management resume code, and
this workaround is temporary until the change to PM code works it's way
through the release process.  The PM fix is non-trivial since it needs
to change when non-boot CPU's are enabled.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:36:42 -05:00
Stephen Hemminger
25d82d7a2f sky2: dual port NAPI problem
Shutting down port 0 disables the NAPI poll used by both ports.
The long term fix will be to separate NAPI object from net device
until then just reenable if needed.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:36:42 -05:00
Randy Dunlap
ce9f7fe3c3 via-velocity uses INET interfaces
via-velocity doesn't build when CONFIG_INET=n:

drivers/built-in.o: In function `velocity_unregister_notifier':
via-velocity.c:(.text+0xe9b46): undefined reference to `unregister_inetaddr_notifier'
drivers/built-in.o: In function `velocity_init_module':
via-velocity.c:(.init.text+0xa027): undefined reference to `register_inetaddr_notifier'

I wanted to make this change in drivers/net/Kconfig, but
this isn't legal kconfig language:

 config VIA_VELOCITY
        tristate "VIA Velocity support"
        depends on NET_PCI && PCI
+       depends on INET if PM
        select CRC32
        select CRC_CCITT
        select MII

so fix it in via-velocity.c instead.
Builds with all 4 combinations of CONFIG_NET & CONFIG_PM.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:28:20 -05:00
Herbert Xu
683a2aa339 e1000: Do not truncate TSO TCP header with 82544 workaround
The e1000 driver has a workaround for 82544 on PCI-X where if the
terminating byte of a buffer is at addresses 0-3 mod 8, then 4 bytes
are shaved off it and defered to a new segment.  This is due to an
erratum that could otherwise cause TX hangs.

Unfortunately this breaks TSO because it may cause the TCP header to
be split over two segments which itself causes TX hangs.  The solution
is to pull 4 bytes of data up from the next segment rather than pushing
4 bytes off.  This ensures the TCP header remains in one piece and
works around the PCI-X hang.

This patch is based on one from Jesse Brandeburg.

This bug has been trigered by both CONFIG_DEBUG_SLAB as well as Xen.

Note that the only reason we don't see this normally is because the
TCP stack starts writing from the end, i.e., it writes the TCP header
first then slaps on the IP header, etc.  So the end of the TCP header
(skb->tail - 1 here) is always aligned correctly.

Had we made the start of the IP header (e.g., IPv6) 8-byte aligned
instead, this would happen for normal TCP traffic as well.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:28:20 -05:00
Brice Goglin
1a63e846a4 myri10ge: handle failures in suspend and resume
On suspend, handle pci_set_power_state errors, and on resume
handle failures in pci_resume_state().

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:28:20 -05:00
Brice Goglin
83f6e15245 myri10ge: no need to save MSI and PCIe state in the driver
The PCI MSI and express state are already saved and restored by the
current versions of pci_save_state/pci_restore_state.
Therefore it is no longer necessary for the driver to do it.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:28:20 -05:00
Brice Goglin
3621cec5b5 myri10ge: make msi configurable at runtime through sysfs
Now that IRQ are requested is called on open() and freed on close(),
we can safely switch from/to MSI without unloading the module.

We are guaranteed to correctly free IRQ even if the sysfs file got
written in the meantime since the MSI initialization is stored in
mgp->msi_enabled.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:28:20 -05:00
Brice Goglin
df30a740e4 myri10ge: move request_irq to myri10ge_open
Request IRQ in myri10ge_open() and free in close() instead of probe()
and remove() to eliminate potential race between the watchdog and the
interrupt handler. Additionaly, the interrupt handler won't get called
on shared irq anymore when the interface is down.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:28:20 -05:00
Brice Goglin
7adda30c82 myri10ge: match number of save_state and restore
Since pci_save_state() pushes MSI and PCIe states on a kind of stack,
myri10ge saving the state in advance for parity recovery will push the
state again on the stack on suspend. This leads to some memory leak.
We add a couple additional calls to save_state and restore_state so
that we don't leak anymore.

For the future, we are thinking of a better way to recover from parity
error without using pci_save_state().

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:28:20 -05:00
Francois Romieu
a27993f3d9 r8169: use the broken_parity_status field in pci_dev
The former option is removed and platform code can now specify the
expected behavior.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:24:11 -05:00
Francois Romieu
d15e9c4d9a netpoll: drivers must not enable IRQ unconditionally in their NAPI handler
net/core/netpoll.c::netpoll_send_skb() calls the poll handler when
it is available. As netconsole can be used from almost any context,
IRQ must not be enabled blindly in the NAPI handler of a driver which
supports netpoll.

b57bd06655 fixed the issue for the
8139too.c driver.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:24:11 -05:00
Stephen Hemminger
92104e9480 netxen: remove private ioctl
The netxen driver includes a private ioctl that provides access
to functionality that is already available in other ways. The PCI
layer has application access hooks (see setpci), and the statistics
are available in ethtool/netstats.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:17:36 -05:00
Jesse Brandeburg
79f3d3996f [PATCH] e1000: No-delay link detection at interface up
Currently after an interface up, the link state is detected 2 seconds later
when the first watchdog timer runs. This patch changes that by triggering
the hardware to generate a link-change interrupt from the up() function
instead. This has the result that the link state gets detected immediately
and without races. This has the potential to speed up booting since a normal
distribution boot process waits for a link before DHCP is attempted.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:30 -05:00
Jeff Garzik
15e376b4ee e1000: 3 new driver stats for managability testing
Add 3 extra packet redirect counters for tracking purposes to make sure
we can test that all packets arrive properly.

Originally from Jesse Brandeburg <jesse.brandeburg@intel.com>,
rewritten to use feature flags by me.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:30 -05:00
Jesse Brandeburg
1f753861d2 [PATCH] e1000: Make the copybreak value a module parameter
Allow the user to vary the size that copybreak works. Currently cb is enabled
for packets < 256 bytes, but various tests indicate that this should be
configurable for specific use cases. In addition, this parameter allows us
to force never/always during testing to get full and predictable coverage of
both code paths.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:30 -05:00