aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-04-11Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller3-0/+3
Conflicts: drivers/net/stmmac/stmmac_main.c drivers/net/wireless/wl12xx/wl1271_cmd.c drivers/net/wireless/wl12xx/wl1271_main.c drivers/net/wireless/wl12xx/wl1271_spi.c net/core/ethtool.c net/mac80211/scan.c
2010-04-06Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller4-29/+40
Conflicts: drivers/net/bonding/bond_main.c drivers/net/via-velocity.c drivers/net/wireless/iwlwifi/iwl-agn.c
2010-04-03net: convert multicast list to list_headJiri Pirko1-6/+6
Converts the list and the core manipulating with it to be the same as uc_list. +uses two functions for adding/removing mc address (normal and "global" variant) instead of a function parameter. +removes dev_mcast.c completely. +exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for manipulation with lists on a sandbox (used in bonding and 80211 drivers) Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.hTejun Heo3-0/+3
percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-29netxen: fix interrupt for NX2031Amit Kumar Salecha1-9/+16
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> For NX2031, msix is supported from fw version > 3.4.336. This fw version check should take flash fw in consider instead of running fw or fw from file. Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-29netxen: fix fw load from fileAmit Kumar Salecha1-0/+10
Rarely: Fw file size can be unaligned to 8. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-29netxen: validate unified romimageRajesh K Borundia2-15/+140
Signed-off-by: Rajesh K Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Validate all sections of unified romimage, before accessing them, to avoid seg fault. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-29netxen: fix corner cases of firmware recoveryAmit Kumar Salecha1-0/+4
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> o DEV_NEED_RESET state was not handled during fw intialization phase. o nx_decr_dev_ref_cnt() can return error, if fail to grab pcie seamphore. Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-29netxen: fix tx csum statusSucheta Chakraborty1-0/+6
Kernel default tx csum function (ethtool_op_get_tx_csum) doesn't show correct csum status. It takes various FLAGS (NETIF_F_ALL_CSUM) in account to show tx csum status, which driver doesn't set while disabling tx csum. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-26netxen: update version to 4.0.73Amit Kumar Salecha1-2/+2
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-26netxen: added sanity check for pci mapAmit Kumar Salecha1-18/+27
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Return value of ioremap is not checked, NULL check added. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-26netxen: fix warning in ioaddr for NX3031 chipAmit Kumar Salecha1-6/+8
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> crb_intr_mask/crb_sts_consumer is predefined for NX2031 not for NX3031. For NX3031, these values get defined in rx context creation. Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-26netxen: fix bios version calculationAmit Kumar Salecha1-1/+1
Bios sub version from unified fw image is calculated incorrect. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-22netxen: The driver doesn't work on NX_P3_B1 so cause probe to fail.Eric W. Biederman1-2/+2
I haven't been able to get link up on a NX_P3_B1 since 2.6.31. The driver complains about a firmware hang instead. When I asked I was told rev 0x41 was a preproduction rev. So disable support in the driver so no one is surprised the code doesn't work. Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-26net: convert multiple drivers to use netdev_for_each_mc_addr, part5 V2Jiri Pirko1-12/+7
removed some needless checks and also corrected bug in lp486e (dmi was passed instead of dmi->dmi_addr) Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12net: use netdev_mc_count and netdev_mc_empty when appropriateJiri Pirko1-5/+5
This patch replaces dev->mc_count in all drivers (hopefully I didn't miss anything). Used spatch and did small tweaks and conding style changes when it was suitable. Jirka Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-03Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-1/+3
2010-02-03netxen: protect resource cleanup by rtnl lockAmit Kumar Salecha1-0/+2
o context resources can be in used, while resource cleanup is in progress, during fw recover. o Null pointer execption can occur in send_cmd_desc, if fw recovery module frees tx ring without rtnl lock. o Same applies to ethtool register dump. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-03netxen: fix tx timeout recovery for NX2031 chipAmit Kumar Salecha1-1/+1
For NX2031, first try to scrub interrupt before requesting firmware reset. Return statement was missing after scrubbbing interrupt. Signed-off-by: Vernon Mauery <vernux@us.ibm.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-15netxen: fix sparse warningAmit Kumar Salecha1-1/+1
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-15netxen: fix license headerAmit Kumar Salecha9-9/+9
GNU General Public License is in file "COPYING". Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-15netxen: fix endianness intr coalesceAmit Kumar Salecha1-5/+8
Before sending Interrupt coalesce parameters to device, convert them in little endian. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-15netxen: fix endianness read mac addressAmit Kumar Salecha3-5/+5
In netxen_read_mac_addr, mac_addr should be declared u64 instead of __le64, used by host only. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-10Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller5-138/+79
Conflicts: drivers/net/benet/be_cmds.h include/linux/sysctl.h
2010-01-08netxen: update version to 4.0.72Amit Kumar Salecha1-2/+2
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-08netxen: fix set mac addrAmit Kumar Salecha1-0/+3
o If tx and rx resources are not available, during set mac request. Then this request wont be passed to firmware and it will be added to driver mac list and will never make it to firmware. So if resources are not available, don't add it to driver mac list. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-08netxen: fix smatch warningAmit Kumar Salecha3-4/+3
o Fix pointless assignments Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-08netxen: fix tx ring memory leakAmit Kumar Salecha1-0/+2
o While unloading driver or resetting the context, tx ring was not getting free. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-07drivers/net/: use DEFINE_PCI_DEVICE_TABLE()Alexey Dobriyan1-1/+1
Use DEFINE_PCI_DEVICE_TABLE() so we get place PCI ids table into correct section in every case. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-03netxen: fix ethtool link testSucheta Chakraborty2-21/+10
o Fix ethtool link test for NX3031 chip. o Remove unused code from phy interrupt callback Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-03netxen: fix ethtool register dumpSucheta Chakraborty1-111/+59
o Dump registers such as tx ring and rx ring counter, firmware state, niu regs, etc. which can be useful for debugging purpose. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23netxen: fix unified fw size checkAmit Kumar Salecha1-1/+1
o Unified firmware image size can be < 1 MB Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23netxen: support pci error handlersAmit Kumar Salecha2-46/+150
o Support pci error detection and recovery. o Refactor suspend and resume code, to share with io_error_detected, and slot_reset callbacks o NX_NEED_AER device state added, to synchronize with firmware recovery. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23netxen: fix tx timeout recoveryAmit Kumar Salecha2-1/+6
o In case of tx timeout, firmare may be healthy, but some pci-func may see no response from it. Force firmware reset, if some pci-func explicitly requests so. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23netxen: minor suspend resume fixesAmit Kumar Salecha1-7/+9
o pci device should be disable at the end and it should be enable first. o Interface should be attached(netif_device_attach()) irrespective of its state. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-18netxen: use module parameter correctlyStephen Hemminger1-54/+3
Netxen driver is doing this bogus thing to create a control file. This fails if device doesn't exist, and overall is a bad way to do the module parameter. Rather than fix borked code, just rewrite. Just using a writeable module parameter of 0/1 is the correct way Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-08netxen: fix firmware type checkDhananjay Phadke1-1/+13
Unified firmware image may not contain MN type of firmware. Driver should fall back to NOMN firmware type instead of going to flash. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-08netxen:fix napi intr enable checkAmit Kumar Salecha1-2/+4
o netif_running() check for enabling interrupt at end of napi poll is not enough to cover firmwar recovery. Instead test __NX_DEV_UP bit. o Avoid re-entry into to netxen_nic_down() with __NX_DEV_UP bit check. Acked-by: Dhananjay Phadke <dhananjay.phadke@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-08netxen: protect device reset by rtnl_lockAmit Kumar Salecha1-8/+35
o To prevent race conditions with other reset events. During suspend/resume and firmware recovery, acquire rtnl_lock, while changing interface state. Acked-by: Dhananjay Phadke <dhananjay.phadke@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-03drivers/net: Move && and || to end of previous lineJoe Perches2-24/+24
Only files where David Miller is the primary git-signer. wireless, wimax, ixgbe, etc are not modified. Compile tested x86 allyesconfig only Not all files compiled (not x86 compatible) Added a few > 80 column lines, which I ignored. Existing checkpatch complaints ignored. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02netxen: fix failure cases for fw hang recoveryAmit Kumar Salecha1-11/+15
Handle few corner cases in firmware hang detection and recovery: o Don't mark device state as READY, till handshake with firmware is done. o During probe, if start_firmware fails, restore reference count. o Don't increment refernce count, if start_firmware fails during firmware reset. o Clear __NX_RESETTING bit, incase of fatal error or tempeature reaches critical limit so that pci remove() doesn't poll on this bit. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02netxen : fix debug tools access for NX2031Narender Kumar1-19/+44
Driver maps only some part of the MMIO bar 0 in case of NX2031. This is sufficient for tx and rx by the driver. When debug tools need to access resources in unmapped regions, driver needs to map these on the fly in order to complete read/write request. Signed-off-by: Narender Kumar <narender.kumar@qlogic.com> Signed-off-by: Dhananjay Phadke <dhananjay.phadke@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29netxen: fix merge 9b963e5d0e01461099aAmit Kumar Salecha1-0/+2
Patch "fix memory initialization:5d521fd36de4e61" didn't got merge. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller4-15/+48
Conflicts: drivers/ieee802154/fakehard.c drivers/net/e1000e/ich8lan.c drivers/net/e1000e/phy.c drivers/net/netxen/netxen_nic_init.c drivers/net/wireless/ath/ath9k/main.c
2009-11-21netxen : fix BOND_MODE_TLB/ALB mode.Narender Kumar3-4/+8
o Along with netdev->perm_addr, mac address will be maintained in device private structure. o Device limitation: We need to set mac address when ever interface comes up. In ALB/TAL mode, bonding driver calls set_mac for all slave with bond mac address. But bonding driver set netdev->dev_addr field to its original value, after enslaving interfaces. When ever active slave changes, it swap dev_addr of inactive slave with active. Yet it doesn't notify driver about change in netdev->dev_addr. As netxen driver need to set mac addr when ever interface comes up, it can't rely on netdev->dev_addr field. Specially in case of bonding mode ALB/TLB. Signed-off-by: Narender Kumar <narender.kumar@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-21netxen: fix promisc for NX2031.Narender Kumar2-11/+40
Kernel crashes, if promisc mode set without disabling rx queue. Before changing mode in NX2031 chip, wait till rx queue drains. Signed-off-by: Narender Kumar <narender.kumar@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-21netxen: fix memory initializationAmit Kumar Salecha1-0/+2
Avoid resetting memory during initialization, skip this memory block during driver probe. Signed-off-by: Amit Kumar Salecha <amit@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-20netxen: remove PCI IDs of CNA deviceAmit Kumar Salecha1-6/+0
Remove PCI vendor and device IDs for QLE8240 and QLE8242 CNA devices. CNA devices will have separate driver. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28netxen: update version to 4.0.65Dhananjay Phadke1-2/+2
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28netxen: module firmware hintsDhananjay Phadke3-1/+15
Add MODULE_FIRMWARE hints for various firmware file types, required by different chip revisions. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>