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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
"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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>