aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/netxen/netxen_nic_main.c
AgeCommit message (Collapse)Author
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-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-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-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-11netxen_nic_main don't use deprecated irq flagsAndrew Morton
drivers/net/netxen/netxen_nic_main.c: In function 'netxen_nic_open': drivers/net/netxen/netxen_nic_main.c:738: warning: 'deprecated_irq_flag' is deprecated (declared at include/linux/interrupt.h:66) drivers/net/netxen/netxen_nic_main.c:738: warning: 'deprecated_irq_flag' is deprecated (declared at include/linux/interrupt.h:66) Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28NetXen: Port swap feature for multi port cardsMithlesh Thukral
NetXen: Port Swap feature This patch will allow a port numbers on the card to be swapped in host driver. This feature is applicable to cards having more than 1 port. Signed-off by: Milan Bag <mbag@netxen.com> Signed-off by: Mithlesh Thukral <mithlesh@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28NetXen: Multi PCI support for Quad cardsMithlesh Thukral
NetXen: Fix the multi PCI function for cards with more than 2 ports. This patch fixes the working of multi PCI capable driver on cards with more than 2 ports by adding the addresses for their rings and sizes. Signed-off by: Mithlesh Thukral <mithlesh@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28NetXen: Removal of redundant argument passingMithlesh Thukral
NetXen: Removal of redundant function call parameters and bug fixes. This patch will remove the redundant paramters which were being passed to many functions since now adapter->portnum can be used. Signed-off-by: Mithlesh Thukral <mithlesh@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28NetXen: Use multiple PCI functionsMithlesh Thukral
NetXen: Make driver use multiple PCI functions. This patch will make NetXen driver work with multiple PCI functions. This will make the usage of memory resources as well as interrupts more independent among different functions which results in better throughput. This change has been done after the multiport support is added in firmware. Signed-off by: Mithlesh Thukral <mithlesh@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-25[SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}Arnaldo Carvalho de Melo
To clearly state the intent of copying from linear sk_buffs, _offset being a overly long variant but interesting for the sake of saving some bytes. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-04-25[TCP]: Introduce tcp_hdrlen() and tcp_optlen()Arnaldo Carvalho de Melo
The ip_hdrlen() buddy, created to reduce the number of skb->h.th-> uses and to avoid the longer, open coded equivalent. Ditched a no-op in bnx2 in the process. I wonder if we should have a BUG_ON(skb->h.th->doff < 5) in tcp_optlen()... Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-25[IP]: Introduce ip_hdrlen()Arnaldo Carvalho de Melo
For the common sequence "skb->nh.iph->ihl * 4", removing a good number of open coded skb->nh.iph uses, now to go after the rest... Just out of curiosity, here are the idioms found to get the same result: skb->nh.iph->ihl << 2 skb->nh.iph->ihl<<2 skb->nh.iph->ihl * 4 skb->nh.iph->ihl*4 (skb->nh.iph)->ihl * sizeof(u32) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-02NetXen: Fix second rmmod failure observed on PowerPC machines.Linsys Contractor Mithlesh Thukral
Signed-off by: Mithlesh Thukral <mithlesh@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-02NetXen: Updates, removal of unsupported features and minor bug fixes.Linsys Contractor Mithlesh Thukral
Signed-off-by: Mithlesh Thukral <mithlesh@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27NetXen: Driver ifconfig fixAmit S. Kale
Signed-off-by: Amit S. Kale <amitkale@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27NetXen: Driver unload fixesAmit S. Kale
Signed-off-by: Amit S. Kale <amitkale@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-17Merge branch 'master' into upstreamJeff Garzik
2007-02-14[PATCH] Scheduled removal of SA_xxx interrupt flags fixupsThomas Gleixner
The obsolete SA_xxx interrupt flags have been used despite the scheduled removal. Fixup the remaining users. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Jeff Garzik <jeff@garzik.org> Cc: Wim Van Sebroeck <wim@iguana.be> Cc: Roland Dreier <rolandd@cisco.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Greg KH <greg@kroah.com> Cc: Dave Airlie <airlied@linux.ie> Cc: James Simmons <jsimmons@infradead.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-09NetXen: Fixes for ppc architecture.Amit S. Kale
NetXen: Fixes for ppc architecture. Signed-off-by: Amit S. Kale <amitkale@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-31netxen patchesAl Viro
Have fun. >From 24f4a1a77431575a9cdfaae25adda85842099f70 Mon Sep 17 00:00:00 2001 From: Al Viro <viro@zeniv.linux.org.uk> Date: Mon, 1 Jan 2007 15:22:56 -0500 Subject: [PATCH] netxen trivial annotations Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-01-23NetXen: Use pci_register_driver() instead of pci_module_init() in init_moduleAmit S. Kale
This will use pci_register_driver() instead of pci_module_init(). Signed-off-by: Amit S. Kale <amitkale@netxen.com> Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-29Merge branch 'upstream-linus' of ↵Linus Torvalds
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 * 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (42 commits) r8169: extraneous Cmd{Tx/Rx}Enb write forcedeth: modified comment header NetXen: Reducing ring sizes for IOMMU issue. NetXen: Fix for PPC machines. NetXen: work queue fixes. NetXen: Link status message correction for quad port cards. NetXen: Multiple adapter fix. NetXen: Using correct CHECKSUM flag. NetXen: driver reload fix for newer firmware. NetXen: Adding new device ids. PHY probe not working properly for ibm_emac (PPC4xx) ep93xx: some minor cleanups to the ep93xx eth driver sky2: phy power down needs PCI config write enabled sky2: power management/MSI workaround sky2: dual port NAPI problem via-velocity uses INET interfaces e1000: Do not truncate TSO TCP header with 82544 workaround myri10ge: handle failures in suspend and resume myri10ge: no need to save MSI and PCIe state in the driver myri10ge: make msi configurable at runtime through sysfs ...
2006-12-26NetXen: Fix for PPC machines.Amit S. Kale
Signed-off-by: Amit S. Kale <amitkale@netxen.com> netxen_nic.h | 2 +- netxen_nic_init.c | 12 ++++++------ netxen_nic_main.c | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26NetXen: work queue fixes.Amit S. Kale
Signed-off-by: Amit S. Kale <amitkale@netxen.com> netxen_nic.h | 3 +-- netxen_nic_init.c | 2 +- netxen_nic_main.c | 15 +++++++-------- 3 files changed, 9 insertions(+), 11 deletions(-) Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26NetXen: Multiple adapter fix.Amit S. Kale
Signed-off-by: Amit S. Kale <amitkale@netxen.com> netxen_nic.h | 3 +-- netxen_nic_main.c | 12 ------------ 2 files changed, 1 insertion(+), 14 deletions(-) Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26NetXen: driver reload fix for newer firmware.Amit S. Kale
Signed-off-by: Amit S. Kale <amitkale@netxen.com> netxen_nic_main.c | 7 +++++++ 1 files changed, 7 insertions(+) Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26NetXen: Adding new device ids.Amit S. Kale
Signed-off-by: Amit S. Kale <amitkale@netxen.com> netxen_nic_main.c | 2 ++ 1 files changed, 2 insertions(+) Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26netxen: remove private ioctlStephen Hemminger
The netxen driver includes a private ioctl that provides access to functionality that is already available in other ways. The PCI layer has application access hooks (see setpci), and the statistics are available in ethtool/netstats. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-07[netdrvr] netxen: workqueue-related build fixesJeff Garzik
2006-12-07Merge branch 'master' into upstreamJeff Garzik
Conflicts: drivers/net/netxen/netxen_nic.h drivers/net/netxen/netxen_nic_main.c
2006-12-05WorkQueue: Fix up arch-specific work items where possibleDavid Howells
Fix up arch-specific work items where possible to use the new work_struct and delayed_work structs. Three places that enqueue bits of their stack and then return have been marked with #error as this is not permitted. Signed-Off-By: David Howells <dhowells@redhat.com>
2006-12-04[PATCH] NetXen: multiport firmware support, ioctl interfaceAmit S. Kale
NetXen: 1G/10G Ethernet driver updates - Multiport and newer firmware support - ioctl interface for user level tools - Cast error fix for multiport Signed-off-by: Amit S. Kale <amitkale@netxen.com> netxen_nic.h | 281 +++++++++++++++++++++++++------- netxen_nic_ethtool.c | 12 - netxen_nic_hw.c | 429 +++++++++++++++++++++++++++++++++++++++++--------- netxen_nic_init.c | 301 ++++++++++++++++++++++++++++++----- netxen_nic_ioctl.h | 2 netxen_nic_isr.c | 3 netxen_nic_main.c | 260 ++++++++++++++++++------------ netxen_nic_niu.c | 22 +- netxen_nic_phan_reg.h | 228 ++++++++++++++++---------- 9 files changed, 1161 insertions(+), 377 deletions(-) Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-04[PATCH] NetXen: whitespace cleaup and more cleanup fixesAmit S. Kale
Signed-off-by: Amit S. Kale <amitkale@netxen.com> netxen_nic.h | 56 ++++++++++++++++++++-------------------------- netxen_nic_ethtool.c | 53 +++++++++++++++++++++----------------------- netxen_nic_hdr.h | 6 ++--- netxen_nic_hw.c | 54 +++++++++++++++++++++------------------------ netxen_nic_hw.h | 10 ++++---- netxen_nic_init.c | 61 +++++++++++++++++++++++++-------------------------- netxen_nic_ioctl.h | 6 ++--- netxen_nic_isr.c | 48 +++++++++++++++++----------------------- netxen_nic_main.c | 54 +++++++++++++++++---------------------------- netxen_nic_niu.c | 10 ++++---- 10 files changed, 165 insertions(+), 193 deletions(-) Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02[PATCH] NetXen: driver cleanup, removed unnecessary __iomem type castsAmit S. Kale
Signed-off-by: Amit S. Kale <amitkale@netxen.com> netxen_nic.h | 38 ++++++++------------------------------ netxen_nic_ethtool.c | 5 ++--- netxen_nic_hw.c | 12 +++++------- netxen_nic_main.c | 8 +++----- 4 files changed, 18 insertions(+), 45 deletions(-) Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02[PATCH] NetXen: temp monitoring, newer firmware support, mm footprint reductionAmit S. Kale
NetXen: 1G/10G Ethernet Driver updates - Temparature monitoring and device control - Memory footprint reduction - Driver changes to support newer version of firmware Signed-off-by: Amit S. Kale <amitkale@netxen.com> netxen_nic.h | 165 ++++++++++++++++++++++++++++++++-- netxen_nic_ethtool.c | 89 ++++++++++++------ netxen_nic_hdr.h | 71 +++++++++++++- netxen_nic_hw.c | 206 +++++++++++++++++++++++++++++-------------- netxen_nic_hw.h | 8 + netxen_nic_init.c | 239 +++++++++++++++++++++++++++++++++++++++++--------- netxen_nic_ioctl.h | 12 +- netxen_nic_isr.c | 54 +++++------ netxen_nic_main.c | 121 +++++++++++++++++-------- netxen_nic_niu.c | 172 +++++++++++++++++++++++++++-------- netxen_nic_phan_reg.h | 24 ++++- 11 files changed, 891 insertions(+), 270 deletions(-) Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02[PATCH] NetXen: Fixed /sys mapping between device and driverAmit S. Kale
Signed-off-by: Amit S. Kale <amitkale@netxen.com> netxen_nic_main.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02[netdrvr] netxen: build fixesJeff Garzik
Most contributed and Signed-off-by: Andrew Morton <akpm@osdl.org> with some from me as well. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02Add NetXen 1G/10G ethernet driver.Amit S. Kale
Signed-off-by: Amit S. Kale <amitkale@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>