History log of /linux-master/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
Revision Date Author Comments
# 7573099e 07-Apr-2023 Denis Plotnikov <den-plotnikov@yandex-team.ru>

qlcnic: check pci_reset_function result

Static code analyzer complains to unchecked return value.
The result of pci_reset_function() is unchecked.
Despite, the issue is on the FLR supported code path and in that
case reset can be done with pcie_flr(), the patch uses less invasive
approach by adding the result check of pci_reset_function().

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 7e2cf4feba05 ("qlcnic: change driver hardware interface mechanism")
Signed-off-by: Denis Plotnikov <den-plotnikov@yandex-team.ru>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 004b26b8 08-Sep-2020 Thomas Gleixner <tglx@linutronix.de>

net/qlcnic: Convert to SPDX license identifiers

All files in this driver directory contain the following notice:

See LICENSE.qlcnic for copyright and licensing details.

LICENSE.qlacnic can be found in
Documentation/networking/device_drivers/qlogic/. The file contains:

- A copyright notice

This copyright notice is redundant as all files contain the same
copyright notice already

- A license notice

You may modify and redistribute the device driver code under the
GNU General Public License (a copy of which is attached hereto as
Exhibit A) published by the Free Software Foundation (version 2).

This can be replaced with the corresponding SPDX license identifier
(GPL-2.0-only) in the source files which reference this license
file.

- The full GPLv2 license text

A redundant copy of LICENSES/preferred/GPL-2.0

Remove the notices and add the SPDX license identifier GPL-2.0-only to the
source files.

Finally remove the now redundant LICENSE.qlcnic file.

Reviewed-by: Richard Fontana <rfontana@redhat.com>
Reviewed-by: Jilayne Lovejoy <opensource@jilayne.com>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Acked-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 750afb08 04-Jan-2019 Luis Chamberlain <mcgrof@kernel.org>

cross-tree: phase out dma_zalloc_coherent()

We already need to zero out memory for dma_alloc_coherent(), as such
using dma_zalloc_coherent() is superflous. Phase it out.

This change was generated with the following Coccinelle SmPL patch:

@ replace_dma_zalloc_coherent @
expression dev, size, data, handle, flags;
@@

-dma_zalloc_coherent(dev, size, handle, flags)
+dma_alloc_coherent(dev, size, handle, flags)

Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
[hch: re-ran the script on the latest tree]
Signed-off-by: Christoph Hellwig <hch@lst.de>


# 766a957d 19-Feb-2017 Christophe Jaillet <christophe.jaillet@wanadoo.fr>

qlcnic: Fix a memory leak in error handling path

If 'dma_alloc_coherent()' fails, we should release resources allocated so
far, just as done in all other cases in this function.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>


# b77357b6 29-Dec-2015 Insu Yun <wuninsu@gmail.com>

qlcnic: correctly handle qlcnic_alloc_mbx_args

Since qlcnic_alloc_mbx_args can be failed,
return value should be checked.

Signed-off-by: Insu Yun <wuninsu@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 1f0ca208 09-Sep-2015 Rasmus Villemoes <linux@rasmusvillemoes.dk>

net: qlcnic: delete redundant memsets

In all cases, mbx->req.arg and mbx->rsp.arg have just been allocated
using kcalloc(), so these six memsets are redundant.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>


# d47d2fdd 14-Oct-2014 Rajesh Borundia <rajesh.borundia@qlogic.com>

qlcnic: Fix number of arguments in destroy tx context command

o Number of arguments taken by destroy tx command is three
instead of two.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 2a1ef4b5 14-Oct-2014 Rajesh Borundia <rajesh.borundia@qlogic.com>

qlcnic: Fix programming number of arguments in a command.

o Initially we were programming maximum number of arguments.
Instead we should program number of arguments required in
a command.
o Maximum number of arguments for 82xx adapter is four. Fix it
for GET_ESWITCH_STATS command.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# bf63014f 04-Aug-2014 Rajesh Borundia <rajesh.borundia@qlogic.com>

qlcnic: Set driver version before registering netdev

o Earlier, set_drv_version was getting called after register_netdev.
This was resulting in a race between set_drv_version and FLR called
from open(). Moving set_drv_version before register_netdev avoids
the race.

o Log response code in error message on CDRP failure.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# c65762fc 25-Apr-2014 Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>

qlcnic: Add driver logs in error path.

Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# a78b6da8 14-Apr-2014 Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>

qlcnic: Fix PVID configuration on eSwitch port.

Clear older PVID before adding a newer PVID to the eSwicth port

Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 7b546842 14-Apr-2014 Shahed Shaikh <shahed.shaikh@qlogic.com>

qlcnic: Fix max ring count calculation

Do not read max rings count from qlcnic_get_nic_info(). Use driver defined
values for 82xx adapters. In case of 83xx adapters, use minimum of firmware
provided and driver defined values.

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 2f514c52 17-Dec-2013 Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>

qlcnic: Support for 16 virtual NIC functions.

Extend virtual NIC functions from 8 to 16 for 84xx adapter.

Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 34e8c406 04-Nov-2013 Himanshu Madhani <himanshu.madhani@qlogic.com>

qlcnic: refactor Tx/SDS ring calculation and validation in driver.

o Current driver has duplicate code for validating user input
for changing Tx/SDS rings using set_channel ethtool interface.
This patch removes duplicate code and refactored Tx/SDS ring
validation for 82xx/83xx/84xx series adapter.
o Refactored code now calculates maximum Tx/Rx ring driver can
support based on Default, NPAR and SRIOV PF/VF mode of driver.

Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# ede23fa8 26-Aug-2013 Joe Perches <joe@perches.com>

drivers:net: Convert dma_alloc_coherent(...__GFP_ZERO) to dma_zalloc_coherent

__GFP_ZERO is an uncommon flag and perhaps is better
not used. static inline dma_zalloc_coherent exists
so convert the uses of dma_alloc_coherent with __GFP_ZERO
to the more common kernel style with zalloc.

Remove memset from the static inline dma_zalloc_coherent
and add just one use of __GFP_ZERO instead.

Trivially reduces the size of the existing uses of
dma_zalloc_coherent.

Realign arguments as appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# fb859ed6 23-Aug-2013 Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>

qlcnic: dcb: Get DCB parameters from the adapter.

o Populate driver data structures with local, operational, and peer
DCB parameters.

Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 14d385b9 23-Aug-2013 Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>

qlcnic: dcb: Query adapter DCB capabilities.

o Query adapter DCB capabilities and populate local data structures
with relevant information.

o Add QLCNIC_DCB to Kconfig for enabling/disabling DCB.

Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 07a251c8 21-Aug-2013 Shahed Shaikh <shahed.shaikh@qlogic.com>

qlcnic: Implement ndo_get_phys_port_id for 82xx adapter

Each function driver instance uses the MAC address of the
lowest function belonging to that physical port as a unique
port identifier. This port identifier is read and cached in
driver during probe and provided to user space through
ndo_get_phys_port_id()

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# c2c5e3a0 21-Aug-2013 Himanshu Madhani <himanshu.madhani@qlogic.com>

qlcnic: Enable diagnostic test for multiple Tx queues.

o Enable diagnostic test via ethtool and QConvergeConsole
application when Multiple Tx queues are enabled on 82xx
series adapters.

Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 012ec812 21-Aug-2013 Himanshu Madhani <himanshu.madhani@qlogic.com>

qlcnic: Multi Tx queue support for 82xx Series adapter.

o 82xx firmware allows support for multiple Tx queues. This
patch will enable multi Tx queue support for 82xx series
adapter. Max number of Tx queues supported will be 8.

Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 4bd8e738 02-Aug-2013 Himanshu Madhani <himanshu.madhani@qlogic.com>

qlcnic: Fix for flash update failure on 83xx adapter

Flash update routine was improperly checking register read API return value.
Modify register read API and perform proper error check.

Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# f91bbcb0 02-Aug-2013 Himanshu Madhani <himanshu.madhani@qlogic.com>

qlcnic: Free up memory in error path.

Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# f57da7a6 20-Jun-2013 Shahed Shaikh <shahed.shaikh@qlogic.com>

qlcnic: Do not sleep while holding spinlock

This patch reverts commit a4791254b6625b06aa33e36304f6e8a1a4a1fdea
("qlcnic: change mdelay to msleep") which overwrote a commit
68b3f28c11bf896be32ad2a2e151aaa5f4a7c98e
("qlcnic: Fix scheduling while atomic bug")

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 8af3f33d 22-Jun-2013 Pratik Pujar <pratik.pujar@qlogic.com>

qlcnic: Add support for 'set driver version' in 83XX

Issue 'set driver version' during driver load and after reset recovery
to notify the driver version to the firmware.

Signed-off-by: Pratik Pujar <pratik.pujar@qlogic.com>
Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# b6b4316c 22-Jun-2013 Shahed Shaikh <shahed.shaikh@qlogic.com>

qlcnic: Handle qlcnic_alloc_mbx_args() failure

qlcnic_alloc_mbx_args() may fail due to failure in memory allocation.
This patch checks for failure of qlcnic_alloc_mbx_args() to avoid
potential invalid memory access.

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# ee9e8b6c 23-May-2013 Manish Chopra <manish.chopra@qlogic.com>

qlcnic: Enhance virtual NIC logging

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 487042af 23-May-2013 Himanshu Madhani <himanshu.madhani@qlogic.com>

qlcnic: Implement GET_LED_STATUS command for 82xx adapter.

o GET_LED_STATUS command will be used by driver to get
current beacon state from 82xx adapter.
o Refactored qlcnic_store_beacon() to split 8200 and 8300
specific calls.

Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 7cb03b23 28-Mar-2013 Rajesh Borundia <rajesh.borundia@qlogic.com>

qlcnic: Support VF-PF communication channel commands.

o Add support for commands from VF to PF.
o PF validates the commands sent by the VF before sending
it to adapter.
o vPort is a container of resources. PF creates vPort
for VFs and attach resources to it. vPort is
transparent to the VF.
o Separate 83xx TX and RX hardware resource cleanup from 82xx.

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# a4791254 21-Mar-2013 Shahed Shaikh <shahed.shaikh@qlogic.com>

qlcnic: change mdelay to msleep

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 1f9061d2 15-Mar-2013 Joe Perches <joe@perches.com>

drivers:net: dma_alloc_coherent: use __GFP_ZERO instead of memset(, 0)

Reduce the number of calls required to alloc
a zeroed block of memory.

Trivially reduces overall object size.

Other changes around these removals
o Neaten call argument alignment
o Remove an unnecessary OOM message after dma_alloc_coherent failure
o Remove unnecessary gfp_t stack variable

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# d0320f75 14-Mar-2013 Joe Perches <joe@perches.com>

drivers:net: Remove dma_alloc_coherent OOM messages

I believe these error messages are already logged
on allocation failure by warn_alloc_failed and so
get a dump_stack on OOM.

Remove the unnecessary additional error logging.

Around these deletions:

o Alignment neatening.
o Remove unnecessary casts of dma_alloc_coherent.
o Hoist assigns from ifs.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 7dd90cf1 17-Feb-2013 Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>

qlcnic: fix mailbox interrupt.

o Config interrupt is not needed for mailbox interrupts.

Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 114ef38a 17-Feb-2013 Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>

qlcnic: fix unsupported CDRP command error message.

Added detailed error messages for FW CDRP command failure

Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 577ae39d 03-Feb-2013 Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>

qlcnic: Updating copyright information.

We recently refactored the driver source, this patch will take care of
updating copyright date and adding it to newly added files.

Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# c84e340a 25-Jan-2013 Sritej Velaga <sritej.velaga@qlogic.com>

qlcnic: set driver version in firmware

Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 4e60ac46 31-Dec-2012 Sony Chacko <sony.chacko@qlogic.com>

qlcnic: 83xx register dump routines

Add 83xx register dump routines
Update 82xx register dump routines

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 4be41e92 31-Dec-2012 Sony Chacko <sony.chacko@qlogic.com>

qlcnic: 83xx data path routines

Add 83xx adapter data path routines
Update few 82xx adapter data path routines
Modify datapath resource allocation routines

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 7e2cf4fe 31-Dec-2012 Sony Chacko <sony.chacko@qlogic.com>

qlcnic: change driver hardware interface mechanism

Refactor 82xx driver to support new adapter - Qlogic 83XX CNA

Create adapter abstraction layer and seperate 82xx hardware access routines.
Create mailbox based HW interface mechanism

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 5d17f36b 18-Dec-2012 Shahed Shaikh <shahed.shaikh@qlogic.com>

qlcnic: fix unused variable warnings

qlcnic_hw.c:370: warning: variable cmd_desc set but not used
qlcnic_hw.c:368: warning: variable consumer set but not used
qlcnic_main.c:448: warning: variable ref_count set but not used
qlcnic_main.c:534: warning: variable mem_base set but not used
qlcnic_ctx.c:137: warning: variable tmp_tmpl set but not used
qlcnic_ctx.c:133: warning: variable version set but not used
qlcnic_minidump.c:200: warning: variable opcode set but not used

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# bff57d8e 03-Dec-2012 Sony Chacko <sony.chacko@qlogic.com>

qlcnic: update NIC partition interface routines

Refactor 82xx driver to support new adapter
Update routines to support variable number of NIC partitions

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 79788450 03-Dec-2012 Sony Chacko <sony.chacko@qlogic.com>

qlcnic: move HW specific data to seperate structure

Move HW specific data to a seperate structure as part of
refactoring 82xx adapter driver.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 63507592 23-Nov-2012 Shahed Shaikh <shahed.shaikh@qlogic.com>

qlcnic: fix sparse check endian warnings

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 5ad6ff9d 17-Nov-2012 Sony Chacko <sony.chacko@qlogic.com>

qlcnic: fix compiler warnings

Fix the following warnings:

qlcnic_main.c: In function 'qlcnic_update_cmd_producer':
qlcnic_main.c:119:51: warning: unused parameter 'adapter' [-Wunused-parameter]
qlcnic_main.c:119: warning: unused parameter adapter
qlcnic_init.c: In function qlcnic_process_lro
qlcnic_init.c:1586: warning: unused parameter sds_ring
qlcnic_init.c: In function qlcnic_process_rcv_diag
qlcnic_init.c:1854: warning: unused parameter sds_ring
qlcnic_init.c: In function qlcnic_fetch_mac
qlcnic_init.c:1938: warning: unused parameter adapter

warning: 'pci_using_dac' may be used uninitialized in this function [-Wmaybe-uninitialized]
qlcnic_main.c:1569:10: note: 'pci_using_dac' was declared here

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 68b3f28c 25-Sep-2012 Narendra K <narendra_k@dell.com>

qlcnic: Fix scheduling while atomic bug

In the device close path, 'qlcnic_fw_destroy_ctx' and
'qlcnic_poll_rsp' call msleep. But 'qlcnic_fw_destroy_ctx' and
'qlcnic_poll_rsp' are called with 'adapter->tx_clean_lock' spin lock
held resulting in scheduling while atomic bug causing the following
trace.

I observed that the commit 012dc19a45b2b9cc2ebd14aaa401cf782c2abba4
from John Fastabend addresses a similar issue in ixgbevf driver.
Adopting the same approach used in the commit, this patch uses mdelay
to address the issue.

[79884.999115] BUG: scheduling while atomic: ip/30846/0x00000002
[79885.005562] INFO: lockdep is turned off.
[79885.009958] Modules linked in: qlcnic fuse nf_conntrack_netbios_ns nf_conntrack_broadcast ipt_MASQUERADE bnep bluetooth rfkill ip6table_mangle ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables iptable_nat nf_nat iptable_mangle ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack iptable_filter ip_tables dcdbas coretemp kvm_intel kvm iTCO_wdt ixgbe iTCO_vendor_support crc32c_intel ghash_clmulni_intel nfsd microcode sb_edac pcspkr edac_core dca bnx2x shpchp auth_rpcgss nfs_acl lpc_ich mfd_core mdio lockd libcrc32c wmi acpi_pad acpi_power_meter sunrpc uinput sd_mod sr_mod cdrom crc_t10dif ahci libahci libata megaraid_sas usb_storage dm_mirror dm_region_hash dm_log dm_mod [last unloaded: qlcnic]
[79885.083608] Pid: 30846, comm: ip Tainted: G W O 3.6.0-rc7+ #1
[79885.090805] Call Trace:
[79885.093569] [<ffffffff816764d8>] __schedule_bug+0x68/0x76
[79885.099699] [<ffffffff8168358e>] __schedule+0x99e/0xa00
[79885.105634] [<ffffffff81683929>] schedule+0x29/0x70
[79885.111186] [<ffffffff81680def>] schedule_timeout+0x16f/0x350
[79885.117724] [<ffffffff811afb7a>] ? init_object+0x4a/0x90
[79885.123770] [<ffffffff8107c190>] ? __internal_add_timer+0x140/0x140
[79885.130873] [<ffffffff81680fee>] schedule_timeout_uninterruptible+0x1e/0x20
[79885.138773] [<ffffffff8107e830>] msleep+0x20/0x30
[79885.144159] [<ffffffffa04c7fbf>] qlcnic_issue_cmd+0xef/0x290 [qlcnic]
[79885.151478] [<ffffffffa04c8265>] qlcnic_fw_cmd_destroy_rx_ctx+0x55/0x90 [qlcnic]
[79885.159868] [<ffffffffa04c92fd>] qlcnic_fw_destroy_ctx+0x2d/0xa0 [qlcnic]
[79885.167576] [<ffffffffa04bf2ed>] __qlcnic_down+0x11d/0x180 [qlcnic]
[79885.174708] [<ffffffffa04bf6f8>] qlcnic_close+0x18/0x20 [qlcnic]
[79885.181547] [<ffffffff8153b4c5>] __dev_close_many+0x95/0xe0
[79885.187899] [<ffffffff8153b548>] __dev_close+0x38/0x50
[79885.193761] [<ffffffff81545101>] __dev_change_flags+0xa1/0x180
[79885.200419] [<ffffffff81545298>] dev_change_flags+0x28/0x70
[79885.206779] [<ffffffff815531b8>] do_setlink+0x378/0xa00
[79885.212731] [<ffffffff81354fe1>] ? nla_parse+0x31/0xe0
[79885.218612] [<ffffffff815558ee>] rtnl_newlink+0x37e/0x560
[79885.224768] [<ffffffff812cfa19>] ? selinux_capable+0x39/0x50
[79885.231217] [<ffffffff812cbf98>] ? security_capable+0x18/0x20
[79885.237765] [<ffffffff81555114>] rtnetlink_rcv_msg+0x114/0x2f0
[79885.244412] [<ffffffff81551f87>] ? rtnl_lock+0x17/0x20
[79885.250280] [<ffffffff81551f87>] ? rtnl_lock+0x17/0x20
[79885.256148] [<ffffffff81555000>] ? __rtnl_unlock+0x20/0x20
[79885.262413] [<ffffffff81570fc1>] netlink_rcv_skb+0xa1/0xb0
[79885.268661] [<ffffffff81551fb5>] rtnetlink_rcv+0x25/0x40
[79885.274727] [<ffffffff815708bd>] netlink_unicast+0x19d/0x220
[79885.281146] [<ffffffff81570c45>] netlink_sendmsg+0x305/0x3f0
[79885.287595] [<ffffffff8152b188>] ? sock_update_classid+0x148/0x2e0
[79885.294650] [<ffffffff81525c2c>] sock_sendmsg+0xbc/0xf0
[79885.300600] [<ffffffff8152600c>] __sys_sendmsg+0x3ac/0x3c0
[79885.306853] [<ffffffff8109be23>] ? up_read+0x23/0x40
[79885.312510] [<ffffffff816896cc>] ? do_page_fault+0x2bc/0x570
[79885.318968] [<ffffffff81191854>] ? sys_brk+0x44/0x150
[79885.324715] [<ffffffff811c458c>] ? fget_light+0x24c/0x520
[79885.330875] [<ffffffff815286f9>] sys_sendmsg+0x49/0x90
[79885.336707] [<ffffffff8168e429>] system_call_fastpath+0x16/0x1b

Signed-off-by: Narendra K <narendra_k@dell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# e42ede22 06-Jun-2012 Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>

qlcnic: fix unsupported CDRP command error message.

Add debug messages for FW CDRP command failure.

Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# cae82d49 06-Jun-2012 Rajesh Borundia <rajesh.borundia@qlogic.com>

qlcnic: Fix estimation of recv MSS in case of LRO

o Linux stack estimates MSS from skb->len or skb_shinfo(skb)->gso_size.
In case of LRO skb->len is aggregate of len of number of packets hence MSS
obtained using skb->len would be incorrect. Incorrect estimation of recv MSS
would lead to delayed acks in some traffic patterns (which sends two or three
packets and wait for ack and only then send remaining packets). This leads to
drop in performance. Hence we need to set gso_size to MSS obtained from firmware.

o This is fixed recently in firmware hence the MSS is obtained based on
capability. If fw is capable of sending the MSS then only driver sets the gso_size.

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>


# 54a8997c 26-Apr-2012 Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>

qlcnic: Adding mac statistics to ethtool.

Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 7777de9a 13-Sep-2011 Anirban Chakraborty <anirban.chakraborty@qlogic.com>

qlcnic: Change CDRP function

Argument list to CDRP function has become unmanageably long. Fix it by properly
declaring a struct that encompasses all the input and output parameters.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 9254b751 28-Aug-2011 Sritej Velaga <sritej.velaga@qlogic.com>

qlcnic: fix cdrp race condition

Reading CRB registers(if reqd) before releasing the api lock.

Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# aa43c215 08-Apr-2011 Jeff Kirsher <jeffrey.t.kirsher@intel.com>

qlogic: Move the QLogic drivers

Moves the QLogic drivers into drivers/net/ethernet/qlogic/ and
the necessary Kconfig and Makefile changes.

CC: Ron Mercer <ron.mercer@qlogic.com>
CC: Amit Kumar Salecha <amit.salecha@qlogic.com>
CC: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>