* [PATCH net 0/5] qlcnic: Bug fixes.
@ 2013-12-10 17:33 Himanshu Madhani
0 siblings, 0 replies; 9+ messages in thread
From: Himanshu Madhani @ 2013-12-10 17:33 UTC (permalink / raw)
To: davem; +Cc: netdev, Dept_NX_Linux_NIC_Driver, Himanshu Madhani
From: Himanshu Madhani <himanshu.madhani@qlogic.com>
This series contains bug fixes for multi Tx queue implementation for
all adapters.
Please apply to net.
Thanks,
Himanshu
Himanshu Madhani (4):
qlcnic: use correct netif api to enable tx queues.
qlcnic: fix diagnostic test for all supported adapters.
qlcnic: Fix Tx/SDS ring validation logic.
qlcnic: Fix TSS/RSS validation for 83xx/84xx series adapter.
Shahed Shaikh (1):
qlcnic: Use spinlock per transmit queue
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 3 ++-
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 4 ++--
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 19 ++++++++-----------
drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c | 3 +++
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 6 +++---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 6 ++----
6 files changed, 20 insertions(+), 21 deletions(-)
--
1.8.1.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH net 0/5] qlcnic: Bug fixes
@ 2014-02-21 6:23 Shahed Shaikh
2014-02-21 6:23 ` [PATCH net 1/5] qlcnic: Fix function return error check Shahed Shaikh
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Shahed Shaikh @ 2014-02-21 6:23 UTC (permalink / raw)
To: davem; +Cc: netdev, Dept-HSGLinuxNICDev, Shahed Shaikh
From: Shahed Shaikh <shahed.shaikh@qlogic.com>
Hi David,
This patch series includes following bug fixes,
* Fix for return value handling of function qlcnic_enable_msi_legacy().
* Fix for the usage of module paramters for interrupt mode.
Driver should use flags while checking for driver's interrupt mode instead of
module parameters.
* Revert commit 1414abea04 (qlcnic: Restrict VF from configuring any VLAN mode),
inorder to save some multicast filters.
* Fix a bug where driver was not re-setting sds ring count to 1 when
it falls back from MSI-x mode to legacy interrupt mode.
* Reset API lock in adapter when adapter does not reset it at initialization
Please apply to net.
Thanks,
Shahed
Rajesh Borundia (1):
qlcnic: Fix number of rings when we fall back from msix to legacy.
Shahed Shaikh (2):
qlcnic: Fix function return error check
qlcnic: Fix usage of use_msi and use_msi_x module parameters
Sony Chacko (1):
qlcnic: reset firmware API lock during driver load
Sucheta Chakraborty (1):
qlcnic: Allow any VLAN to be configured from VF.
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 1 +
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 18 ++++++++++++++++--
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c | 9 ---------
3 files changed, 17 insertions(+), 11 deletions(-)
--
1.8.1.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH net 1/5] qlcnic: Fix function return error check
2014-02-21 6:23 [PATCH net 0/5] qlcnic: Bug fixes Shahed Shaikh
@ 2014-02-21 6:23 ` Shahed Shaikh
2014-02-21 6:23 ` [PATCH net 2/5] qlcnic: Fix usage of use_msi and use_msi_x module parameters Shahed Shaikh
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Shahed Shaikh @ 2014-02-21 6:23 UTC (permalink / raw)
To: davem; +Cc: netdev, Dept-HSGLinuxNICDev, Shahed Shaikh
From: Shahed Shaikh <shahed.shaikh@qlogic.com>
Driver was treating -ve return value as success in case of
qlcnic_enable_msi_legacy() failure
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index ba78c74..149c4b6 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -818,7 +818,7 @@ static int qlcnic_82xx_setup_intr(struct qlcnic_adapter *adapter)
qlcnic_disable_multi_tx(adapter);
err = qlcnic_enable_msi_legacy(adapter);
- if (!err)
+ if (err)
return err;
}
}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH net 2/5] qlcnic: Fix usage of use_msi and use_msi_x module parameters
2014-02-21 6:23 [PATCH net 0/5] qlcnic: Bug fixes Shahed Shaikh
2014-02-21 6:23 ` [PATCH net 1/5] qlcnic: Fix function return error check Shahed Shaikh
@ 2014-02-21 6:23 ` Shahed Shaikh
2014-02-21 6:23 ` [PATCH net 3/5] qlcnic: Allow any VLAN to be configured from VF Shahed Shaikh
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Shahed Shaikh @ 2014-02-21 6:23 UTC (permalink / raw)
To: davem; +Cc: netdev, Dept-HSGLinuxNICDev, Shahed Shaikh
From: Shahed Shaikh <shahed.shaikh@qlogic.com>
Once interrupts are enabled, instead of using module parameters,
use flags (QLCNIC_MSI_ENABLED and QLCNIC_MSIX_ENABLED) set by driver
to check interrupt mode.
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 149c4b6..e10fc8e 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -3863,7 +3863,7 @@ int qlcnic_validate_rings(struct qlcnic_adapter *adapter, __u32 ring_cnt,
strcpy(buf, "Tx");
}
- if (!qlcnic_use_msi_x && !qlcnic_use_msi) {
+ if (!QLCNIC_IS_MSI_FAMILY(adapter)) {
netdev_err(netdev, "No RSS/TSS support in INT-x mode\n");
return -EINVAL;
}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH net 3/5] qlcnic: Allow any VLAN to be configured from VF.
2014-02-21 6:23 [PATCH net 0/5] qlcnic: Bug fixes Shahed Shaikh
2014-02-21 6:23 ` [PATCH net 1/5] qlcnic: Fix function return error check Shahed Shaikh
2014-02-21 6:23 ` [PATCH net 2/5] qlcnic: Fix usage of use_msi and use_msi_x module parameters Shahed Shaikh
@ 2014-02-21 6:23 ` Shahed Shaikh
2014-02-21 6:23 ` [PATCH net 4/5] qlcnic: Fix number of rings when we fall back from msix to legacy Shahed Shaikh
2014-02-21 6:23 ` [PATCH net 5/5] qlcnic: reset firmware API lock during driver load Shahed Shaikh
4 siblings, 0 replies; 9+ messages in thread
From: Shahed Shaikh @ 2014-02-21 6:23 UTC (permalink / raw)
To: davem; +Cc: netdev, Dept-HSGLinuxNICDev, Sucheta Chakraborty
From: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
o This patch reverts commit 1414abea048e0835c43600d62808ed8163897227
(qlcnic: Restrict VF from configuring any VLAN mode.)
This will allow same multicast address to be used with any VLAN
instead of programming seperate (MAC, VLAN) tuples in adapter.
This will help save some multicast filters.
Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c
index 09acf15..e5277a6 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c
@@ -13,8 +13,6 @@
#define QLC_VF_MIN_TX_RATE 100
#define QLC_VF_MAX_TX_RATE 9999
#define QLC_MAC_OPCODE_MASK 0x7
-#define QLC_MAC_STAR_ADD 6
-#define QLC_MAC_STAR_DEL 7
#define QLC_VF_FLOOD_BIT BIT_16
#define QLC_FLOOD_MODE 0x5
@@ -1206,13 +1204,6 @@ static int qlcnic_sriov_validate_cfg_macvlan(struct qlcnic_adapter *adapter,
struct qlcnic_vport *vp = vf->vp;
u8 op, new_op;
- if (((cmd->req.arg[1] & QLC_MAC_OPCODE_MASK) == QLC_MAC_STAR_ADD) ||
- ((cmd->req.arg[1] & QLC_MAC_OPCODE_MASK) == QLC_MAC_STAR_DEL)) {
- netdev_err(adapter->netdev, "MAC + any VLAN filter not allowed from VF %d\n",
- vf->pci_func);
- return -EINVAL;
- }
-
if (!(cmd->req.arg[1] & BIT_8))
return -EINVAL;
--
1.8.1.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH net 4/5] qlcnic: Fix number of rings when we fall back from msix to legacy.
2014-02-21 6:23 [PATCH net 0/5] qlcnic: Bug fixes Shahed Shaikh
` (2 preceding siblings ...)
2014-02-21 6:23 ` [PATCH net 3/5] qlcnic: Allow any VLAN to be configured from VF Shahed Shaikh
@ 2014-02-21 6:23 ` Shahed Shaikh
2014-02-21 6:23 ` [PATCH net 5/5] qlcnic: reset firmware API lock during driver load Shahed Shaikh
4 siblings, 0 replies; 9+ messages in thread
From: Shahed Shaikh @ 2014-02-21 6:23 UTC (permalink / raw)
To: davem; +Cc: netdev, Dept-HSGLinuxNICDev, Rajesh Borundia
From: Rajesh Borundia <rajesh.borundia@qlogic.com>
o Driver was not re-setting sds ring count to 1 after failing
to allocate msi-x interrupts.
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 1 +
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
index 4146664..27c4f13 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
@@ -340,6 +340,7 @@ int qlcnic_83xx_setup_intr(struct qlcnic_adapter *adapter)
if (qlcnic_sriov_vf_check(adapter))
return -EINVAL;
num_msix = 1;
+ adapter->drv_sds_rings = QLCNIC_SINGLE_RING;
adapter->drv_tx_rings = QLCNIC_SINGLE_RING;
}
}
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index e10fc8e..1222865 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -816,6 +816,7 @@ static int qlcnic_82xx_setup_intr(struct qlcnic_adapter *adapter)
if (!(adapter->flags & QLCNIC_MSIX_ENABLED)) {
qlcnic_disable_multi_tx(adapter);
+ adapter->drv_sds_rings = QLCNIC_SINGLE_RING;
err = qlcnic_enable_msi_legacy(adapter);
if (err)
--
1.8.1.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH net 5/5] qlcnic: reset firmware API lock during driver load
2014-02-21 6:23 [PATCH net 0/5] qlcnic: Bug fixes Shahed Shaikh
` (3 preceding siblings ...)
2014-02-21 6:23 ` [PATCH net 4/5] qlcnic: Fix number of rings when we fall back from msix to legacy Shahed Shaikh
@ 2014-02-21 6:23 ` Shahed Shaikh
2014-02-21 14:36 ` Sergei Shtylyov
4 siblings, 1 reply; 9+ messages in thread
From: Shahed Shaikh @ 2014-02-21 6:23 UTC (permalink / raw)
To: davem; +Cc: netdev, Dept-HSGLinuxNICDev, Sony Chacko
From: Sony Chacko <sony.chacko@qlogic.com>
Firmware is not resetting API lock at initialization,
reset the lock at driver load time.
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 1222865..61f8893 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -2305,6 +2305,18 @@ void qlcnic_set_drv_version(struct qlcnic_adapter *adapter)
qlcnic_fw_cmd_set_drv_version(adapter, fw_cmd);
}
+static void qlcnic_reset_api_lock(struct qlcnic_adapter *adapter)
+{
+ /* Check lock availability*/
+ if (qlcnic_api_lock(adapter)) {
+ /* Lock not available, force release the lock */
+ qlcnic_api_unlock(adapter);
+ } else {
+ /* Lock available, release it before proceeding */
+ qlcnic_api_unlock(adapter);
+ }
+}
+
static int
qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
@@ -2407,6 +2419,7 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (qlcnic_82xx_check(adapter)) {
qlcnic_check_vf(adapter, ent);
adapter->portnum = adapter->ahw->pci_func;
+ qlcnic_reset_api_lock(adapter);
err = qlcnic_start_firmware(adapter);
if (err) {
dev_err(&pdev->dev, "Loading fw failed.Please Reboot\n"
--
1.8.1.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH net 5/5] qlcnic: reset firmware API lock during driver load
2014-02-21 6:23 ` [PATCH net 5/5] qlcnic: reset firmware API lock during driver load Shahed Shaikh
@ 2014-02-21 14:36 ` Sergei Shtylyov
2014-02-21 19:20 ` Sony Chacko
0 siblings, 1 reply; 9+ messages in thread
From: Sergei Shtylyov @ 2014-02-21 14:36 UTC (permalink / raw)
To: Shahed Shaikh, davem; +Cc: netdev, Dept-HSGLinuxNICDev, Sony Chacko
Hello.
On 21-02-2014 10:23, Shahed Shaikh wrote:
> From: Sony Chacko <sony.chacko@qlogic.com>
> Firmware is not resetting API lock at initialization,
> reset the lock at driver load time.
> Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
> ---
> drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
> diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
> index 1222865..61f8893 100644
> --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
> +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
> @@ -2305,6 +2305,18 @@ void qlcnic_set_drv_version(struct qlcnic_adapter *adapter)
> qlcnic_fw_cmd_set_drv_version(adapter, fw_cmd);
> }
>
> +static void qlcnic_reset_api_lock(struct qlcnic_adapter *adapter)
> +{
> + /* Check lock availability*/
> + if (qlcnic_api_lock(adapter)) {
> + /* Lock not available, force release the lock */
> + qlcnic_api_unlock(adapter);
> + } else {
> + /* Lock available, release it before proceeding */
> + qlcnic_api_unlock(adapter);
> + }
Isn't it simpler to just do:
qlcnic_api_lock(adapter);
qlcnic_api_unlock(adapter);
> +}
> +
> static int
> qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> {
WBR, Sergei
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH net 5/5] qlcnic: reset firmware API lock during driver load
2014-02-21 14:36 ` Sergei Shtylyov
@ 2014-02-21 19:20 ` Sony Chacko
0 siblings, 0 replies; 9+ messages in thread
From: Sony Chacko @ 2014-02-21 19:20 UTC (permalink / raw)
To: Sergei Shtylyov, Shahed Shaikh, David Miller
Cc: netdev, Dept-HSG Linux NIC Dev
> -----Original Message-----
> From: Sergei Shtylyov [mailto:sergei.shtylyov@cogentembedded.com]
> Sent: Friday, February 21, 2014 6:36 AM
> To: Shahed Shaikh; David Miller
> Cc: netdev; Dept-HSG Linux NIC Dev; Sony Chacko
> Subject: Re: [PATCH net 5/5] qlcnic: reset firmware API lock during driver load
>
> > From: Sony Chacko <sony.chacko@qlogic.com>
>
> > Firmware is not resetting API lock at initialization, reset the lock
> > at driver load time.
>
> > Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
> > ---
> > +static void qlcnic_reset_api_lock(struct qlcnic_adapter *adapter) {
> > + /* Check lock availability*/
> > + if (qlcnic_api_lock(adapter)) {
> > + /* Lock not available, force release the lock */
> > + qlcnic_api_unlock(adapter);
> > + } else {
> > + /* Lock available, release it before proceeding */
> > + qlcnic_api_unlock(adapter);
> > + }
>
> Isn't it simpler to just do:
>
> qlcnic_api_lock(adapter);
> qlcnic_api_unlock(adapter);
> WBR, Sergei
Thanks, I will rework this patch.
--Sony
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-02-21 19:20 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-21 6:23 [PATCH net 0/5] qlcnic: Bug fixes Shahed Shaikh
2014-02-21 6:23 ` [PATCH net 1/5] qlcnic: Fix function return error check Shahed Shaikh
2014-02-21 6:23 ` [PATCH net 2/5] qlcnic: Fix usage of use_msi and use_msi_x module parameters Shahed Shaikh
2014-02-21 6:23 ` [PATCH net 3/5] qlcnic: Allow any VLAN to be configured from VF Shahed Shaikh
2014-02-21 6:23 ` [PATCH net 4/5] qlcnic: Fix number of rings when we fall back from msix to legacy Shahed Shaikh
2014-02-21 6:23 ` [PATCH net 5/5] qlcnic: reset firmware API lock during driver load Shahed Shaikh
2014-02-21 14:36 ` Sergei Shtylyov
2014-02-21 19:20 ` Sony Chacko
-- strict thread matches above, loose matches on Subject: below --
2013-12-10 17:33 [PATCH net 0/5] qlcnic: Bug fixes Himanshu Madhani
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).