summaryrefslogtreecommitdiffstats
path: root/drivers/net/qlcnic
Commit message (Collapse)AuthorAgeFilesLines
...
* | qlcnic: support vlan rx acclerationAmit Kumar Salecha2010-09-173-26/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented vlan rx accleration in driver. This helps in increasing significant performance and reduces cpu utilization with GRO and LRO. Eric Dumazet: "Its a bit strange you use dev_kfree_skb_any(skb) here." "We run in NAPI mode, so you can use dev_kfree_skb()." Amit: Done. Using dev_kfree_skb(); Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'master' of ↵David S. Miller2010-09-101-1/+8
|\| | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: net/mac80211/main.c
| * qlcnic: fix poll implementationYinglin Luan2010-08-241-1/+8
| | | | | | | | | | | | | | | | Function qlcnic_intr has pointer to qlcnic_host_sds_ring as second parameter not pointer to qlcnic_adapter. Signed-off-by: Yinglin Luan <synmyth@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | drivers/net: avoid some skb->ip_summed initializationsEric Dumazet2010-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fresh skbs have ip_summed set to CHECKSUM_NONE (0) We can avoid setting again skb->ip_summed to CHECKSUM_NONE in drivers. Introduce skb_checksum_none_assert() helper so that we keep this assertion documented in driver sources. Change most occurrences of : skb->ip_summed = CHECKSUM_NONE; by : skb_checksum_none_assert(skb); Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: add cksum flagAmit Kumar Salecha2010-09-012-4/+6
| | | | | | | | | | | | | | | | o New CKSUM flag added by fw to notify cksum is verified. o Update version to 5.0.9 Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: mac vlan learning supportAmit Kumar Salecha2010-09-013-10/+26
| | | | | | | | | | | | | | | | | | Hypervisor allows, two VM's interfaces to have same mac address. These VM's interfaces get differentiate with Vlan tag. This patch add support to learn and configure mac+vlan filter on device. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: support mac learningAmit Kumar Salecha2010-09-013-0/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | Device eswitch need to configure with VM's mac address. Hypervisor doesn't provide any utility/callbacks to get VM's mac address. Unicast mac address filter improves performance and also provide packet loopback capability i.e communication between VM. Above features is by default off, can be turned on with module parameter 'mac_learn'. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: fix mac override capabilityRajesh Borundia2010-09-013-13/+28
| | | | | | | | | | | | | | | | | | | | o Rename mac_learning to mac_override o Added check in set_mac to return error if mac override is disabled. o Disabling mac_override only supported for Non priviledged functions. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: fix panic while using eth_hdrRajesh Borundia2010-09-011-1/+3
| | | | | | | | | | | | | | | | o skb->mac_header is not set, so machine panics while using function eth_hdr. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: fix mac anti spoof policyRajesh Borundia2010-09-011-3/+10
| | | | | | | | | | | | | | | | | | o Allow enabling/disabling mac anti spoof policy only for Non privilege functions. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: fix for setting default eswitch configRajesh Borundia2010-09-011-31/+65
| | | | | | | | | | | | | | | | | | o Default eswitch config was set, even before eswitch capabilty get detected. As a result setting default config was getting fail. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: fix mac addr readRajesh Borundia2010-09-013-30/+13Star
| | | | | | | | | | | | | | | | | | | | o Mac addr was read from flash for every fw reset for Non-priviledge function.It should be read only once. o Remove unnecessary get_mac_addr callback Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: add api version in reg dumpRajesh Borundia2010-09-011-4/+11
| | | | | | | | | | | | | | | | o ethtool reg version bumped to 2 Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: backout firmware initialization updateSony Chacko2010-09-014-28/+100
| | | | | | | | | | | | | | | | | | | | o Backing out "firmware initialization update" changes, commit-id "d4066833bb1b35fefb1dd45eb2b10659d46bf151". o fix heartbit spelling, it should be heartbeat Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: PCI ID additionSritej Velaga2010-08-271-0/+2
| | | | | | | | | | | | | | | | Added PCI ID to board info. Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com> Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: Fix driver load issue in FW hangAnirban Chakraborty2010-08-274-60/+75
| | | | | | | | | | | | | | | | | | If there is a FW hang when the driver loads, it can not determine the FW operational mode. Fix it by checking the FW state first before issuing any FW commands to determine its capabilities and thereby detecting driver operational mode. Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: Fix missing error codesSony Chacko2010-08-271-4/+8
| | | | | | | | | | | | | | | | | | In the original code, the error codes returned from some of the functions are not caught and sent up the caller chain. Fixed it here. Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: change reg nameAmit Kumar Salecha2010-08-253-8/+8
| | | | | | | | | | | | | | | | Change QLCNIC_CRB_DEV_REF_COUNT to QLCNIC_CRB_DRV_ACTIVE to match document. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: fix fw recovery for PFAmit Kumar Salecha2010-08-251-5/+17
| | | | | | | | | | | | | | | | Privilege function should wait for npar state to be operational before creating context. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: support port vlan idAmit Kumar Salecha2010-08-253-21/+111
| | | | | | | | | | | | | | | | | | On NIC Partition capable adapter, Administrator can configure to tag packet with particular vlan id. Packet will be tagged and strip with that vlan id. Also if 'Tagging' flag is disable, other packet will be drop. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: eswitch config fixesRajesh Borundia2010-08-252-12/+15
| | | | | | | | | | | | | | | | | | o remove validation before deleting vlan id o Add missing 'break' while deleting vlan id. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> 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-08-221-2/+0Star
|\| | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
| * qlnic: fix a race in qlcnic_get_stats()Eric Dumazet2010-08-191-2/+0Star
| | | | | | | | | | | | | | | | Dont clear netdev->stats, it might give transient wrong values to concurrent stat readers. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: update version 5.0.8Amit Kumar Salecha2010-08-201-2/+2
| | | | | | | | | | Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: rom lock recoverySucheta Chakraborty2010-08-202-4/+14
| | | | | | | | | | | | | | | | | | | | Fw can get stuck while holding pci semaphore. Driver will not be able to perform fw initialization, without this lock. Release semaphore forcefully in that case. 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>
* | qlcnic: firmware initialization updateSony Chacko2010-08-204-131/+47Star
| | | | | | | | | | | | | | | | | | Cleanup legacy code which is not valid for Qlogic CNA adapters. Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: fix endiness in eswitch statisticsAmit Kumar Salecha2010-08-201-2/+16
| | | | | | | | | | Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: mark device state as failedAmit Kumar Salecha2010-08-201-10/+13
| | | | | | | | | | | | | | Mark device state failed in error path. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: fix npar stateAmit Kumar Salecha2010-08-201-14/+29
| | | | | | | | | | | | | | Privilege functions should wait for npar state to be operational. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: support anti mac spoofingSony Chacko2010-08-202-0/+12
| | | | | | | | | | | | | | | | | | Administrator can configure to drop packet in transmit, if it doesn't match interface mac address, in case of virtual function. Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: configure offload setting on eswitchRajesh Borundia2010-08-202-6/+133
| | | | | | | | | | | | | | | | | | | | | | Device is not capable of enabling/disabling offload setting per port in case of Nic Partition.So offload settings needs to be enabled/disabled per eswitch and it will affect all the function on that eswitch. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: configure port on eswitchRajesh Borundia2010-08-204-134/+254
| | | | | | | | | | | | | | | | | | o Nic partition capable devices has embedded switch, this needs to support various features like external switch. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: replace magic numbers with definesSony Chacko2010-08-204-3/+8
| | | | | | | | | | Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: remove unused codeSony Chacko2010-08-202-20/+0Star
| | | | | | | | | | | | | | Serial number references are not used in driver. Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: fix inconsistent lock stateAmit Kumar Salecha2010-08-201-7/+0Star
| | | | | | | | | | | | | | | | Spin_lock(rds_ring->lock) is not required while posting buffers from qlcnic_open and freeing buffers from qlcnic_down. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | drivers/net/qlcnic: Use available error codesJulia Lawall2010-08-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error code is stored in the variable err, but it is the variable ret that is returned instead. So store the error code in ret. Err is then useless. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ local idexpression x; constant C; @@ if (...) { ... x = -C ... when != x ( return <+...x...+>; | return NULL; | return; | * return ...; ) } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: turn off lro when rxcsum is disabled.Sucheta Chakraborty2010-08-173-1/+25
| | | | | | | | | | | | | | | | o Also dont allow lro to be turn on, if rx csum is disabled 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>
* | qlcnic: fix link diag testSony Chacko2010-08-172-9/+9
| | | | | | | | | | | | | | | | | | | | o Give sufficient time for all makes of PHY modules to establish the link after loopback test. o Perform online test before offline test. Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: fix link status messageSony Chacko2010-08-171-2/+2
| | | | | | | | | | | | | | | | Display interface name with netdev_info() for link status message. Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: add eswitch statistics supportAmit Kumar Salecha2010-08-173-1/+287
| | | | | | | | | | | | | | | | | | | | | | | | Adding eswitch statistics support. User can get whole eswitch stats or stats of func belong to that eswitch. Added: o command to get statistics of eswitch and function. o sysfs support to export eswitch and func statatistics. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: fix for setting function modesRajesh Borundia2010-08-171-3/+0Star
| | | | | | | | | | | | | | | | | | function modes was not working with CNA device, in CNA mode other function(FCOE) can be enabled before nic. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: device state management fixes for virtual funcAmit Kumar Salecha2010-08-172-34/+51
| | | | | | | | | | | | | | | | | | o NPAR state should be set to operationl by Mangement function only. o NPAR state should be set to non operational before device reset. o VF function should wait for NPAR state to be operational. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: fix aer for virtual funcAmit Kumar Salecha2010-08-171-1/+1
|/ | | | | | | Virtual function are not privilge to initialize firmware. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: using too much stackDan Carpenter2010-08-101-6/+21
| | | | | | | | | qlcnic_pci_info structs are 128 bytes so an array of 8 uses 1024 bytes. That's a lot if you run with 4K stacks. I allocated them with kcalloc() instead. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: clean up qlcnic_init_pci_info()Dan Carpenter2010-08-101-22/+23
| | | | | | | | | | | | | | In the original code we allocated memory conditionally and freed it in the error handling unconditionally. It turns out that this function is only called during initialization and "adapter->npars" and "adapter->eswitch" are always NULL at the start of the function. I removed those checks. Also since I was cleaning things, I changed the error handling for qlcnic_get_pci_info() and pulled everything in an indent level. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: fix diag resource allocationSony Chacko2010-07-261-0/+1
| | | | | | | | netif_device_attach missing from error path in qlcnic_diag_alloc_res Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: fix loopback testAmit Kumar Salecha2010-07-263-22/+8Star
| | | | | | | o Loopback not supported for virtual function. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: fix bandwidth checkRajesh Borundia2010-07-251-4/+3Star
| | | | | | | | Fix maximum and minmum bandwith value. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: fix pci resource leakAmit Kumar Salecha2010-07-181-1/+6
| | | | | | | | pci_get_domain_bus_and_slot: caller must decrement the reference count by calling pci_dev_put(). Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: restore NPAR config data after recoveryAnirban Chakraborty2010-07-143-23/+72
| | | | | | | | | | | o NPAR configuration which is programmed in fw, need to restore after fw recovery. o Update version to 5.0.7 Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>