aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen
Commit message (Collapse)AuthorAgeFilesLines
* netxen: fix tx csum statusSucheta Chakraborty2010-03-291-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>
* net: convert multiple drivers to use netdev_for_each_mc_addr, part5 V2Jiri Pirko2010-02-261-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>
* net: use netdev_mc_count and netdev_mc_empty when appropriateJiri Pirko2010-02-121-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>
* Merge branch 'master' of ↵David S. Miller2010-02-031-1/+3
|\ | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
| * netxen: protect resource cleanup by rtnl lockAmit Kumar Salecha2010-02-031-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>
| * netxen: fix tx timeout recovery for NX2031 chipAmit Kumar Salecha2010-02-031-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>
* | netxen: fix sparse warningAmit Kumar Salecha2010-01-151-1/+1
| | | | | | | | | | Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | netxen: fix license headerAmit Kumar Salecha2010-01-159-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>
* | netxen: fix endianness intr coalesceAmit Kumar Salecha2010-01-151-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>
* | netxen: fix endianness read mac addressAmit Kumar Salecha2010-01-153-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>
* | Merge branch 'master' of ↵David S. Miller2010-01-105-138/+79
|\ \ | |/ | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/benet/be_cmds.h include/linux/sysctl.h
| * netxen: update version to 4.0.72Amit Kumar Salecha2010-01-081-2/+2
| | | | | | | | | | Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * netxen: fix set mac addrAmit Kumar Salecha2010-01-081-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>
| * netxen: fix smatch warningAmit Kumar Salecha2010-01-083-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>
| * netxen: fix tx ring memory leakAmit Kumar Salecha2010-01-081-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>
| * netxen: fix ethtool link testSucheta Chakraborty2010-01-032-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>
| * netxen: fix ethtool register dumpSucheta Chakraborty2010-01-031-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>
* | drivers/net/: use DEFINE_PCI_DEVICE_TABLE()Alexey Dobriyan2010-01-071-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>
* | netxen: fix unified fw size checkAmit Kumar Salecha2009-12-231-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>
* | netxen: support pci error handlersAmit Kumar Salecha2009-12-232-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>
* | netxen: fix tx timeout recoveryAmit Kumar Salecha2009-12-232-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>
* | netxen: minor suspend resume fixesAmit Kumar Salecha2009-12-231-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>
* netxen: use module parameter correctlyStephen Hemminger2009-12-181-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>
* netxen: fix firmware type checkDhananjay Phadke2009-12-081-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>
* netxen:fix napi intr enable checkAmit Kumar Salecha2009-12-081-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>
* netxen: protect device reset by rtnl_lockAmit Kumar Salecha2009-12-081-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>
* drivers/net: Move && and || to end of previous lineJoe Perches2009-12-032-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>
* netxen: fix failure cases for fw hang recoveryAmit Kumar Salecha2009-12-021-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>
* netxen : fix debug tools access for NX2031Narender Kumar2009-12-021-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>
* netxen: fix merge 9b963e5d0e01461099aAmit Kumar Salecha2009-11-291-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>
* Merge branch 'master' of ↵David S. Miller2009-11-294-15/+48
|\ | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 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
| * netxen : fix BOND_MODE_TLB/ALB mode.Narender Kumar2009-11-213-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>
| * netxen: fix promisc for NX2031.Narender Kumar2009-11-212-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>
| * netxen: fix memory initializationAmit Kumar Salecha2009-11-211-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>
* | netxen: remove PCI IDs of CNA deviceAmit Kumar Salecha2009-11-201-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>
* | netxen: update version to 4.0.65Dhananjay Phadke2009-10-281-2/+2
| | | | | | | | | | Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | netxen: module firmware hintsDhananjay Phadke2009-10-283-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>
* | netxen: update module infoDhananjay Phadke2009-10-281-12/+6
| | | | | | | | | | | | | | Update module info with QLogic signature. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | netxen: add PCI IDs for new chipDhananjay Phadke2009-10-283-4/+8
| | | | | | | | | | | | | | | | Add PCI vendor and device IDs for QLE8240 and QLE8242 CNA devices. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | netxen: refactor indirect register accessDhananjay Phadke2009-10-281-39/+36
| | | | | | | | | | | | | | | | | | | | Refactor code to calculate and set indirect access window for control registers in 2MB address space (NX3031 or newer). Use void __iomem * data type for absolute pci addresses. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | netxen: support for new firmware file formatAmit Kumar Salecha2009-10-282-63/+278
| | | | | | | | | | | | | | | | | | | | | | Add support for extracting firmware from a unified file format which embeds firmware images for all chip revisions. Fallback to orginal file formats if new image is not found. Signed-off-by: Amit Kumar Salecha <amit@netxen.com> Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | netxen: fix builds for SYSFS=n or MODULES=nRandy Dunlap2009-10-281-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | When CONFIG_MODULES=n: drivers/net/netxen/netxen_nic_main.c:2751: error: dereferencing pointer to incomplete type drivers/net/netxen/netxen_nic_main.c:2764: error: dereferencing pointer to incomplete type Also needs addition of <linux/sysfs.h> for sysfs function prototypes or stubs when CONFIG_SYSFS=n. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'master' of ↵David S. Miller2009-10-274-16/+8
|\ \ | |/ | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/sh_eth.c
| * netxen: avoid undue board config checkDhananjay Phadke2009-10-221-10/+4
| | | | | | | | | | | | | | | | | | | | Old code assumed board config version in the flash to be 1. When this will get changed by tools, driver just refuses to attach. This is unnecessary since driver does not have to parse board config structure directly (maintained by firmware). Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * netxen: fix tx timeout handling on firmware hangAmit Kumar Salecha2009-10-221-0/+1
| | | | | | | | | | | | | | | | | | | | Clear NX_RESETING bit in netxen_tx_timeout_task() so that the firmware watchdog task can catch need_reset request from tx timeout. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * netxen: fix i2c initDhananjay Phadke2009-10-222-6/+3
| | | | | | | | | | | | | | | | Avoid resetting subsys ID in i2c block. Also remove duplicate check for address tranlsation error. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | netxen; update version to 4.0.62Dhananjay Phadke2009-10-171-2/+2
| | | | | | | | | | Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | netxen: sysfs control for auto firmware recoveryNarender Kumar2009-10-172-1/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | Firmware hang detection and recovery (reset) need to be disabled for diagnostic tools, which can run some disruptive tests. This adds a driver level control to turn off this feature by diag tools. Signed-off-by: Narender Kumar <narender.kumar@qlogic.com> Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | netxen: fix error codes in for tools accessDhananjay Phadke2009-10-172-24/+31
| | | | | | | | | | | | | | | | Use -EIO or -EINVAL as error codes, these can get passed up to applications (tools). Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | netxen: onchip memory access changeAmit Kumar Salecha2009-10-173-9/+17
| | | | | | | | | | | | | | | | | | | | Add support for different windowing scheme for on chip memory in future chip revisions. This is required by diagnostic tools. Signed-off-by: Amit Kumar Salecha <amit@netxen.com> Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>