Commit Graph

3761 Commits (6d24998f07588ca83ce04e60af5a79e805df7532)

Author SHA1 Message Date
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