Commit Graph

78748 Commits

Author SHA1 Message Date
Divy Le Ray
23561c9447 cxgb3 - fix interaction with pktgen
Do not use skb->cb to stash unmap info,
save the info to the descriptor state.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:09 -08:00
Divy Le Ray
273fa9042c cxgb3 - FW upgrade
Bump up FW version to 5.0.
Do not downgrade FW within the same major version range.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:09 -08:00
Divy Le Ray
91a6b50cf6 cxgb3 - Add EEH support
Add PCI recovery support

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:08 -08:00
Divy Le Ray
67d92ab765 cxgb3 - Fix resources release.
Remove sysfs entries before unregistering the net devices.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:07 -08:00
Divy Le Ray
678771d6f5 cxgb3 - Use wild card for PCI subdevice ID match
Subdevice ID is not necessarily set to 1.
Use wild card for PCI device matching

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:07 -08:00
Divy Le Ray
42256f57d8 cxgb3 - fix MSI-X failure path
Return error code when msi-x settings fail.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:06 -08:00
Jeff Garzik
cba0516ddb [netdrvr] checkpatch cleanups
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-28 15:04:05 -08:00
Jeff Garzik
93a3b607e6 wireless: checkpatch cleanups
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-28 15:04:04 -08:00
Jeff Garzik
092427be8c drivers/net/r6040: fix obvious problems (but more remain)
- checkpatch fixes

- fix bogus and uninitialized return codes in r6040_start_xmit()

- netdev_get_settings() fix obvious locking bug flagged by compiler warning

- set DMA consistent mask

- remove unnecessary setting of dev->base_addr

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-28 15:04:03 -08:00
Jeff Garzik
4790654c71 [netdrvr] netxen: checkpatch fixes (98% trim trailing whitespace)
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-28 15:04:02 -08:00
Peter Korsgaard
ba734f349d dm9601: Consolidate common parts of dm_write_*_async
dm_write_async and dm_write_reg_async are almost identical.
Move common functionality to dm_write_async_helper (saves ~256b).

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:01 -08:00
Alan Cox
9ce6cf2553 slip: Drag kicking and screaming into coding style compliance
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:01 -08:00
Alan Cox
a35f5de776 3c501: Bring into compliance with the coding style
3c501 leads the way... 8)

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:00 -08:00
Adrian Bunk
68d579fb93 drivers/net/chelsio/: #if 0 unused functions
This patch #if 0's the following unused functions:
- espi.c:t1_espi_set_misc_ctrl()
- sge.c:t1_sched_set_max_avail_bytes()
- sge.c:t1_sched_set_drain_bits_per_us()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:59 -08:00
Joe Perches
2450022afa drivers/net: Add missing "space"
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:59 -08:00
Joe Perches
60403fdada drivers/net/sk98lin: Add missing "space"
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:58 -08:00
Joe Perches
93ab8e84de drivers/net/wan: Add missing "space"
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:57 -08:00
Joe Perches
5bc51424b4 drivers/net/netxen: Add missing "space"
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:56 -08:00
Joe Perches
8c5863a406 drivers/net/ixgb: Add missing "space"
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:55 -08:00
Joe Perches
f07b2e403b drivers/net/cxgb3: Add missing "space"
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:55 -08:00
Joe Perches
3106752768 drivers/net/chelsio: Add missing "space"
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:54 -08:00
Eliezer Tamir
a2fbb9ea23 add bnx2x driver for BCM57710
Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:03:53 -08:00
Sreenivasa Honnur
faa4f7969f [S2IO]: Support for add/delete/store/restore ethernet addresses
- Support to add/delete/store/restore 64 and 128 Ethernet addresses for Xframe I and Xframe II respectively.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:03:52 -08:00
Patrick McHardy
db0ce50d37 [E1000]: Secondary unicast address support
Add support for configuring secondary unicast addresses. Unicast
addresses take precendece over multicast addresses when filling
the exact address filters to avoid going to promiscous mode.
When more unicast addresses are present than filter slots,
unicast filtering is disabled and all slots can be used for
multicast addresses.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:03:51 -08:00
Joe Perches
2a88719197 [E1000E]: convert register test macros to functions
Add functions for reg_pattern_test and reg_set_and check
Changed macros to use these functions

Compiled x86, untested

Size decreased ~2K

old:

$ size drivers/net/e1000e/ethtool.o
   text    data     bss     dec     hex filename
  14461       0       0   14461    387d drivers/net/e1000e/ethtool.o

new:

$ size drivers/net/e1000e/ethtool.o
   text    data     bss     dec     hex filename
  12498       0       0   12498    30d2 drivers/net/e1000e/ethtool.o

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:03:51 -08:00
Joe Perches
7e64300a0f [E1000]: Convert regtest macro's to functions
Minimal macro to function conversion in e1000_ethtool.c

Adds functions reg_pattern_test and reg_set_and_check
Changes REG_PATTERN_TEST and REG_SET_AND_CHECK macros
to call these functions.

Saves ~2.5KB

Compiled x86, untested (no hardware)

old:

$ size drivers/net/e1000/e1000_ethtool.o
   text    data     bss     dec     hex filename
  16778       0       0   16778    418a drivers/net/e1000/e1000_ethtool.o

new:

$ size drivers/net/e1000/e1000_ethtool.o
   text    data     bss     dec     hex filename
  14128       0       0   14128    3730 drivers/net/e1000/e1000_ethtool.o

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:03:50 -08:00
Auke Kok
ef90e4eca9 [E1000]: update netstats traffic counters realtime
formerly e1000/e1000e only updated traffic counters once every
2 seconds with the register values of bytes/packets. With newer
code however in the interrupt and polling code we can real-time
fill in these values in the netstats struct for users to see.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:03:49 -08:00
Auke Kok
4198869277 [E1000E]: update netstats traffic counters realtime
formerly e1000/e1000e only updated traffic counters once every
2 seconds with the register values of bytes/packets. With newer
code however in the interrupt and polling code we can real-time
fill in these values in the netstats struct for users to see.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:03:49 -08:00
Jay Vosburgh
9a6c686799 [BONDING]: Documentation update
Update the bonding documentation: more discussion on
initialization and configuration, changes to discussion of packet
reordering in balance-rr, update some out of date information.

	Based in part on input from Rick Jones <rick.jones2@hp.com>
and Andy Gospodarek <andy@greyhouse.net>.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Acked-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:03:48 -08:00
Sten Wang
7a47dd7a2f [NET]: Add support for the RDC R6040 Fast Ethernet controller
This patch adds support for the RDC R6040 MAC we can find in the RDC
R-321x System-on-chips.

Signed-off-by: Sten Wang <sten.wang@rdc.com.tw>
Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
2008-01-28 15:03:47 -08:00
David Acker
7734f6e6bc Fix e100 on systems that have cache incoherent DMA
On the systems that have cache incoherent DMA, including ARM, there
is a race condition between software allocating a new receive buffer
and hardware writing into a buffer.  The two race on touching the last
Receive Frame Descriptor (RFD).  It has its el-bit set and its next
link equal to 0.  When hardware encounters this buffer it attempts to
write data to it and then update Status Word bits and Actual Count in
the RFD.  At the same time software may try to clear the el-bit and
set the link address to a new buffer.

Since the entire RFD is once cache-line, the two write operations can
collide.  This can lead to the receive unit stalling or interpreting
random memory as its receive area.

The fix is to set the el-bit on and the size to 0 on the next to last
buffer in the chain.  When the hardware encounters this buffer it stops
and does not write to it at all.  The hardware issues an RNR interrupt
with the receive unit in the No Resources state.  Software can write
to the tail of the list because it knows hardware will stop on the
previous descriptor that was marked as the end of list.

Once it has a new next to last buffer prepared, it can clear the el-bit
and set the size on the previous one.  The race on this buffer is safe
since the link already points to a valid next buffer and the software
can handle the race setting the size (assuming aligned 16 bit writes
are atomic with respect to the DMA read). If the hardware sees the
el-bit cleared without the size set, it will move on to the next buffer
and skip this one.  If it sees the size set but the el-bit still set,
it will complete that buffer and then RNR interrupt and wait.

Signed-off-by: David Acker <dacker@roinet.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:46 -08:00
Francois Romieu
3627947e84 sundance: SIOCDEVPRIVATE pollution
To quote one of my favorite contemporary author:
[include/linux/sockios.h]
 *      THESE IOCTLS ARE _DEPRECATED_ AND WILL DISAPPEAR IN 2.5.X -DaveM
 */

#define SIOCDEVPRIVATE  0x89F0  /* to 89FF */

[...]

Gentoo's snmpd trips up over this code when trying to figure if the driver
supports the non-SIOCDEVPRIVATE API or not.  One can argue over its choice
of heuristic but there no reason to make ioctl more ugly than needed.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Jesse Huang <jesse@icplus.com.tw>
Tested-by: Volker Sauer <vsauer@dvs.tu-darmstadt.de>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:46 -08:00
Adrian Bunk
993fb90c5b drivers/net/netxen/: cleanups
This patch contains the following cleanups:
- static functions in .c files shouldn't be marked inline
- make needlessly global code static
- #if 0 unused code

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:45 -08:00
Auke Kok
3957d63da0 ixgbe: Fix copper PHY initialization code
While cleaning up the internal API focussing on Fiber and CX4 code
we found that I had broken the copper PHY initialization code. This
patch restores the PHY-specific code. This is mostly uninteresting
since no copper PHY boards are yet available. The changes have been
tested against Fiber only as I do not even have copper PHY versions
of 82598 macs.

This change actually cleans up the API code a bit more and we
lose some initialization code. A few PHY link detection helper
lines of code have been snuck into this patch, as well as a
read flush where it was suspected that this might cause issues.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:44 -08:00
Auke Kok
040babf9d8 e1000/e1000e: Move PCI-Express device IDs over to e1000e
e1000e will from now on support the PCI-Express adapters that
previously were supported by e1000. This support means better
performance and easier debugging from now on for both the old
PCI-X/PCI hardware and PCI-Express adapters.

This patch also moves 3 recently merged device IDs over to e1000e
that are identical to quad-port versions of already existing
dual port versions. With this last bit every former e1000 pci-e
device should work now with e1000e.

Here is a brief list of which gigabit driver to use with which
adapter:

  e1000:
	82540 -> 82547

  e1000e:
	82571 -> 82573
	ich8, ich9       (82562 or 82566)
	es2lan           (80003eslan)

  igb: (not yet merged, only available from e1000.sf.net)
	82575

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:43 -08:00
Auke Kok
1eae4eb2a1 e1000e: Disable L1 ASPM power savings for 82573 mobile variants
L1 ASPM link (pci-e link power savings) has significant benefits
(~1W savings when link is active) but unfortunately does not work
correctly on any of the chipsets that have 82573 on mobile platforms
which causes various nuisances:
 - eeprom reads return garbage information leading to bad eeprom
   checksums
 - long ping times (up to 2 seconds)
 - complete system hangs (freeze/lockup)

A lot of T60 owners have been plagued by this, but other mobile
solutions also suffer from these symptoms.

Disabling L1 ASPM before we activate the PCI-E link fixes all of
these issues at the cost of some power consumption.

Remove a workaround RDTR adjustment that is no longer needed with
this new one.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:43 -08:00
Bill Hayes
93ca161027 e1000e: alternate MAC address support
Port alternate MAC address support from the sourceforge
e1000 driver to the upstream e1000e driver.

Signed-off-by: Bill Hayes <bill.hayes@hp.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:42 -08:00
Jeff Garzik
3df5920c46 [netdrvr] ibmlana: move away from legacy MCA API
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-28 15:03:41 -08:00
Jeff Garzik
fbe02d6d87 [netdrvr] ibmlana: modularization cleanup
* move alloc_netdev() call, register_netdev() call, and associated failure
  cleanup into ibmlana_probe()

* move per-net_device cleanup into ibmlana_remove_one()

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-28 15:03:40 -08:00
Jeff Garzik
28fc1f5a0c [netdrvr] irq handler minor cleanups in several drivers
* use irq_handler_t where appropriate

* no need to use 'irq' function arg, its already stored in a data struct

* rename irq handler 'irq' argument to 'dummy', where the function
  has been analyzed and proven not to use its first argument.

* remove always-false "dev_id == NULL" test from irq handlers

* remove pointless casts from void*

* declance: irq argument is not const

* add KERN_xxx printk prefix

* fix minor whitespace weirdness

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-28 15:03:40 -08:00
Jeff Garzik
1b36efe07f hamradio/scc: kill unnecessary use of 'irq' function arg
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-28 15:03:39 -08:00
Alejandro Martinez Ruiz
ef878b8899 sk98lin: kill bogus check and convert to use ARRAY_SIZE()
This converts uses of ARRAY_SIZE(), and while at it also kills
unreachable code as far as I can say. I can't tell what was the author
trying to do with the following check. First we have:

PNMI_STATIC const SK_PNMI_STATADDR
		StatAddr[SK_PNMI_MAX_IDX][SK_PNMI_MAC_TYPES];

and then a check goes like this:

if (SK_PNMI_MAX_IDX !=
   (sizeof(StatAddr) / (sizeof(SK_PNMI_STATADDR) * SK_PNMI_MAC_TYPES)))

with the second line being just ARRAY_SIZE(StatAddr), which will always
return SK_PNMI_MAX_IDX, rendering the check useless.

Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:38 -08:00
Alejandro Martinez Ruiz
c00acf46de netdev: ARRAY_SIZE() cleanups
Convert array size calculations to use ARRAY_SIZE().

Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:37 -08:00
Alejandro Martinez Ruiz
4c3616cdda netdev: use ARRAY_SIZE() instead of sizeof(array) / ETH_GSTRING_LEN
Using ARRAY_SIZE() on arrays of the form array[][K] makes it unnecessary
to know the value of K when checking its size.

Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:36 -08:00
Roel Kluin
f59d978275 wireless: fix '!x & y' typo's
Fix priority mistakes similar to '!x & y'

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:35 -08:00
Holger Schurig
9f9dac281b libertas: move wlan_*_association_work from header to c file
Move wlan_postpone_association_work() and wlan_cancel_association_work()
from a assoc.h file to the sole user, into wext.c.

Renamed those two functions to to libertas_XXX as well.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:34 -08:00
Jes Sorensen
49df2b3347 iwlwifi: disable interrupts before calling request_irq
Disable interrupts in the iwl4965 before calling request_irq() for
the case that the previous OS or the BIOS left a pending interrupt in
the chip. This behavior has been observed on some laptops such as T61
Thinkpads and Toshiba Portege R500

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:34 -08:00
Dmitry Torokhov
eb76bf29dd P54: use temporary variables to reduce size of generated code
When there are 2 linked structures, using a temporary variable to hold a pointer
to the often used structure usually produces better code (smaller and faster)
since compiler does not have to constantly re-fetch data from the first structure.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:33 -08:00
Matthias Kaehlcke
1b34fd390c Prism54: Convert mgmt_sem to the mutex API
Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:32 -08:00
Dan Williams
1e3428e9e3 orinoco: more reliable scan handling
Bring scan result handling more in line with drivers like ipw.  Scan
results are aggregated and a BSS dropped after 15 seconds if no beacon
is received.  This allows the driver to interact better with userspace
where more than one process may request scans or results at any time.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:32 -08:00