Commit graph

45 commits

Author SHA1 Message Date
Dhananjay Phadke 2c6a3f7268 netxen: drop redudant spinlock
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-30 15:52:00 -04:00
dhananjay@netxen.com e01872af1d netxen: Fix interrupt handling for multiport adapters
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-30 15:51:59 -04:00
dhananjay@netxen.com 7eec517c44 netxen: re-init station address after h/w init
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-30 15:51:59 -04:00
dhananjay@netxen.com ceded32f09 netxen: Load firmware during probe, dma watchdog fix.
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-24 16:28:39 -04:00
Auke Kok 44c10138fd PCI: Change all drivers to use pci_device->revision
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-11 16:02:10 -07:00
Stephen Hemminger 4638aef1e2 netxen: deinline and sparse fix
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-10 12:41:09 -04:00
Dhananjay Phadke 96acb6eb8e RESEND [PATCH 3/3] NetXen: Graceful teardown of interface and hardware upon 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-02 08:24:52 -04:00
dhananjay.phadke@gmail.com 2d1a3bbdf2 RESEND [PATCH 2/3] NetXen: Support per PCI-function interrupt mask registers
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-02 08:24:52 -04:00
dhananjay.phadke@gmail.com 644caeefb3 RESEND [PATCH 1/3] NetXen: Fix issue of MSI not working correctly
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-07-02 08:24:52 -04:00
Mithlesh Thukral 3e2facef86 NetXen: Fix ping issue after reboot on Blades with 3.4.19 firmware
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-09 18:25:34 -04:00
Mithlesh Thukral 225c3837bb NetXen: Removal of extra free_irq call
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-06-03 11:45:47 -04:00
Andrew Morton 1c8e039a4b netxen_nic_main don't use deprecated irq flags
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-05-11 17:53:28 -04:00
Mithlesh Thukral 6c80b18df3 NetXen: Port swap feature for multi port cards
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-28 11:01:06 -04:00
Mithlesh Thukral 595e3fb8cf NetXen: Multi PCI support for Quad cards
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-28 11:01:05 -04:00
Mithlesh Thukral 13ba9c7714 NetXen: Removal of redundant argument passing
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-28 11:01:05 -04:00
Mithlesh Thukral 3176ff3ee7 NetXen: Use multiple PCI functions
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-28 11:01:05 -04:00
Arnaldo Carvalho de Melo d626f62b11 [SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}
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 22:28:23 -07:00
Arnaldo Carvalho de Melo ab6a5bb6b2 [TCP]: Introduce tcp_hdrlen() and tcp_optlen()
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 22:25:24 -07:00
Arnaldo Carvalho de Melo c9bdd4b525 [IP]: Introduce ip_hdrlen()
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-04-25 22:25:07 -07:00
Linsys Contractor Mithlesh Thukral e0e20a1a08 NetXen: Fix second rmmod failure observed on PowerPC machines.
Signed-off by: Mithlesh Thukral <mithlesh@netxen.com>

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-02 20:02:28 -05:00
Linsys Contractor Mithlesh Thukral 0c25cfe18a NetXen: Updates, removal of unsupported features and minor bug fixes.
Signed-off-by: Mithlesh Thukral <mithlesh@netxen.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-02 20:02:28 -05:00
Amit S. Kale b1adf031a1 NetXen: Driver ifconfig fix
Signed-off-by: Amit S. Kale <amitkale@netxen.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:16:04 -05:00
Amit S. Kale 9de0661066 NetXen: Driver unload fixes
Signed-off-by: Amit S. Kale <amitkale@netxen.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27 04:16:04 -05:00
Jeff Garzik f630fe2817 Merge branch 'master' into upstream 2007-02-17 15:11:43 -05:00
Thomas Gleixner 38515e908b [PATCH] Scheduled removal of SA_xxx interrupt flags fixups
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-14 08:09:54 -08:00
Amit S. Kale 9b41011724 NetXen: Fixes for ppc architecture.
NetXen: Fixes for ppc architecture.

Signed-off-by: Amit S. Kale <amitkale@netxen.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-09 16:09:46 -05:00
Al Viro a608ab9cb6 netxen patches
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-31 04:59:08 -05:00
Amit S. Kale 184231bdb4 NetXen: Use pci_register_driver() instead of pci_module_init() in init_module
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>
2007-01-23 01:02:11 -05:00
Linus Torvalds 6c722e90d7 Merge branch 'upstream-linus' of 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-29 10:03:54 -08:00
Amit S. Kale ed33ebe464 NetXen: Fix for PPC machines.
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-26 16:46:39 -05:00
Amit S. Kale 6c58664416 NetXen: work queue fixes.
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-26 16:46:05 -05:00
Amit S. Kale a379cb3c13 NetXen: Multiple adapter fix.
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-26 16:45:26 -05:00
Amit S. Kale b0d541dbb9 NetXen: driver reload fix for newer firmware.
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-26 16:45:25 -05:00
Amit S. Kale 0d39073484 NetXen: Adding new device ids.
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-26 16:45:25 -05:00
Stephen Hemminger 92104e9480 netxen: remove private ioctl
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-26 16:17:36 -05:00
Jeff Garzik 0bfdcc88df [netdrvr] netxen: workqueue-related build fixes 2006-12-07 06:30:07 -05:00
Jeff Garzik 8d1413b280 Merge branch 'master' into upstream
Conflicts:

	drivers/net/netxen/netxen_nic.h
	drivers/net/netxen/netxen_nic_main.c
2006-12-07 04:57:19 -05:00
David Howells 6d5aefb8ea WorkQueue: Fix up arch-specific work items where possible
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-05 19:36:26 +00:00
Amit S. Kale ed25ffa164 [PATCH] NetXen: multiport firmware support, ioctl interface
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 18:36:03 -05:00
Amit S. Kale 80922fbcb6 [PATCH] NetXen: whitespace cleaup and more cleanup fixes
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-04 18:36:03 -05:00
Amit S. Kale 71bd7877d4 [PATCH] NetXen: driver cleanup, removed unnecessary __iomem type casts
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 00:33:11 -05:00
Amit S. Kale cb8011ad53 [PATCH] NetXen: temp monitoring, newer firmware support, mm footprint reduction
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 00:16:36 -05:00
Amit S. Kale edf9016381 [PATCH] NetXen: Fixed /sys mapping between device and driver
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 00:16:36 -05:00
Jeff Garzik 1494a81410 [netdrvr] netxen: build fixes
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-02 00:12:02 -05:00
Amit S. Kale 3d396eb17e Add NetXen 1G/10G ethernet driver.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02 00:11:58 -05:00