aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qla3xxx.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2008-11-03drivers/net: Kill now superfluous ->last_rx stores.David S. Miller1-2/+0
The generic packet receive code takes care of setting netdev->last_rx when necessary, for the sake of the bonding ARP monitor. Drivers need not do it any more. Some cases had to be skipped over because the drivers were making use of the ->last_rx value themselves. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-31pci: use pci_ioremap_bar() in drivers/netArjan van de Ven1-3/+1
Use the newly introduced pci_ioremap_bar() function in drivers/net. pci_ioremap_bar() just takes a pci device and a bar number, with the goal of making it really hard to get wrong, while also having a central place to stick sanity checks. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-27net: convert print_mac to %pMJohannes Berg1-3/+2
This converts pretty much everything to print_mac. There were a few things that had conflicts which I have just dropped for now, no harm done. I've built an allyesconfig with this and looked at the files that weren't built very carefully, but it's a huge patch. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-07qla3xxx: driver version change.root1-1/+1
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-07qla3xxx: cleanup: Remove some unused structure definitions and structure elements.Ron Mercer1-4/+0
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-07qla3xxx: fix: Fix IFF_MULTICAST setting.Ron Mercer1-3/+0
The driver was erroneously clearing this bit though the hardware supports multicast. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-07qla3xxx: fix: Remove unused set_multicast function.Ron Mercer1-9/+5
This device is one side of a two-function adapter (NIC and iSCSI). Promiscuous mode setting/clearing is not allowed from the NIC side. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-26dma-mapping: add the device argument to dma_mapping_error()FUJITA Tomonori1-6/+6
Add per-device dma_mapping_ops support for CONFIG_X86_64 as POWER architecture does: This enables us to cleanly fix the Calgary IOMMU issue that some devices are not behind the IOMMU (http://lkml.org/lkml/2008/5/8/423). I think that per-device dma_mapping_ops support would be also helpful for KVM people to support PCI passthrough but Andi thinks that this makes it difficult to support the PCI passthrough (see the above thread). So I CC'ed this to KVM camp. Comments are appreciated. A pointer to dma_mapping_ops to struct dev_archdata is added. If the pointer is non NULL, DMA operations in asm/dma-mapping.h use it. If it's NULL, the system-wide dma_ops pointer is used as before. If it's useful for KVM people, I plan to implement a mechanism to register a hook called when a new pci (or dma capable) device is created (it works with hot plugging). It enables IOMMUs to set up an appropriate dma_mapping_ops per device. The major obstacle is that dma_mapping_error doesn't take a pointer to the device unlike other DMA operations. So x86 can't have dma_mapping_ops per device. Note all the POWER IOMMUs use the same dma_mapping_error function so this is not a problem for POWER but x86 IOMMUs use different dma_mapping_error functions. The first patch adds the device argument to dma_mapping_error. The patch is trivial but large since it touches lots of drivers and dma-mapping.h in all the architecture. This patch: dma_mapping_error() doesn't take a pointer to the device unlike other DMA operations. So we can't have dma_mapping_ops per device. Note that POWER already has dma_mapping_ops per device but all the POWER IOMMUs use the same dma_mapping_error function. x86 IOMMUs use device argument. [akpm@linux-foundation.org: fix sge] [akpm@linux-foundation.org: fix svc_rdma] [akpm@linux-foundation.org: build fix] [akpm@linux-foundation.org: fix bnx2x] [akpm@linux-foundation.org: fix s2io] [akpm@linux-foundation.org: fix pasemi_mac] [akpm@linux-foundation.org: fix sdhci] [akpm@linux-foundation.org: build fix] [akpm@linux-foundation.org: fix sparc] [akpm@linux-foundation.org: fix ibmvscsi] Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Muli Ben-Yehuda <muli@il.ibm.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: Avi Kivity <avi@qumranet.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-28Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-0/+2
Conflicts: drivers/net/wireless/iwlwifi/iwl4965-base.c
2008-06-27qla3xxx: Hold RTNL while calling dev_close()Ben Hutchings1-0/+2
dev_close() must be called holding the RTNL. Compile-tested only. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-13[netdrvr] Trim trailing whitespace for several driversJeff Garzik1-2/+2
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-03-26qla3xxx: convert byte order of constant instead of variableMarcin Slusarz1-4/+2
Convert byte order of constant instead of variable which can be done at compile time (vs run time) Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Acked-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28qla3xxx annotationsAl Viro1-33/+11
stop the byteswap-in-place, annotate Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28drivers/net: Add missing "space"Joe Perches1-1/+1
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-08[NET]: Do not check netif_running() and carrier state in ->poll()David S. Miller1-6/+1
Drivers do this to try to break out of the ->poll()'ing loop when the device is being brought administratively down. Now that we have a napi_disable() "pending" state we are going to solve that problem generically. Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-10qla3xxx: bugfix: Fix bad logical operation in link state machine.Ron Mercer1-10/+5
Luckily, this wasn't reported or reproduced. The logical operation for setting duplex had wrong grouping. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-10qla3xxx: bugfix: Move link state machine into a worker threadRon Mercer1-14/+13
The link state machine requires access to some resources that are shared with the iSCSI function on the chip. (See iSCSI driver at drivers/scsi/qla4xxx) If the interface is being up/downed at a rapid pace this driver may need to sleep waiting to get access to the common resources. For this we are moving the state machine to run as a work thread. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10drivers/net/qla3xxx: trim trailing whitespaceJeff Garzik1-64/+64
Also, hopefully, change the file permissions to 0644. Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-10[netdrvr] Stop using legacy hooks ->self_test_count, ->get_stats_countJeff Garzik1-2/+0
These have been superceded by the new ->get_sset_count() hook. Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()Joe Perches1-4/+3
This is nicer than the MAC_FMT stuff. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[NET] drivers/net: statistics cleanup #1 -- save memory and shrink codeJeff Garzik1-15/+8
We now have struct net_device_stats embedded in struct net_device, and the default ->get_stats() hook does the obvious thing for us. Run through drivers/net/* and remove the driver-local storage of statistics, and driver-local ->get_stats() hook where applicable. This was just the low-hanging fruit in drivers/net; plenty more drivers remain to be updated. [ Resolved conflicts with napi_struct changes and fix sunqe build regression... -DaveM ] Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[NET]: Nuke SET_MODULE_OWNER macro.Ralf Baechle1-1/+0
It's been a useless no-op for long enough in 2.6 so I figured it's time to remove it. The number of people that could object because they're maintaining unified 2.4 and 2.6 drivers is probably rather small. [ Handled drivers added by netdev tree and some missed IRDA cases... -DaveM ] Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10Clean up duplicate includes in drivers/net/Jesper Juhl1-1/+0
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 Hemminger1-17/+12
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-10-02qla3xxx: bugfix: Fix VLAN rx completion handling.Ron Mercer1-0/+6
Fix 4032 chip undocumented "feature" where bit-8 is set if the inbound completion is for a VLAN. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-02qla3xxx: bugfix: Add memory barrier before accessing rx completion.Ron Mercer1-0/+1
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-31[NET]: ethtool_perm_addr only has one implementationMatthew Wilcox1-1/+0
All drivers implement ethtool get_perm_addr the same way -- by calling the generic function. So we can inline the generic function into the caller and avoid going through the drivers. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-08qla3xxx: cleanup checksum offload codeStephen Hemminger1-24/+9
The code for checksum is more complex than needed when dealing with VLAN's; the higher layers already pass down the location of the IP header. Compile tested only, no hardware available. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-06-03qla3xxx: device doesnt do hardware checksumming.Stephen Hemminger1-1/+1
Reading the code for ql_hw_csum_setup(), it is obvious that this driver is broken for IPV6. The driver sets the NETIF_F_HW_SUM flag, but the code for checksum setup only deals with IPV4. Compile tested only, no hardware available. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28make drivers/net/qla3xxx.c:PHY_DEVICES[] staticAdrian Bunk1-1/+1
On Fri, Mar 30, 2007 at 01:05:59AM -0700, Andrew Morton wrote: >... > Changes since 2.6.21-rc5-mm2: >... > git-netdev-all.patch >... > git trees >... This patch makes the needlessly global PHY_DEVICES[] static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28qla3xxx: Bumping driver version number to v2.03.00-k4Ron Mercer1-1/+1
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28qla3xxx: Adding support for the Agere PHY (ET1011C)Ron Mercer1-43/+304
This PHY support patch was written by Benjamin Li. Signed-off-by: Benjamin Li <benjamin.li@qlogic.com> Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28qla3xxx: Add ethtool get_pauseparam for improved bonding support.Ron Mercer1-0/+18
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28drivers/net/qla3xxx.c: make 2 functions staticAdrian Bunk1-2/+2
This patch makes two needlessly global functions static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-25[SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}Arnaldo Carvalho de Melo1-1/+2
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[ETH]: Make eth_type_trans set skb->dev like the other *_type_transArnaldo Carvalho de Melo1-2/+0
One less thing for drivers writers to worry about. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-28qla3xxx: bugfix: Jumbo frame handling.Ron Mercer1-14/+15
Fixed rx checksum bits. Turn on TCP processing for rx checksum. Fixed max frame length register write. It wasn't getting set in multi-port system. Set rx buffer queue length properly for jumbo frames. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-28qla3xxx: bugfix: Dropping interrupt under heavy network load.Ron Mercer1-41/+30
Update the rx queue pointer when exiting NAPI poll rather than at the end of each iteration. Remove unnecessary PCI flushes that occurred after every write. Now write all regs and flush once. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-28qla3xxx: bugfix: Multi segment sends were getting whacked.Ron Mercer1-7/+2
The proper header length was not being used. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-28qla3xxx: bugfix: Add tx control block memset.Ron Mercer1-0/+1
This was removed in a previous patch to increase performance, but caused a transmit error for the 4032 chip. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-02qla3xxx: bugfix for line omitted in previous patch.Ron Mercer1-1/+1
This missing line caused transmit errors on the Qlogic 4032 chip. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27qla3xxx: Bumping driver version numberBenjamin Li1-1/+1
Signed-off-by: Benjamin Li <benjamin.li@qlogic.com> Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27qla3xxx: Kernic Panic on pSeries under stress conditionsBenjamin Li1-18/+46
To reproduce this panic consistently, we run an intensive network application like 'netperf'. After waiting for a couple of seconds, you will see a stack trace and a kernel panic where we are calling pci_unmap_single() in ql_poll(). Changes: 1) Check the flags on the Response MAC IO Control block to check for errors 2) Ensure that if we are on the 4022 we only use one segment 3) Before, we were reading the memory mapped producer index register everytime we iterated in the loop when clearing the queue. We should only be iterating to a known point, not as the producer index is being updated. Signed-off-by: Benjamin Li <benjamin.li@qlogic.com> Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27qla3xxx: bugfix tx reset after stress conditions.Ron Mercer1-28/+41
To Reproduce the Problem: To reproduce this panic consistently, we run an intensive network application like 'netperf' and then switch to a different console. After waiting for a couple of seconds, you will see a tx reset has occured. Reason: We enable interrupts even if we were not running. Solution: Now we will enable interrupts only after we are ready to give up the poll routine. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27qla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list(), ql_populate_free_queue(), ql_alloc_large_buffers(), and ql3xxx_send()Benjamin Li1-7/+107
pci_map_single() could fail. We need to properly check the return code from pci_map_single(). If we can not properly map this address, then we should cleanup and return the proper return code. Signed-off-by: Benjamin Li <benjamin.li@qlogic.com> Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27qla3xxx: bugfix: Fixed jumbo frame handling for 3032 chip.Ron Mercer1-35/+64
The scatter/gather lists were not being build correctly. When large frames spanned several buffers the chip would panic. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27qla3xxx: Clean up receive process.Ron Mercer1-54/+24
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27qla3xxx: Dynamically size the rx buffer queue based on the MTU.Ron Mercer1-13/+28
This change removes use of constants for rx buffer queue size and instead calculates the queue length based on what he MTU is set to. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27qla3xxx: Remove API to change MTU.Ron Mercer1-22/+2
This network device driver shares the same hardware as the qla4xxx iSCSI driver. Changing the MTU via the device interface will cause qla4xxx to crash as there is no way to make notification. Users wishing to change the MTU must do so using an iSCSI utility such as Qlogic SanSurfer. This forces the user to unload/reload this network device driver after the MTU value has been changed in flash. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-27qla3xxx: Fix deadlock issue on error pathsBenjamin Li1-3/+12
1) Fix deadlock issue when in QL_RESET_ACTIVE state and traversing through the Link State Machine 2) Fix deadlock issue when ethtool would call ql_get_settings() 3) Fix deadlock issue when adaptor is ifup'ed but adaptor fails to initialize Signed-off-by: Benjamin Li <benjamin.li@qlogic.com> Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>