Commit Graph

114 Commits (4c315a5d57300db83d2eb7b8d5b6019e1fba99fc)

Author SHA1 Message Date
Rajesh Borundia d12b0d9adc qlcnic: Remove validation for max tx and max rx queues
Max rx queues and tx queues are governed by fimware.
So driver should not validate these values.

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>
2011-02-23 14:23:33 -08:00
amit salecha 9ce13ca8fc qlcnic: fix checks for auto_fw_reset
o Remove checks of 1 for auto_fw_reset module parameter.
  auto_fw_reset is of type int and can have value > 1.
o Remove unnecessary #define for 1

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-23 14:23:33 -08:00
amit salecha b11a25aaec qlcnic: change module parameter permissions
o Updating module parameter after driver load is not supported
  except auto_fw_reset parameter. Changing these parameter after
  driver load, can have weird result.

o Update driver version to 5.0.15.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-10 13:34:55 -08:00
Rajesh Borundia 1dc0f3c54c qlcnic: reset pci function unconditionally during probe
Some boot code drivers dont have cleanup routine, so pci function
remains in unknown state prior to driver load. So during driver load
issue FLR unconditionally.

Update driver version to 5.0.14.

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-12-17 11:39:02 -08:00
Sritej Velaga 40839129f7 qlcnic: LICENSE file for qlcnic
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>
2010-12-03 09:33:21 -08:00
Amit Kumar Salecha 091056b2ad qlcnic: validate eswitch config values for PF
Currently driver set default eswitch configuration values for PF function,
instead of validating values sent by application.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-03 09:33:21 -08:00
Sucheta Chakraborty 97319a270d qlcnic: Disable loopback support
Loopback mode can not be supported in CNA mode. Removing it until FW is fixed.

Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-03 09:33:20 -08:00
Rajesh Borundia b0044bcfa9 qlcnic: avoid using reset_devices as it may become obsolete.
In kdump environment do not depend upon reset_devices parameter
to reset the pci function as this parameter may become obsolete.
Instead use an adapter specific mechanism to determine if the pci
function needs to be reset.

Per function refcount is maintained in driver, which is set in probe
and reset in remove handler of adapter. If the probe detects the count
as non zero then reset the function.

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-11-28 10:47:16 -08:00
Eric Dumazet 636f8c6f68 qlcnic: fix panic on load
Its now illegal to call netif_stop_queue() before register_netdev()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-31 09:32:55 -07:00
Sony Chacko 90d1900555 qlcnic: reduce rx ring size
If eswitch is enabled, rcv ring size can be reduce, as
physical port is partition-ed.

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-10-27 12:21:54 -07:00
amit salecha e5edb7b19f qlcnic: fix mac learning
In failover bonding case, same mac address can be programmed on other slave function.
Fw will delete old entry (original func) associated with that mac address.
Need to reporgram mac address, if failover again happen to original function.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-27 12:21:53 -07:00
Jesse Gross b738127dfb vlan: Rename VLAN_GROUP_ARRAY_LEN to VLAN_N_VID.
VLAN_GROUP_ARRAY_LEN is simply the number of possible vlan VIDs.
Since vlan groups will soon be more of an implementation detail
for vlan devices, rename the constant to be descriptive of its
actual purpose.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-21 01:26:50 -07:00
Rajesh Borundia ee07c1a701 qlcnic: fix promiscous mode for VF
o Allow promiscous mode setting for VF's depending upon the configuration.

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-10-08 13:59:10 -07:00
Amit Kumar Salecha a2152d096e qlcnic: remove private LRO flag
LRO was not getting enable after interface down/up.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-08 13:59:09 -07:00
Amit Kumar Salecha b8c1762045 qlcnic: support quiescent mode
Put device in quiescent mode during internal loopback test.
Before running test, set state to NEED_QUISCENT. After getting
ack from all function, change state to QUISCENT and perform test.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-08 13:59:08 -07:00
Amit Kumar Salecha f7ec804a3e qlcnic: driver private workqueue
Currently fw recovery usage global workqueue.
As same workqueue used by kernel for ethtool and etc., supporting
quiescent mode is not possible, without driver private workqueue.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-08 13:59:08 -07:00
Sritej Velaga aef3d89827 qlcnic: cleanup port mode setting
Port mode setting is not required for Qlogic CNA adapters.

Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-04 22:46:51 -07:00
Sucheta Chakraborty a1c0c45991 qlcnic: sparse warning fixes
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-10-04 22:46:51 -07:00
Sucheta Chakraborty 7e56cac4b6 qlcnic: fix vlan TSO on big endian machine
o desc->vlan_tci is in __le16 format. Doing htons and
  cpu_to_le64 again on vlan_tci, result in invalid value on ppc.

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-10-04 22:46:50 -07:00
Eric Dumazet 807540baae drivers/net: return operator cleanup
Change "return (EXPR);" to "return EXPR;"

return is not a function, parentheses are not required.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-26 18:34:29 -07:00
Amit Kumar Salecha aec1e8452d qlcnic: vlan lro support
LRO + GRO + vlan rx accleration support, performance increases
around 20% and cpu utilization reduces around 70% on vlan interface.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-17 11:30:54 -07:00
Amit Kumar Salecha d57906633e qlcnic: support vlan rx accleration
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-17 11:26:09 -07:00
David S. Miller e548833df8 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	net/mac80211/main.c
2010-09-09 22:27:33 -07:00
Amit Kumar Salecha 03c5d770c2 qlcnic: mac vlan learning support
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-01 10:41:57 -07:00
Amit Kumar Salecha b5e5492c0d qlcnic: support mac learning
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-01 10:41:57 -07:00
Rajesh Borundia 7373373d10 qlcnic: fix mac override capability
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-01 10:41:56 -07:00
Rajesh Borundia dcb50afff7 qlcnic: fix panic while using eth_hdr
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-01 10:41:56 -07:00
Rajesh Borundia 7613c87b2d qlcnic: fix mac anti spoof policy
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-01 10:41:55 -07:00
Rajesh Borundia 174240a8ef qlcnic: fix for setting default eswitch config
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-01 10:41:54 -07:00
Rajesh Borundia da48e6c362 qlcnic: fix mac addr read
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-01 10:41:54 -07:00
Sony Chacko 4e70812b3d qlcnic: backout firmware initialization update
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-09-01 10:41:53 -07:00
Anirban Chakraborty 0866d96da0 qlcnic: Fix driver load issue in FW hang
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-26 17:13:19 -07:00
Sony Chacko 8cfdce0807 qlcnic: Fix missing error codes
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-26 17:13:18 -07:00
Amit Kumar Salecha 31018e068e qlcnic: change reg name
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-25 14:15:29 -07:00
Amit Kumar Salecha b18971d199 qlcnic: fix fw recovery for PF
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-25 14:15:28 -07:00
Amit Kumar Salecha 8cf61f890a qlcnic: support port vlan id
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-25 14:15:27 -07:00
Rajesh Borundia e9a47700cb qlcnic: eswitch config fixes
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-25 14:15:27 -07:00
Yinglin Luan bf82791ed6 qlcnic: fix poll implementation
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-23 20:28:55 -07:00
David S. Miller d3c6e7ad09 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-08-21 23:32:24 -07:00
Sony Chacko d4066833bb qlcnic: firmware initialization update
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-19 16:52:42 -07:00
Amit Kumar Salecha 21854f029d qlcnic: mark device state as failed
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-19 16:52:41 -07:00
Amit Kumar Salecha 78f84e1a70 qlcnic: fix npar state
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-19 16:52:40 -07:00
Sony Chacko fe4d434da8 qlcnic: support anti mac spoofing
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-19 16:52:40 -07:00
Rajesh Borundia 0325d69b2a qlcnic: configure offload setting on eswitch
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-19 16:52:39 -07:00
Rajesh Borundia 4e8acb011f qlcnic: configure port on eswitch
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-19 16:52:38 -07:00
Sony Chacko 251b036a22 qlcnic: replace magic numbers with defines
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:52:38 -07:00
Sony Chacko 39895e07ca qlcnic: remove unused code
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-19 16:52:37 -07:00
Eric Dumazet 1003201a73 qlnic: fix a race in qlcnic_get_stats()
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-19 00:44:02 -07:00
Julia Lawall 900853a4db drivers/net/qlcnic: Use available error codes
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-18 14:26:32 -07:00
Sucheta Chakraborty 24763d80fb qlcnic: turn off lro when rxcsum is disabled.
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-17 03:59:49 -07:00