Archived
14
0
Fork 0
Commit graph

3873 commits

Author SHA1 Message Date
Vitaly Bordug
5427828e83 [POWERPC] Fix kernel build errors for mpc8272ads and mpc8560ads
Recent update of asm-powerpc/io.h caused cpm-related stuff to break in the
current kernel. Current patch fixes it, as well as other inconsistencies
expressed, that do not permit targets from working properly:

- Updated dts with a chosen node with interrupt controller,
- fixed messed device IDs among CPM2 SoC devices,
- corrected odd header name and fixed type in defines,
- Added 82xx subdir to the powerpc/platforms Makefile, missed during
  initial commit,
- new solely-powerpc header file for 8260 family (was using one from
  arch/ppc, this one cleaned up from the extra stuff), in fact for now
  a placeholder to get the board-specific includes for stuff not yet
  capable to live with devicetree peeks only
- Fixed couple of misprints in reference mpc8272 dts.

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:20 +11:00
Robert P. J. Day
63c2f782e8 [POWERPC] Add "is_power_of_2" checking to log2.h.
Add the inline function "is_power_of_2()" to log2.h, where the value
zero is *not* considered to be a power of two.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:19 +11:00
Jiri Kosina
b7e36bfa9f NET: turn local_save_flags() + local_irq_disable() into local_irq_save()
drivers/net/amd8111e.c::amd8111e_poll() contains local_irq_disable() after
local_save_flags().  Turn it into local_irq_save().

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-06 19:10:34 -05:00
Jiri Kosina
0d38ff1d3d NET-3c59x: turn local_save_flags() + local_irq_disable() into local_irq_save()
drivers/net/3c59x.c::poll_vortex() contains local_irq_disable() after
local_save_flags().  Turn it into local_irq_save().

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-06 19:10:33 -05:00
Richard Knutsson
7e3e8b05a9 hp100: convert pci_module_init() to pci_register_driver()
Convert pci_module_init() to pci_register_driver().

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-06 19:10:33 -05:00
Amit S. Kale
27d2ab54bd NetXen: Added ethtool support for user level tools.
NetXen: Added ethtool support for user level firmware management utilities.

Signed-off-by: Amit S. Kale <amitkale@netxen.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-06 19:08:03 -05:00
Amit S. Kale
1fcca1a5fc NetXen: Firmware crb init changes.
NetXen: firmware crb init changes.

Signed-off-by: Amit S. Kale <amitkale@netxen.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-06 19:08:03 -05:00
Stephen Hemminger
a407a6a085 skge: version 1.10
Mark this as 1.10 because WOL now works

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-06 19:07:44 -05:00
Stephen Hemminger
a504e64ab4 skge: WOL support
Add WOL support for Yukon chipsets in skge device.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-06 19:07:44 -05:00
Stephen Hemminger
1479d13cb5 skge: use dev_printk
Use dev_printk related macros for PCI related errors and warnings

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-06 19:07:44 -05:00
Stephen Hemminger
fae8759228 skge: handle zero address at open
Some motherboards are broken and have no address set. Failing at probe time
prevents the device from ever being used (like to download a fixed BIOS). Instead
warn on probe and check again when device is brought up. That way the address
can be set.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-06 19:07:44 -05:00
Al Viro
a7bed27dc6 b44 endian annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-06 19:03:56 -05:00
Olof Johansson
f5cd787276 PA Semi PWRficient Ethernet driver
Driver for the PA Semi PWRficient on-chip Ethernet (1/10G)

Basic enablement, will be complemented with performance enhancements
over time. PHY support will be added as well.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:52 -05:00
Ralf Baechle
1ee6dd770b s2io: De-typedef driver.
Removed namespace collisions due to usage of nic_t as per Ralf's patch

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:52 -05:00
Sivakumar Subramani
a113ae066d s2io: Removed enabling of some of the unused interrupts.
Removed unused code in en_dis_able_nic_intrs(), TX_DMA_INTR, RX_DMA_INTR,
TX_XGXS_INTR, MC_INTR

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:52 -05:00
Sivakumar Subramani
372cc5972d s2io: Fixes in updating skb->truesize and code cleanup.
1. Fix for updating skb->truesize properly.
2. Disable NAPI only if more than one ring configured in case of MSI/MSI-X
   interrupts. Previously we were disabling NAPI irrespective of number of
   rings when MSI/MSI-X interrupts were used.
3. Code cleanup.

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:51 -05:00
Sivakumar Subramani
19a605220c S2IO: Fixes for reset and link handling.
1. Fix for reset and link handling.
2. Allow for promiscuos mode and multicast state be maintained through
   ifconfig up and down.
3. Support to print adapter serial number.

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:51 -05:00
Sivakumar Subramani
db874e65ae s2io: Making LRO and UFO as module loadable parameter.
This patch adds two load parameters napi and ufo. Previously NAPI was
compilation option with these changes wan enable disable NAPI using load
parameter. Also we are introducing ufo load parameter to enable/disable
ufo feature

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:51 -05:00
Krzysztof Halasa
7517c1b787 PC300too alternative WAN driver
The attached patch adds an alternative driver "pc300too" for PCI WAN
cards PC300/RSV and PC300/X21 made by Cyclades Corp. (now Avocent Corp).

Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:51 -05:00
Divy Le Ray
1d68e93d65 cxgb3 - Add dual licensing
Dual licensing, needed for OFED 1.2

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:51 -05:00
Divy Le Ray
a13fbee086 cxgb3 - Add <linux/mutex.h>
Include <linux/mutex.h> in adapter.h

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:51 -05:00
Divy Le Ray
f2aa52086f cxgb3 - Remove BUG_ON from t3b_intr_napi
In some cases, SG_DATA_INTR won't clear on read and the following
interrupt may cause us to assert because NAPI is already scheduled.
Remove the assertion, NAPI can handle attempts to rearm it while
it's already scheduled.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:51 -05:00
Divy Le Ray
f2c6879e06 cxgb3 - white space to tabs
Use tabs in comments.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:51 -05:00
Divy Le Ray
3b1d307b31 cxgb3 - Clean up HW init routine
Clean up the tp_config() routine.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:50 -05:00
Divy Le Ray
b5a44bcbf5 cxgb3 - bogus status error string
Remove a status error string from the pci-x context
and add it where it belongs - the pci-e context.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:50 -05:00
Divy Le Ray
6195c71d65 cxgb3 - remove SW Tx credits coalescing
Remove tx credit coalescing done in SW.
The HW is caring care of it already.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:50 -05:00
Divy Le Ray
14ab989245 cxgb3 - bind qsets on multiport adapter
Inform FW about the queue set->interface mapping.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:50 -05:00
Divy Le Ray
4aac389908 cxgb3 - FW versioning
Clean up FW version checking.
The supported FW version is now 3.1.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:49 -05:00
Andrew Morton
b9662d0e9c git-netdev-all: chelsio fix
Cc: "Sunil Naidu" <akula2.shark@gmail.com>
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:49 -05:00
Adrian Bunk
01243ecb79 remove one remaining "#define BCM_TSO 1"
Since it's no longer used, this "#define BCM_TSO 1" can now be removed.

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:49 -05:00
Ahmed S. Darwish
04b588d727 UCC Ether driver: kmalloc casting cleanups
A kmalloc casting cleanup patch.

Signed-off-by: Ahmed Darwish <darwish.07@gmail.com>
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:49 -05:00
shemminger@linux-foundation.org
7f60c64bd0 sky2: handle network device allocation failure
If alloc_etherdev() failed, then sky2_init_netdev will return NULL,
and sky2_probe would end up returning 0 instead of -ENOMEM.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:49 -05:00
shemminger@linux-foundation.org
2bf56fe25c sky2: software rx/tx stats
Maintain packet statistics in software rather than hardware.
This is slightly slower, but allows easier debugging of problems
where packets are still being received by PHY but not being handled
by hardware.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:49 -05:00
shemminger@linux-foundation.org
285e6ddd01 sky2: version 1.11.1
Version update to 1.11.1.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:49 -05:00
Ayaz Abdulla
21828163b2 forcedeth: statistics optimization
This patch optimizes the data paths that can support hw counters. It
removes the sw counted statistics.

This is the last patch for the optimization set. Bumping up version of
driver.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:48 -05:00
Ayaz Abdulla
57fff6986b forcedeth: statistics supported
This patch introduces hw statistics for older devices that supported it.
It breaks up the counters supported into separate versions.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:48 -05:00
Ayaz Abdulla
4e16ed1b0e forcedeth: tx max work
This patch adds a limit to how much tx work can be done in each
iteration of tx processing. If the max limit is reached, remaining tx
completions will be handled by timer interrupt.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:48 -05:00
Ayaz Abdulla
f0734ab658 forcedeth: irq data path optimization
This patch optimizes the irq data paths and cleans up the code.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:48 -05:00
Ayaz Abdulla
b01867cbd1 forcedeth: rx data path optimization
This patch optimizes the rx data paths and cleans up the code.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:48 -05:00
Ayaz Abdulla
445583b89d forcedeth: tx data path optimization
This patch optimizes the tx data paths and cleans up the code (removes
vlan from descr1/2 since only valid for desc3, changes to make code
easier to read, etc).

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:48 -05:00
Ayaz Abdulla
aaa37d2d09 forcedeth: tx limiting
This patch optimizes the logic for tx limiting. It adds a flag to check
on the completion side instead of recalculating the number of empty
slots. Also, it removes the fields that were previous used for limiting
since they have no value.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:48 -05:00
Ayaz Abdulla
86b22b0dfb forcedeth: optimized routines
This patch breaks up the routines into two versions, one for legacy
descriptor versions (ver 1 and ver 2) and one for desc ver 3. This will
make the new desc functions more leaner and further reductions will be
made in next few patches.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:48 -05:00
Jay Vosburgh
658f648ad1 bonding: update version
Update version number to reflect recent changes.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:47 -05:00
Jay Vosburgh
877cbd36b2 bonding: modify sysfs support to permit multiple loads
The existing code would blindly attempt to create the
bonding_masters file (in /sys/class/net) every time the module was
loaded.  When the module is loaded multiple times (which is the
historical method used by initscripts and sysconfig to create multiple
bonding interfaces), this caused load failure of the second module load
attempt, as the creation request would fail.

	This changes the code to note the failure, arrange to not remove
the bonding_masters file upon module exit, and then return success.

	Bonding interfaces created by the second or subsequent loads of
the module will not exist in bonding_masters.  This is not a significant
change, as previously only the interfaces from the most recent load of
the module would be listed.  Both situations are less than optimal, but
this case permits compatibility with existing distro configuration
scripts, and is consistent.

	Note that previously, the sysfs create request would overwrite
the exsting bonding_masters file and succeed, allowing multiple loads of
the module.  The sysfs code has recently changed to return an error if
the file being created already exists.

	Patrick McHardy <kaber@trash.net>, who reported this problem,
observed crashes on the old kernel (before sysfs checked for
duplicates).  I did not experience such crashes, but this change should
resolve them.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:47 -05:00
Jay Vosburgh
09c8927976 bonding: fix error check in sysfs creation
The existing code did not correctly handle failures to create
the per-interface sysfs group for bonding.

	Modified code to notice errors, and correctly unwind.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:47 -05:00
Jay Vosburgh
e4b91c4846 bonding: fix device name allocation error
The code to select names for the bonding interfaces was, for the
non-sysfs creation case, always using a hard-coded set of bond0, bond1,
etc, up to max_bonds.  This caused conflicts for the second or
subsequent loads of the module.

	Changed the code to obtain device names from dev_alloc_name().

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:47 -05:00
Akinobu Mita
bc63eb9c7e net: use bitrev8
Use bitrev8 for bmac, mace, macmace, macsonic, and skfp drivers.

[akpm@osdl.org: use the API, not the array]
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Mirko Lindner <mlindner@syskonnect.de>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:47 -05:00
Adrian Bunk
079ca7da1e bonding.h: "extern inline" -> "static inline"
"extern inline" generates a warning with -Wmissing-prototypes and I'm
currently working on getting the kernel cleaned up for adding this to
the CFLAGS since it will help us to avoid a nasty class of runtime
errors.

If there are places that really need a forced inline, __always_inline
would be the correct solution.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:47 -05:00
Ron Mercer
bd36b0ac5d qla3xxx: Add support for Qlogic 4032 chip.
Qlogic 4032 chip is an incremental change from the 4022.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:47 -05:00
Adrian Bunk
83d98b401c remove the broken OAKNET driver
The OAKNET driver:
- has been marked as BROKEN for more than two years 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>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:47 -05:00
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