summaryrefslogtreecommitdiff
path: root/drivers/net/netxen
AgeCommit message (Collapse)Author
2008-04-25Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (48 commits) net: Fix wrong interpretation of some copy_to_user() results. xfrm: alg_key_len & alg_icv_len should be unsigned [netdrvr] tehuti: move ioctl perm check closer to function start ipv6: Fix typo in net/ipv6/Kconfig via-velocity: fix vlan receipt tg3: sparse cleanup forcedeth: realtek phy crossover detection ibm_newemac: Increase MDIO timeouts gianfar: Fix skb allocation strategy netxen: reduce stack usage of netxen_nic_flash_print smc911x: test after postfix decrement fails in smc911x_{reset,drop_pkt} net drivers: fix platform driver hotplug/coldplug forcedeth: new backoff implementation ehea: make things static phylib: Add support for board-level PHY fixups [netdrvr] atlx: code movement: move atl1 parameter parsing atlx: remove flash vendor parameter korina: misc cleanup korina: fix misplaced return statement WAN: Fix confusing insmod error code for C101 too. ...
2008-04-25netxen: reduce stack usage of netxen_nic_flash_printHarvey Harrison
Don't need to keep a struct netxen_new_user_info on the stack when we only are interested in printing the serial_num. Change to only reading the serial_num. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-18net: Remove unnecessary inclusions of asm/semaphore.hMatthew Wilcox
None of these files use any of the functionality promised by asm/semaphore.h. It's possible that they rely on it dragging in some unrelated header file, but I can't build all these files, so we'll have fix any build failures as they come up. Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
2008-04-16#if 0 netxen_nic_link_ok()Adrian Bunk
This patch #if 0's the no longer used netxen_nic_link_ok(). Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16make netxen_workq staticAdrian Bunk
netxen_workq can now become static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-03-25netxen, phy/marvell, skge: minor checkpatch fixesJeff Garzik
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-03-25netxen: fix rx dropped statsDhananjay Phadke
Don't count rx dropped packets based on return value of netif_receive_skb(), which is misleading. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Tested-by: Vernon Mauery <mauery@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-25netxen: remove low level tx lockDhananjay Phadke
o eliminate tx lock in netxen adapter struct, instead pound on netdev tx lock appropriately. o remove old "concurrent transmit" code that unnecessarily drops and reacquires tx lock in hard_xmit_frame(), this is already serialized the netdev xmit lock. o reduce scope of tx lock in tx cleanup. tx cleanup operates on different section of the ring than transmitting cpus and is guarded by producer and consumer indices. This fixes a race caused by rx softirq preemption on realtime kernels. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Tested-by: Vernon Mauery <mauery@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-25netxen: napi and irq cleanupDhananjay Phadke
o separate and simpler irq handler for msi interrupts, avoids few checks than legacy mode. o avoid redudant tx_has_work() and rx_has_work() checks in interrupt and napi, which can uncork irq based on racy (lockless) access to tx and rx ring indices. If we get interrupt, there's sufficient reason to schedule napi. o replenish rx ring more often, remove self-imposed threshold rcv_free that prevents posting rx desc to card. This improves performance in low memory. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Tested-by: Vernon Mauery <mauery@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-25netxen: improve msi supportDhananjay Phadke
Recent netxen firmware has new scheme of generating MSI interrupts, it raises interrupt and blocks itself, waiting for driver to unmask. This reduces chance of spurious interrupts. The driver will be able to deal with older firmware as well. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Tested-by: Vernon Mauery <mauery@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28annotate netxenAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28NULL noise in drivers/netAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28[netdrvr] netxen: checkpatch fixes (98% trim trailing whitespace)Jeff Garzik
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-28drivers/net/netxen: Add missing "space"Joe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28drivers/net/netxen/: cleanupsAdrian Bunk
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-28netdev: use ARRAY_SIZE() instead of sizeof(array) / ETH_GSTRING_LENAlejandro Martinez Ruiz
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-12netxen: fix byte-swapping in tx and rxDhananjay Phadke
Here's the reworked patch. This cleans up some unnecessary byte-swapping while setting up tx and interpreting rx desc. The 64 bit rx status data should be converted to host endian format only once and the macros just need to extract bitfields. This saves a spate of interrupts on pseries blades caused by buggy (non) processing rx status ring. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-12netxen: optimize tx handlingdhananjay@netxen.com
netxen driver allows limited number of threads simultaneously posting skb's in tx ring. If transmit slot is unavailable, driver calls schedule() or loops in xmit_frame(). This patch returns TX_BUSY and lets the stack reschedule the packet if transmit slot is unavailable. Also removes unnecessary check for tx timeout in the driver itself, the network stack does that anyway. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-12netxen: stop second phy correctlydhananjay@netxen.com
This patch fixes bug that doesn't quiesce second port when interface is brought down, which could lead to unwarranted interrupt during rmmod / ifdown. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-12netxen: update driver versiondhananjay@netxen.com
Bumping up driver version to 3.4.18, several fixes have gone in since version 3.4.2. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-08[NETXEN]: Fix ->poll() done logic.David S. Miller
If work_done >= budget we should always elide the NAPI completion. Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-23[NETDRVR] lib82596, netxen: delete pointless tests from irq handlerJeff Garzik
Remove always-false tests in irq handler. Also a few other minor cleanups. Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-18unify DMA_..BIT_MASK definitions: v3.1Borislav Petkov
Remove redundant DMA_..BIT_MASK definitions across two drivers. The computation of the majority of the bitmasks is done by the compiler. The initial split of the patch touching each a different file got removed due to possible git bisect breakage. Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Muli Ben-Yehuda <muli@il.ibm.com> Cc: Jeff Garzik <jeff@garzik.org> Cc: James Bottomley <James.Bottomley@steeleye.com> Reviewed-by: Satyam Sharma <satyam@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-10netxen: ethtool fixesDhananjay Phadke
Resubmitting the patch. This patch improves ethtool support for printing correct ring statistics, segmentation offload status, etc. Signed-off by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10[netdrvr] Stop using legacy hooks ->self_test_count, ->get_stats_countJeff Garzik
These have been superceded by the new ->get_sset_count() hook. Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()Joe Perches
This is nicer than the MAC_FMT stuff. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[ETHTOOL] Provide default behaviors for a few ethtool sub-ioctlsJeff Garzik
For the operations get-tx-csum get-sg get-tso get-ufo the default ethtool_op_xxx behavior is fine for all drivers, so we permit op==NULL to imply the default behavior. This provides a more uniform behavior across all drivers, eliminating ethtool(8) "ioctl not supported" errors on older drivers that had not been updated for the latest sub-ioctls. The ethtool_op_xxx() functions are left exported, in case anyone wishes to call them directly from a driver-private implementation -- a not-uncommon case. Should an ethtool_op_xxx() helper remain unused for a while, except by net/core/ethtool.c, we can un-export it at a later date. [ Resolved conflicts with set/get value ethtool patch... -DaveM ] Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10drivers/net/: all drivers/net/ cleanup with ARRAY_SIZEDenis Cheng
Signed-off-by: Denis Cheng <crquan@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10[NET]: Nuke SET_MODULE_OWNER macro.Ralf Baechle
It's been a useless no-op for long enough in 2.6 so I figured it's time to remove it. The number of people that could object because they're maintaining unified 2.4 and 2.6 drivers is probably rather small. [ Handled drivers added by netdev tree and some missed IRDA cases... -DaveM ] Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[PATCH] drivers/net: remove superfluous memsetMariusz Kozlowski
This patch covers something like this: dev = alloc_*dev(... ... priv = netdev_priv(dev); memset(priv, 0, sizeof(*priv)); The memset() here is superfluous. alloc_netdev() uses kzalloc() to allocate needed memory so there is no need to zero the priv region twice. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10Clean up duplicate includes in drivers/net/Jesper Juhl
This patch cleans up duplicate includes in drivers/net/ Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Acked-by: "John W. Linville" <linville@tuxdriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10[NET]: Make NAPI polling independent of struct net_device objects.Stephen Hemminger
Several devices have multiple independant RX queues per net device, and some have a single interrupt doorbell for several queues. In either case, it's easier to support layouts like that if the structure representing the poll is independant from the net device itself. The signature of the ->poll() call back goes from: int foo_poll(struct net_device *dev, int *budget) to int foo_poll(struct napi_struct *napi, int budget) The caller is returned the number of RX packets processed (or the number of "NAPI credits" consumed if you want to get abstract). The callee no longer messes around bumping dev->quota, *budget, etc. because that is all handled in the caller upon return. The napi_struct is to be embedded in the device driver private data structures. Furthermore, it is the driver's responsibility to disable all NAPI instances in it's ->stop() device close handler. Since the napi_struct is privatized into the driver's private data structures, only the driver knows how to get at all of the napi_struct instances it may have per-device. With lots of help and suggestions from Rusty Russell, Roland Dreier, Michael Chan, Jeff Garzik, and Jamal Hadi Salim. Bug fixes from Thomas Graf, Roland Dreier, Peter Zijlstra, Joseph Fannin, Scott Wood, Hans J. Koch, and Michael Chan. [ Ported to current tree and all drivers converted. Integrated Stephen's follow-on kerneldoc additions, and restored poll_list handling to the old style to fix mutual exclusion issues. -DaveM ] Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-08-31netxen: fix crashes during module unloaddhananjay@netxen.com
This patch fixes two problems during driver unload. The pci_disable_device() call is before firmware reload, causing reads and writes across PCI bus after disabling device. Second problem is the register window was wrong during firmware reload Signed-off by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-31netxen: Avoid firmware load in PCI probedhananjay@netxen.com
Loading firmware during PCI probe can lead to incorrect initialization, rendering the card unusable until next reboot. This was introduced a while ago as a workaround for firmware bug, a better workaround was submitted for this a while ago. So removing original hack that loads firmware during probe. Signed-off by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-31[NET]: ethtool_perm_addr only has one implementationMatthew Wilcox
All drivers implement ethtool get_perm_addr the same way -- by calling the generic function. So we can inline the generic function into the caller and avoid going through the drivers. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-30netxen: drop redudant spinlockDhananjay Phadke
Some leftover code that makes use of adapter->lock in tx_timeout function, which resets the interface under this lock. In close() when the workqueue is flushed, prints the warning about sleeping with interrupts disabled (when spinlock debug is enabled). The lock was required with private netxen IOCTLs, which were removed a while ago. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-30netxen: Fix interrupt handling for multiport adaptersdhananjay@netxen.com
This patch fixes masking of interrupts on multiport adapters. Also disables interrupts upon ifdown interface. The wrong mask could result in interrupt flood after interface is down. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-30netxen: re-init station address after h/w initdhananjay@netxen.com
This is a workaround for firmware bug with 2nd port of multiport adapter, where MAC address is reset. Driver just needs to overwrite it with the value read from PROM. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-24netxen: Load firmware during probe, dma watchdog fix.dhananjay@netxen.com
The firmware should be loaded after resetting hardware during PCI probe, besides module unload. This fixes issue with 2nd port of multiport adapter on powerpc blades. This patch also fixes a bug that PCI resources are not freed if dma watchdog shutdown failed. The dma watchdog poll messages during module unload are also suppressed. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Milan Bag <mbag@netxen.com> Signed-off-by: Wen Xiong <wenxiong@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-11PCI: Change all drivers to use pci_device->revisionAuke Kok
Instead of all drivers reading pci config space to get the revision ID, they can now use the pci_device->revision member. This exposes some issues where drivers where reading a word or a dword for the revision number, and adding useless error-handling around the read. Some drivers even just read it for no purpose of all. In devices where the revision ID is being copied over and used in what appears to be the equivalent of hotpath, I have left the copy code and the cached copy as not to influence the driver's performance. Compile tested with make all{yes,mod}config on x86_64 and i386. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Acked-by: Dave Jones <davej@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-10netxen: deinline and sparse fixStephen Hemminger
Get rid of dubious casts to (void *) which causes a sparse warning. And move largeish function from inline to the one file that uses the code, the compiler can then decide to inline it. Compile tested only. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08drivers/net: fix comparisons of unsigned < 0Bill Nottingham
Recent gcc versions emit warnings when unsigned variables are compared < 0 or >= 0. Signed-off-by: Bill Nottingham <notting@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-02RESEND [PATCH 3/3] NetXen: Graceful teardown of interface and hardware upon ↵Dhananjay Phadke
module unload Resending patch 3/3 only. These changes allow driver close routine to be called during module unload, to clean-up buffers and other software resources, flush queues etc. Also, hardware is reset to pristine state. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Milan Bag <mbag@netxen.com> Signed-off-by: Wen Xiong <wenxiong@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-02RESEND [PATCH 2/3] NetXen: Support per PCI-function interrupt mask registersdhananjay.phadke@gmail.com
This patch updates the various access routines to access different control and status settings present in different register locations. This will fix problems related to working of different ports in multi Port card. Signed-off by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off by: Milan Bag <mbag@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-02RESEND [PATCH 1/3] NetXen: Fix issue of MSI not working correctlydhananjay.phadke@gmail.com
NetXen driver uses PCI function 0 to provide the functionality of MSI. The patch makes driver check the bus master bit for function 0 and enable it after the card initialization. Signed-off-by: Dhananjay Phadke<dhananjay@netxen.com> Signed-off-by: Milan Bag <mbag@netxen.com> Signed-off-by: Wen Xiong <wenxiong@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-06-12NetXen: Fix link status messagesMithlesh Thukral
NetXen: Fix incorrect link status even with switch turned OFF. NetXen driver failed to accurately indicate when a link is up or down. This was encountered during failover testing, when the first port indicated that the link was up even when the 10G switch it was assigned to in the Bladecenter was turned off completely. Signed-off by: Wen Xiong <wenxiong@us.ibm.com> Signed-off by: Mithlesh Thukral <mithlesh@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-06-09NetXen: Fix compile failure seen on PPC architectureMithlesh Thukral
NetXen: Add NETXEN prefixes to macros to clean them up. This is a cleanup patch which adds NETXEN prefix to some stand alone macro names. These posed compile errors when NetXen driver was backported to 2.6.9 on PPC architecture as macros like USER_START are defined in file arch/ppc64/mm/hash_utils.c Signed-off-by: Andy Gospodarek <andy@greyhouse.net> Signed-off by: Wen Xiong <wenxiong@us.ibm.com> Acked-off by: Mithlesh Thukral <mithlesh@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-06-09NetXen: Fix ping issue after reboot on Blades with 3.4.19 firmwareMithlesh Thukral
NetXen: Fix initialization and subsequent ping issue on 3.4.19 firmware This patch fixes the ping problem seen X/PBlades after the adapter's firmware was moved to 3.4.19. After configured interface up, ping failed. NetXen adapter couldn't accept ARP broadcast packet. Manual addition of MAC address in the ARP table, made ping work. NetXen adapter should finish initilization after system boot. But looks NetXen adapter didn't initilization correctly after system boot up. So have to re-load the firmware again in probe routine. Also re-initilization netxen_config_0 and netxen_config_1 registers. Signed-off by: Wen Xiong <wenxiong@us.ibm.com> Signed-off by: Mithlesh Thukral <mithlesh@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-06-03NetXen: Removal of extra free_irq callMithlesh Thukral
NetXen: Removal of redundant free_irq This patch removes a redundant free_irq() call from remove() routine. This will also eliminate a warning during unload of driver. Signed-by: Mithlesh Thukral <mithlesh@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-17NetXen: Fix NetXen driver ping on system-pMithlesh Thukral
NetXen: Fix for driver on System-p This patch will fix a ping issue on system-p Signed-off by: Milan Bag <mbag@netxen.com> Signed-off by: Adhiraj Joshi <adhiraj@netxen.com> Signed-by: Mithlesh Thukral <mithlesh@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>