Commit Graph

207 Commits (e45be4b5fcccb241101ad1aa1e15581ad2071393)

Author SHA1 Message Date
Anirban Chakraborty 32f5469b5e qlcnic: Bumped up version number to 5.0.18
Update driver version number

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-13 14:44:14 -04:00
Anirban Chakraborty b3c687317f qlcnic: Take FW dump via ethtool
Driver checks if the previous dump has been cleared before taking the dump.
It doesn't take the dump if it is not cleared.

Changes from v2:
Added lock to protect dump data structures from being mangled while
dumping or setting them via ethtool.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-13 14:44:14 -04:00
Anirban Chakraborty 18f2f616be qlcnic: FW dump support
Added code to take FW dump.
o Driver queries FW at the init time and gets the dump template
o It takes FW dump as per the dump template
o Level of FW dump (and its size) is configured via dump flag

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>
2011-05-13 14:44:12 -04:00
David Decotigny 7073949720 ethtool: cosmetic: Use ethtool ethtool_cmd_speed API
This updates the network drivers so that they don't access the
ethtool_cmd::speed field directly, but use ethtool_cmd_speed()
instead.

For most of the drivers, these changes are purely cosmetic and don't
fix any problem, such as for those 1GbE/10GbE drivers that indirectly
call their own ethtool get_settings()/mii_ethtool_gset(). The changes
are meant to enforce code consistency and provide robustness with
future larger throughputs, at the expense of a few CPU cycles for each
ethtool operation.

All drivers compiled with make allyesconfig ion x86_64 have been
updated.

Tested: make allyesconfig on x86_64 + e1000e/bnx2x work
Signed-off-by: David Decotigny <decot@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-29 14:03:01 -07:00
Sony Chacko 7e610caaa5 qlcnic: Support for GBE port settings
Enable setting speed and auto negotiation parameters for GbE ports.
Hardware do not support half duplex setting currently.

o Update driver version to 5.0.17.

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>
2011-04-29 13:00:00 -07:00
Sucheta Chakraborty f94bc1e702 qlcnic: support rcv ring configuration through ethtool
o Support ethtool command ETHTOOL_GCHANNELS and ETHTOOL_SCHANNELS.
o Number of rcv rings configuration depend upon number of msix vector.

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>
2011-04-29 12:59:59 -07:00
Sucheta Chakraborty 89b4208e28 qlcnic: fix memory leak in qlcnic_blink_led.
o Memory allocated in ETHTOOL_ACTIVE mode, is not getting freed. So,
  in ETHTOOL_ID_INACTIVE mode, return after freeing allocated memory.
o Using set bit instead of blink_down field, as it is also required
  in internal Loopback test and etc.

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>
2011-04-28 13:43:49 -07:00
Michał Mirosław 135d84a9f2 net: qlcnic: convert to hw_features
Bit more than minimal conversion. There might be some issues because
of qlcnic_set_netdev_features() if it's called after netdev init.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-20 01:30:44 -07:00
David S. Miller e1943424e4 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/bnx2x/bnx2x_ethtool.c
2011-04-19 00:21:33 -07:00
Amit Kumar Salecha 91a403caf0 qlcnic: limit skb frags for non tso packet
Machines are getting deadlock in four node cluster environment.
All nodes are accessing (find /gfs2 -depth -print|cpio -ocv > /dev/null)
200 GB storage on a GFS2 filesystem.
This result in memory fragmentation and driver receives 18 frags for
1448 byte packets.
For non tso packet, fw drops the tx request, if it has >14 frags.

Fixing it by pulling extra frags.

Cc: stable@kernel.org
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-13 11:53:11 -07:00
stephen hemminger 94469f7532 qlcnic: convert to set_phys_id
Convert driver to use new ethtool set_phys_id.
Not completely sure that this is correct for all cases of device
up/down and doing operation. Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-06 15:05:45 -07:00
Anirban Chakraborty 191350e788 qlcnic: Update version number to 5.0.16
Bumped up version number to 5.0.16

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-06 12:47:14 -07:00
Rajesh Borundia b56421d0b7 qlcnic: Fix LRO disable
o In dev->open LRO was enabled by default, enable it depending
  upon netdev->features , kernel may have disabled it.
o Configure LRO when interface is up.

Signed-off-by: Rajesh Borundia <Rajesh.Borundia@qlogic.com>
Signed-off-by: Anirban Chakraborty <Anirban.Chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-06 12:47:13 -07:00
Sritej Velaga f8d54811cb qlcnic: Use flt method to determine flash fw region
Use flash layout table to get flash fw starting address and its size.
If that fails, use legacy method.

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>
2011-04-06 12:47:13 -07:00
Anirban Chakraborty 8816d0099b qlcnic: Remove unused code
Cleaned up unused codes for interrupt coalescence settings

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-06 12:47:12 -07:00
Anirban Chakraborty b9796a14d9 qlcnic: Changes to VLAN code
Made changes to VLAN code comply with new VLAN infrastructure in kernel

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-06 12:47:12 -07:00
Anirban Chakraborty 036d61f051 qlcnic: Code optimization patch
Optimized code resulted in achieving lower CPU utilization on transmit path
and higher throughput for small packet sizes (64 bytes).

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-06 12:47:11 -07:00
Anirban Chakraborty b1fc6d3cfa qlcnic: Cleanup patch
1. Changed adapter structure to move away from embedding hardware and
    receive context structs and use pointers to those objects
 2. Packed all the structs that interface with FW
 3. Removed unused code and structs

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-06 12:47:11 -07:00
Sony Chacko f848d6dd10 qlcnic: Memory leak fix
Fix a memory leak in error path of pci info.

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>
2011-04-06 12:47:10 -07:00
Sony Chacko 53478fef74 qlcnic: Make PCI info available in all modes
Before this fix, PCI info was available only when multiple NIC functions
are present on the same port.

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>
2011-04-06 12:47:10 -07:00
Stanislaw Gruszka 673e63c688 net: fix ethtool->set_flags not intended -EINVAL return value
After commit d5dbda2380 "ethtool: Add
support for vlan accleration.", drivers that have NETIF_F_HW_VLAN_TX,
and/or NETIF_F_HW_VLAN_RX feature, but do not allow enable/disable vlan
acceleration via ethtool set_flags, always return -EINVAL from that
function. Fix by returning -EINVAL only if requested features do not
match current settings and can not be changed by driver.

Change any driver that define ethtool->set_flags to use
ethtool_invalid_flags() to avoid similar problems in the future
(also on drivers that do not have the problem).

Tested with modified (to reproduce this bug) myri10ge driver.

Cc: stable@kernel.org # 2.6.37+
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-27 23:35:24 -07:00
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
Sony Chacko 13b93ed924 qlcnic: fix ethtool diagnostics test
IRQ diag test was getting executed only when both register test
and link test passed. The test should get executed if ETH_TEST_FL_OFFLINE
flag is set.

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>
2011-01-10 13:34:54 -08:00
amit salecha 0e5f20b656 qlcnic: fix flash fw version read
Driver is reading flash fw version from defined address, this address
may be invalid. Indeed Driver should read address for fw version through
flash layout table. Flash layout table has defined region and address for
fw version address should be read from fw image region.

Driver has check for old firmware, this bug can cause driver load fail.
This patch will try to read fw version from flash image region, if that fails,
read from defined address.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-10 13:34:54 -08:00
Joe Perches 215faf9c5f drivers/net/*/: Use static const
Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.

Signed-off-by: Joe Perches <joe@perches.com>
2010-12-21 02:16:10 -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
Rajesh Borundia b5006dcb10 qlcnic: fix ocm window register offset calculation
OCM window register offset was calculated incorrectly for
pci function greater than zero.

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:01 -08:00
Sucheta Chakraborty c75822a309 qlcnic: fix LED test when interface is down.
When interface is down, create temporary context to config LED.

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-12-17 11:39:01 -08:00
Anirban Chakraborty e4d849b811 qlcnic: Updated driver version to 5.0.13
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-03 09:33:22 -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
Joe Perches f316746014 qlcnic: remove unnecessary [kv][mcz]alloc casts
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-28 17:26:23 -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 89bf67f1f0 drivers/net: use vzalloc()
Use vzalloc() and vzalloc_node() in net drivers

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-27 22:53:38 -08:00
Anirban Chakraborty 802aa9c058 qlcnic: Bumped up driver version to 5.0.12
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-17 11:49:26 -08:00
Sony Chacko 706f23ada6 qlcnic: lro off message log from set rx checsum
Log LRO off message while disabling rx checksum only when
LRO is already enabled.

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-11-17 11:49:26 -08:00
Sritej Velaga 2679a135e6 qlcnic: Add description for CN1000Q adapter
Add description for CN1000Q adapter

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-11-17 11:49:25 -08:00
Rajesh Borundia c21fd48c22 qlcnic: Fix for kdump
In case of kdump environment the function may be in unknown state.
Reset the function using PCI FLR before initializing it.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-17 11:49:25 -08:00
Sucheta Chakraborty 2abea2f0a5 qlcnic: Allow minimum bandwidth of zero
Allow minimum bandwidth to be set zero

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-11-17 11:49:24 -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 0184bbba1c qlcnic: define valid vlan id range
4095 vlan id is reserved and should not be use.

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
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
amit salecha 3666e0b04f qlcnic: update ethtool stats
Added statistics for Nic Partition supported adapter.
These statistics are maintined in device.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-18 07:22:50 -07:00
Amit Kumar Salecha b1091fea29 qlcnic: update driver version 5.0.11
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-08 13:59:11 -07:00
Sritej Velaga ff1b1bf867 qlcnic: change all P3 references to P3P
This patch just rename all P3 #define to P3P.

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-08 13:59:11 -07:00