aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen (follow)
AgeCommit message (Collapse)AuthorFilesLines
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>
2009-10-28netxen: update module infoDhananjay Phadke1-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>
2009-10-28netxen: add PCI IDs for new chipDhananjay Phadke3-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>
2009-10-28netxen: refactor indirect register accessDhananjay Phadke1-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>
2009-10-28netxen: support for new firmware file formatAmit Kumar Salecha2-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>
2009-10-28netxen: fix builds for SYSFS=n or MODULES=nRandy Dunlap1-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>
2009-10-27Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller4-16/+8
Conflicts: drivers/net/sh_eth.c
2009-10-22netxen: avoid undue board config checkDhananjay Phadke1-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>
2009-10-22netxen: fix tx timeout handling on firmware hangAmit Kumar Salecha1-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>
2009-10-22netxen: fix i2c initDhananjay Phadke2-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>
2009-10-17netxen; update version to 4.0.62Dhananjay Phadke1-2/+2
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-17netxen: sysfs control for auto firmware recoveryNarender Kumar2-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>
2009-10-17netxen: fix error codes in for tools accessDhananjay Phadke2-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>
2009-10-17netxen: onchip memory access changeAmit Kumar Salecha3-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>
2009-10-17netxen: reset sequence changesAmit Kumar Salecha3-29/+16
Future revisions need different chip reset sequence and firmware initialization. Also clean up some never used debug code. 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>
2009-10-17netxen: 128 memory controller supportAmit Kumar Salecha2-10/+53
Future revisions of the chip have 128 bit memory transactions. Require drivers to implement rmw in case of sub-128 bit accesses by driver. This is mostly used 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>
2009-10-17netxen: defines for next revisionAmit Kumar Salecha1-0/+2
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>
2009-10-13Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-1/+2
2009-10-13netxen: add sysfs entries for diag toolsDhananjay Phadke2-0/+188
Add sysfs entries to enable register and memory access for diagnostic 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>
2009-10-13netxen: separate register and memory access lockDhananjay Phadke5-42/+38
Since register and onboard memory access has separate window registers, they need not be kept under same lock. Also, memory is always accessed from process context (mostly for firmware init and diagnostic tools). Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13netxen: annotate register windowing codeDhananjay Phadke3-57/+51
Use common variables crb_win, ocm_win for all revisions of chip. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13netxen: add access to on chip memory for toolsDhananjay Phadke3-144/+112
Add access to on chip memory, this is used by debug and diagnostic tools only. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13netxen: remove sub 64-bit mem accessesAmit Kumar Salecha4-320/+196
Sub 64-bit / unaligned access to oncard memory was only used by old diagnostic tools, causes some intermittent issues when memory controller agent is used. The new access method was added by commit ea6828b8aa3a8ebae8d7740f32f212ba1d2f0742 ("netxen: improve pci memory access"). Firmware init anyway uses 8-byte strides. This also fixes address/offset calculation for NX2031 context memory (SIU). For NX3031, SIU uses same register offsets as packet memory (MIU). 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>
2009-10-13netxen: fix pci bar mappingDhananjay Phadke1-1/+2
Use resource_size_t for PCI resource remapping instead of unsigned long. Physical addresses can exceed range of long data type (e.g with PAE). Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-1/+1
2009-10-07netxen: Use the instance of net_device_stats from net_device.Ajit Khaparde2-3/+1
Since net_device has an instance of net_device_stats, we can remove the instance of this from the private adapter structure. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-07netxen: Fix Unlikely(x) > yRoel Kluin1-1/+1
The closing parenthesis was not on the right location. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-22netxen: fix firmware init after resumeDhananjay Phadke1-0/+1
After successful firmware init, return instead of falling to error path (leading to detach) after resuming to D0 state. This was broken in recent firmware reset rehaul. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-22netxen: fix minor tx timeout bugDhananjay Phadke1-4/+3
Fix minor bug in netdev tx timeout handling which could always lead to firmware reset instead of pci function reset. netxen_nic_reset_context() requires __NX_RESETTING bit cleared. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-11netxen: update copyrightDhananjay Phadke9-54/+9
o Add QLogic copyright, add linux-driver@qlogic.com to MAINTAINERS. o Delete old contact information. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-11netxen: fix tx timeout recoveryAmit Kumar Salecha3-13/+64
Redesign tx timeout handling in line with new firmware reset design that co-ordinates with other PCI function drivers. o For NX3031, first try to reset PCI function's own context before requesting firmware reset. o For NX2031, since firmware heartbit is not supported directly request firmware reset. 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>
2009-09-11netxen: fix file firmware leakDhananjay Phadke1-2/+3
Release file firmware when no firmware reset is required. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-11netxen: improve pci memory accessDhananjay Phadke3-266/+93
o Access on card memory through memory controller (agent) rather than moving small pci window around. Clean up the code for moving windows around. o Restrict memory accesss to 64 bit, currently only firmware download uses this. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-11netxen: change firmware write sizeAmit Kumar Salecha1-5/+12
Use 8 byte strides for firmware download into card memory since oncard memory controller needs 8 byte (64 bit) accesses. This avoids unnecessary rmw cycles. 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>
2009-09-11netxen: build fix for INET=nRandy Dunlap1-0/+4
When CONFIG_INET is disabled, netxen has a build failure: netxen_nic_main.c:(.text+0x118fd1): undefined reference to `netxen_config_indev_addr' so make that function just an empty stub when CONFIG_INET=n. (not "inline" since that conflicts with other declarations of it) 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>
2009-09-09netxen: fix tx descriptor structureAmit Kumar Salecha1-2/+2
Fix the offset of vlan_TCI field in cmd_desc_type0. Signed-off-by: Amit Kumar Salecha <amit@qlogic.com> Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-09netxen: fix check for ip addr hashing supportAmit Kumar Salecha1-1/+1
Fix typo in checking dest ip has support before programming destip addresses. 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>
2009-09-07netxen: update version to 4.0.50Dhananjay Phadke1-2/+2
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-07netxen: refactor firmware info codeDhananjay Phadke3-103/+98
o Combine netxen_get_firmware_info(), netxen_check_options() so that they are updated every time firmware is reset. o Set dma mask everytime firmware is reset. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-07netxen: pre calculate register addressesAmit Kumar Salecha6-191/+210
For registers accessed in fast path (interrupt / softirq) avoid expensive I/O address translation. These registers are directly mapped in PCI bar 0 and do not require any window checks. 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>
2009-09-07netxen: fix ip addr hashing after firmware resetAmit Kumar Salecha1-22/+39
Reprogram local IP addresses after firmware is reset or after resuming from suspend. 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>
2009-09-07netxen: firmware hang detectionDhananjay Phadke4-88/+348
Implement state machine to detect firmware hung state and recover. Since firmware will be shared by all PCI functions that have different class drivers (NIC or FCOE or iSCSI), explicit hardware based serialization is required for initializing firmware. o Used global scratchpad register to maintain device reference count. Every probed pci function adds to ref count. o Implement timer (delayed work) for each pci func that checks firmware heartbit every 5 sec and detaches itself if firmware is dead. Last detaching function reloads firmware. Other functions wait for firmware init, and re-attach themselves. Heartbit is not supported by NX2031 firmware. 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>