aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlcnic/qlcnic_main.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-09-17qlcnic: support vlan rx acclerationAmit Kumar Salecha1-1/+9
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>
2010-09-09Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-1/+8
Conflicts: net/mac80211/main.c
2010-09-01qlcnic: mac vlan learning supportAmit Kumar Salecha1-4/+12
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>
2010-09-01qlcnic: support mac learningAmit Kumar Salecha1-0/+123
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>
2010-09-01qlcnic: fix mac override capabilityRajesh Borundia1-5/+18
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>
2010-09-01qlcnic: fix panic while using eth_hdrRajesh Borundia1-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>
2010-09-01qlcnic: fix mac anti spoof policyRajesh Borundia1-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>
2010-09-01qlcnic: fix for setting default eswitch configRajesh Borundia1-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>
2010-09-01qlcnic: fix mac addr readRajesh Borundia1-15/+13
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>
2010-09-01qlcnic: backout firmware initialization updateSony Chacko1-6/+5
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>
2010-08-26qlcnic: Fix driver load issue in FW hangAnirban Chakraborty1-54/+62
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>
2010-08-26qlcnic: Fix missing error codesSony Chacko1-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>
2010-08-25qlcnic: change reg nameAmit Kumar Salecha1-6/+6
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>
2010-08-25qlcnic: fix fw recovery for PFAmit Kumar Salecha1-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>
2010-08-25qlcnic: support port vlan idAmit Kumar Salecha1-20/+69
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>
2010-08-25qlcnic: eswitch config fixesRajesh Borundia1-12/+14
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>
2010-08-23qlcnic: fix poll implementationYinglin Luan1-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>
2010-08-21Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-2/+0
2010-08-19qlcnic: firmware initialization updateSony Chacko1-28/+10
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>
2010-08-19qlcnic: mark device state as failedAmit Kumar Salecha1-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>
2010-08-19qlcnic: fix npar stateAmit Kumar Salecha1-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>
2010-08-19qlcnic: support anti mac spoofingSony Chacko1-0/+11
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>
2010-08-19qlcnic: configure offload setting on eswitchRajesh Borundia1-5/+116
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>
2010-08-19qlcnic: configure port on eswitchRajesh Borundia1-83/+102
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>
2010-08-19qlcnic: replace magic numbers with definesSony Chacko1-1/+1
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19qlcnic: remove unused codeSony Chacko1-19/+0
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>
2010-08-19qlnic: fix a race in qlcnic_get_stats()Eric Dumazet1-2/+0
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>
2010-08-18drivers/net/qlcnic: Use available error codesJulia Lawall1-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>
2010-08-17qlcnic: turn off lro when rxcsum is disabled.Sucheta Chakraborty1-1/+1
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>
2010-08-17qlcnic: fix link status messageSony Chacko1-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>
2010-08-17qlcnic: add eswitch statistics supportAmit Kumar Salecha1-1/+131
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>
2010-08-17qlcnic: fix for setting function modesRajesh Borundia1-3/+0
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>
2010-08-17qlcnic: device state management fixes for virtual funcAmit Kumar Salecha1-32/+48
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>
2010-08-17qlcnic: fix aer for virtual funcAmit Kumar Salecha1-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>
2010-08-10qlcnic: using too much stackDan Carpenter1-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>
2010-08-10qlcnic: clean up qlcnic_init_pci_info()Dan Carpenter1-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>
2010-07-25qlcnic: fix diag resource allocationSony Chacko1-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>
2010-07-25qlcnic: fix loopback testAmit Kumar Salecha1-18/+0
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>
2010-07-18qlcnic: fix pci resource leakAmit Kumar Salecha1-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>
2010-07-14qlcnic: restore NPAR config data after recoveryAnirban Chakraborty1-20/+66
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>
2010-07-14qlcnic: aer supportSucheta Chakraborty1-1/+136
Pci error recovery support added. 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-07-14qlcnic: fix netdev notifier in error pathAmit Kumar Salecha1-1/+9
netdev notifier are not unregistered if pci_register_driver fails. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-14qlcnic: disable tx timeout recoveryAmit Kumar Salecha1-2/+4
Disable tx timeout recovery, if auto_fw_reset is disable Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-09qlcnic: Disable admin tools interface for VF driver modeAnirban Chakraborty1-1/+4
Non privileged (VF) driver will not be able to carry out any of the FW update, etc. operations. Disable the tools interface by not creating the sysfs nodes. Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-09qlcnic: Check FW capability for TSOAnirban Chakraborty1-3/+7
Driver checks TSO capability from FW before enabling it. Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-29qlcnic: Add support for configuring eswitch and nparsRajesh K Borundia1-5/+445
Following changes are made: 1.Obtain capabilities of Nic partition. 2.Configure tx bandwidth of particular Nic partition. 3.Configure the eswitch for setting port mirroring, enable mac learning, promiscous mode. Signed-off-by: Rajesh K Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-29qlcnic: Remove obsolete codeAnirban Chakraborty1-20/+2
Current driver uses FW API version 2 and thus code corresponding to FW API version 1 has become obsolete. Clean up this from the driver. Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-23qlcnic: offload tx timeout recoveryAmit Kumar Salecha1-34/+31
Offload tx timeout recovery to fw recovery func(check_health). In check_health, first check health of device, if it its ok, then do tx timeout recovery otherwise device recovery. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-23qlcnic: dont free host resources during fw recoveryAmit Kumar Salecha1-29/+3
There is no need to free/alloc host resources during firmware recovery. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-23qlcnic: release device resources during interface downAmit Kumar Salecha1-18/+42
Previously we were allocating device resources during probe and release them during remove. Now alloc during interface up and release in interface down. This helps in device performance, as it doesn't need to keep track of inactive resources. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>