netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/4] qlcnic: bug fixes
@ 2013-07-26 20:23 Himanshu Madhani
  2013-07-28  3:03 ` David Miller
  0 siblings, 1 reply; 10+ messages in thread
From: Himanshu Madhani @ 2013-07-26 20:23 UTC (permalink / raw)
  To: davem; +Cc: netdev, Dept_NX_Linux_NIC_Driver, Himanshu Madhani

From: Himanshu Madhani <himanshu.madhani@qlogic.com>

Please apply to net.

Thanks,
Himanshu

Jitendra Kalsaria (1):
  qlcnic: Fix initialization of work function.

Manish Chopra (2):
  qlcnic: Fix setting Guest VLAN
  qlcnic: Fix diagnostic interrupt test for 83xx adapters.

Pratik Pujar (1):
  qlcnic: Fix operation type and command type.

 .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c  |  4 +--
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c   |  2 ++
 .../ethernet/qlogic/qlcnic/qlcnic_sriov_common.c   |  2 ++
 .../net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c   | 30 +++++++++++++++++++---
 4 files changed, 32 insertions(+), 6 deletions(-)

-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH net 0/4] qlcnic: bug fixes
  2013-07-26 20:23 Himanshu Madhani
@ 2013-07-28  3:03 ` David Miller
  0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2013-07-28  3:03 UTC (permalink / raw)
  To: himanshu.madhani; +Cc: netdev, Dept_NX_Linux_NIC_Driver

From: Himanshu Madhani <himanshu.madhani@qlogic.com>
Date: Fri, 26 Jul 2013 16:23:59 -0400

> Please apply to net.

Series applied, thanks.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH net 0/4] qlcnic: bug fixes
@ 2014-01-28 16:55 Rajesh Borundia
  2014-01-28 20:00 ` David Miller
  0 siblings, 1 reply; 10+ messages in thread
From: Rajesh Borundia @ 2014-01-28 16:55 UTC (permalink / raw)
  To: davem; +Cc: netdev, Dept_NX_Linux_NIC_Driver

The patch series contains following bug fixes

o Bound checks for number of receive descriptors and number of recieve rings.
  Both of these have off-by-one errors.
o Vlan list was getting re-initialized in case of adapter reset.
o Tx queue was timing out because of missing start queue for a corresponding
  netif_tx_disable.
o Loopback test failed because driver was not setting linkup variable
  while handling link events.
 
Please apply to net.

Manish Chopra (1):
  qlcnic: Correct off-by-one errors in bounds checks

Rajesh Borundia (2):
  qlcnic: Fix initialization of vlan list.
  qlcnic: Fix tx timeout.

Shahed Shaikh (1):
  qlcnic: Fix loopback test failure

 drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c     |   19 ++++++++++++-------
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c   |    9 ++-------
 .../ethernet/qlogic/qlcnic/qlcnic_sriov_common.c   |   11 +++++------
 3 files changed, 19 insertions(+), 20 deletions(-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH net 0/4] qlcnic: bug fixes
  2014-01-28 16:55 [PATCH net 0/4] qlcnic: bug fixes Rajesh Borundia
@ 2014-01-28 20:00 ` David Miller
  0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2014-01-28 20:00 UTC (permalink / raw)
  To: rajesh.borundia; +Cc: netdev, Dept_NX_Linux_NIC_Driver

From: Rajesh Borundia <rajesh.borundia@qlogic.com>
Date: Tue, 28 Jan 2014 11:55:26 -0500

> The patch series contains following bug fixes
> 
> o Bound checks for number of receive descriptors and number of recieve rings.
>   Both of these have off-by-one errors.
> o Vlan list was getting re-initialized in case of adapter reset.
> o Tx queue was timing out because of missing start queue for a corresponding
>   netif_tx_disable.
> o Loopback test failed because driver was not setting linkup variable
>   while handling link events.
>  
> Please apply to net.

Series applied, thanks.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH net 0/4] qlcnic: Bug fixes.
@ 2014-09-22  9:51 Manish Chopra
  2014-09-22  9:51 ` [PATCH net 1/4] qlcnic: Use qlcnic_83xx_flash_read32() API instead of lockless version of the API Manish Chopra
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Manish Chopra @ 2014-09-22  9:51 UTC (permalink / raw)
  To: davem; +Cc: netdev, Dept-GELinuxNICDev

Hi David,

This patch series contains following bug fixes:

* Fixes related to ethtool statistics.
* Fix for flash read related API.

Please apply this series to 'net'.

Thanks,
Manish

Manish Chopra (3):
  qlcnic: Fix memory corruption while reading stats using ethtool.
  qlcnic: Remove __QLCNIC_DEV_UP bit check to read TX queues
    statistics.
  qlcnic: Fix ordering of stats in stats buffer.

Sony Chacko (1):
  qlcnic: Use qlcnic_83xx_flash_read32() API instead of lockless
    version of the API.

 .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c  |    5 ++---
 .../net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c    |   10 +++++-----
 2 files changed, 7 insertions(+), 8 deletions(-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH net 1/4] qlcnic: Use qlcnic_83xx_flash_read32() API instead of lockless version of the API.
  2014-09-22  9:51 [PATCH net 0/4] qlcnic: Bug fixes Manish Chopra
@ 2014-09-22  9:51 ` Manish Chopra
  2014-09-22  9:51 ` [PATCH net 2/4] qlcnic: Fix memory corruption while reading stats using ethtool Manish Chopra
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Manish Chopra @ 2014-09-22  9:51 UTC (permalink / raw)
  To: davem; +Cc: netdev, Dept-GELinuxNICDev, Sony Chacko

From: Sony Chacko <sony.chacko@qlogic.com>

In qlcnic_83xx_setup_idc_parameters() routine use qlcnic_83xx_flash_read32() API
which takes flash lock internally instead of the lockless version
qlcnic_83xx_lockless_flash_read32().

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
---
 .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c  |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
index 86783e1..3172cdf 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
@@ -1177,9 +1177,8 @@ static void qlcnic_83xx_setup_idc_parameters(struct qlcnic_adapter *adapter)
 {
 	u32 idc_params, val;
 
-	if (qlcnic_83xx_lockless_flash_read32(adapter,
-					      QLC_83XX_IDC_FLASH_PARAM_ADDR,
-					      (u8 *)&idc_params, 1)) {
+	if (qlcnic_83xx_flash_read32(adapter, QLC_83XX_IDC_FLASH_PARAM_ADDR,
+				     (u8 *)&idc_params, 1)) {
 		dev_info(&adapter->pdev->dev,
 			 "%s:failed to get IDC params from flash\n", __func__);
 		adapter->dev_init_timeo = QLC_83XX_IDC_INIT_TIMEOUT_SECS;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH net 2/4] qlcnic: Fix memory corruption while reading stats using ethtool.
  2014-09-22  9:51 [PATCH net 0/4] qlcnic: Bug fixes Manish Chopra
  2014-09-22  9:51 ` [PATCH net 1/4] qlcnic: Use qlcnic_83xx_flash_read32() API instead of lockless version of the API Manish Chopra
@ 2014-09-22  9:51 ` Manish Chopra
  2014-09-22  9:51 ` [PATCH net 3/4] qlcnic: Remove __QLCNIC_DEV_UP bit check to read TX queues statistics Manish Chopra
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Manish Chopra @ 2014-09-22  9:51 UTC (permalink / raw)
  To: davem; +Cc: netdev, Dept-GELinuxNICDev

o  Driver is doing memset with zero for total number of stats bytes when
   it has already filled some data in the stats buffer, which can overwrite
   memory area beyond the length of stats buffer.

o  Fix this by initializing stats buffer with zero before filling any data in it.

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
---
 .../net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c    |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
index 141f116..2d77b76 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
@@ -1333,12 +1333,11 @@ static void qlcnic_get_ethtool_stats(struct net_device *dev,
 	struct qlcnic_host_tx_ring *tx_ring;
 	struct qlcnic_esw_statistics port_stats;
 	struct qlcnic_mac_statistics mac_stats;
-	int index, ret, length, size, tx_size, ring;
+	int index, ret, length, size, ring;
 	char *p;
 
-	tx_size = adapter->drv_tx_rings * QLCNIC_TX_STATS_LEN;
+	memset(data, 0, stats->n_stats * sizeof(u64));
 
-	memset(data, 0, tx_size * sizeof(u64));
 	for (ring = 0, index = 0; ring < adapter->drv_tx_rings; ring++) {
 		if (test_bit(__QLCNIC_DEV_UP, &adapter->state)) {
 			tx_ring = &adapter->tx_ring[ring];
@@ -1347,7 +1346,6 @@ static void qlcnic_get_ethtool_stats(struct net_device *dev,
 		}
 	}
 
-	memset(data, 0, stats->n_stats * sizeof(u64));
 	length = QLCNIC_STATS_LEN;
 	for (index = 0; index < length; index++) {
 		p = (char *)adapter + qlcnic_gstrings_stats[index].stat_offset;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH net 3/4] qlcnic: Remove __QLCNIC_DEV_UP bit check to read TX queues statistics.
  2014-09-22  9:51 [PATCH net 0/4] qlcnic: Bug fixes Manish Chopra
  2014-09-22  9:51 ` [PATCH net 1/4] qlcnic: Use qlcnic_83xx_flash_read32() API instead of lockless version of the API Manish Chopra
  2014-09-22  9:51 ` [PATCH net 2/4] qlcnic: Fix memory corruption while reading stats using ethtool Manish Chopra
@ 2014-09-22  9:51 ` Manish Chopra
  2014-09-22  9:51 ` [PATCH net 4/4] qlcnic: Fix ordering of stats in stats buffer Manish Chopra
  2014-09-26 19:12 ` [PATCH net 0/4] qlcnic: Bug fixes David Miller
  4 siblings, 0 replies; 10+ messages in thread
From: Manish Chopra @ 2014-09-22  9:51 UTC (permalink / raw)
  To: davem; +Cc: netdev, Dept-GELinuxNICDev

o TX queues stats must be read when queues are allocated regardless
  of interface is up or not.

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
---
 .../net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c    |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
index 2d77b76..863c445 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
@@ -1339,7 +1339,7 @@ static void qlcnic_get_ethtool_stats(struct net_device *dev,
 	memset(data, 0, stats->n_stats * sizeof(u64));
 
 	for (ring = 0, index = 0; ring < adapter->drv_tx_rings; ring++) {
-		if (test_bit(__QLCNIC_DEV_UP, &adapter->state)) {
+		if (adapter->is_up == QLCNIC_ADAPTER_UP_MAGIC) {
 			tx_ring = &adapter->tx_ring[ring];
 			data = qlcnic_fill_tx_queue_stats(data, tx_ring);
 			qlcnic_update_stats(adapter);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH net 4/4] qlcnic: Fix ordering of stats in stats buffer.
  2014-09-22  9:51 [PATCH net 0/4] qlcnic: Bug fixes Manish Chopra
                   ` (2 preceding siblings ...)
  2014-09-22  9:51 ` [PATCH net 3/4] qlcnic: Remove __QLCNIC_DEV_UP bit check to read TX queues statistics Manish Chopra
@ 2014-09-22  9:51 ` Manish Chopra
  2014-09-26 19:12 ` [PATCH net 0/4] qlcnic: Bug fixes David Miller
  4 siblings, 0 replies; 10+ messages in thread
From: Manish Chopra @ 2014-09-22  9:51 UTC (permalink / raw)
  To: davem; +Cc: netdev, Dept-GELinuxNICDev

o When TX queues are not allocated, driver does not fill TX queues stats in the buffer.
  However, it is also not advancing data pointer by TX queue stats length, which would
  misplace all successive stats data in the buffer and will result in mismatch between
  stats strings and it's values.

o Fix this by advancing data pointer by TX queue stats length when
  queues are not allocated.

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
---
 .../net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c    |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
index 863c445..494e810 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
@@ -1343,6 +1343,8 @@ static void qlcnic_get_ethtool_stats(struct net_device *dev,
 			tx_ring = &adapter->tx_ring[ring];
 			data = qlcnic_fill_tx_queue_stats(data, tx_ring);
 			qlcnic_update_stats(adapter);
+		} else {
+			data += QLCNIC_TX_STATS_LEN;
 		}
 	}
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH net 0/4] qlcnic: Bug fixes.
  2014-09-22  9:51 [PATCH net 0/4] qlcnic: Bug fixes Manish Chopra
                   ` (3 preceding siblings ...)
  2014-09-22  9:51 ` [PATCH net 4/4] qlcnic: Fix ordering of stats in stats buffer Manish Chopra
@ 2014-09-26 19:12 ` David Miller
  4 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2014-09-26 19:12 UTC (permalink / raw)
  To: manish.chopra; +Cc: netdev, Dept-GELinuxNICDev

From: Manish Chopra <manish.chopra@qlogic.com>
Date: Mon, 22 Sep 2014 05:51:49 -0400

> This patch series contains following bug fixes:
> 
> * Fixes related to ethtool statistics.
> * Fix for flash read related API.
> 
> Please apply this series to 'net'.

Series applied, thanks.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-09-26 19:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-22  9:51 [PATCH net 0/4] qlcnic: Bug fixes Manish Chopra
2014-09-22  9:51 ` [PATCH net 1/4] qlcnic: Use qlcnic_83xx_flash_read32() API instead of lockless version of the API Manish Chopra
2014-09-22  9:51 ` [PATCH net 2/4] qlcnic: Fix memory corruption while reading stats using ethtool Manish Chopra
2014-09-22  9:51 ` [PATCH net 3/4] qlcnic: Remove __QLCNIC_DEV_UP bit check to read TX queues statistics Manish Chopra
2014-09-22  9:51 ` [PATCH net 4/4] qlcnic: Fix ordering of stats in stats buffer Manish Chopra
2014-09-26 19:12 ` [PATCH net 0/4] qlcnic: Bug fixes David Miller
  -- strict thread matches above, loose matches on Subject: below --
2014-01-28 16:55 [PATCH net 0/4] qlcnic: bug fixes Rajesh Borundia
2014-01-28 20:00 ` David Miller
2013-07-26 20:23 Himanshu Madhani
2013-07-28  3:03 ` David Miller

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).