netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 NEXT 0/2]qlcnic: minor fixes
@ 2011-02-23 13:21 Amit Kumar Salecha
  2011-02-23 13:21 ` [PATCHv2 NEXT 1/2] qlcnic: fix checks for auto_fw_reset Amit Kumar Salecha
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Amit Kumar Salecha @ 2011-02-23 13:21 UTC (permalink / raw)
  To: davem; +Cc: netdev, ameen.rahman, anirban.chakraborty

Hi
  Series v2 of minor fixes. Apply them on net-next.
  Now, patch 1 doesn't change module parameters name and its properties.

-Amit

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

* [PATCHv2 NEXT 1/2] qlcnic: fix checks for auto_fw_reset
  2011-02-23 13:21 [PATCHv2 NEXT 0/2]qlcnic: minor fixes Amit Kumar Salecha
@ 2011-02-23 13:21 ` Amit Kumar Salecha
  2011-02-23 13:21 ` [PATCHv2 NEXT 2/2] qlcnic: Remove validation for max tx and max rx queues Amit Kumar Salecha
  2011-02-23 22:23 ` [PATCHv2 NEXT 0/2]qlcnic: minor fixes David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Amit Kumar Salecha @ 2011-02-23 13:21 UTC (permalink / raw)
  To: davem; +Cc: netdev, ameen.rahman, anirban.chakraborty

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>
---
 drivers/net/qlcnic/qlcnic.h      |    1 -
 drivers/net/qlcnic/qlcnic_main.c |    9 ++++-----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/net/qlcnic/qlcnic.h b/drivers/net/qlcnic/qlcnic.h
index 44e316f..fa7f794 100644
--- a/drivers/net/qlcnic/qlcnic.h
+++ b/drivers/net/qlcnic/qlcnic.h
@@ -867,7 +867,6 @@ struct qlcnic_nic_intr_coalesce {
 #define LINKEVENT_LINKSPEED_MBPS	0
 #define LINKEVENT_LINKSPEED_ENCODED	1
 
-#define AUTO_FW_RESET_ENABLED	0x01
 /* firmware response header:
  *	63:58 - message type
  *	57:56 - owner
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
index 37c04b4..4994b94 100644
--- a/drivers/net/qlcnic/qlcnic_main.c
+++ b/drivers/net/qlcnic/qlcnic_main.c
@@ -42,7 +42,7 @@ static int use_msi_x = 1;
 module_param(use_msi_x, int, 0444);
 MODULE_PARM_DESC(use_msi_x, "MSI-X interrupt (0=disabled, 1=enabled");
 
-static int auto_fw_reset = AUTO_FW_RESET_ENABLED;
+static int auto_fw_reset = 1;
 module_param(auto_fw_reset, int, 0644);
 MODULE_PARM_DESC(auto_fw_reset, "Auto firmware reset (0=disabled, 1=enabled");
 
@@ -2959,8 +2959,7 @@ qlcnic_check_health(struct qlcnic_adapter *adapter)
 		if (adapter->need_fw_reset)
 			goto detach;
 
-		if (adapter->reset_context &&
-		    auto_fw_reset == AUTO_FW_RESET_ENABLED) {
+		if (adapter->reset_context && auto_fw_reset) {
 			qlcnic_reset_hw_context(adapter);
 			adapter->netdev->trans_start = jiffies;
 		}
@@ -2973,7 +2972,7 @@ qlcnic_check_health(struct qlcnic_adapter *adapter)
 
 	qlcnic_dev_request_reset(adapter);
 
-	if ((auto_fw_reset == AUTO_FW_RESET_ENABLED))
+	if (auto_fw_reset)
 		clear_bit(__QLCNIC_FW_ATTACHED, &adapter->state);
 
 	dev_info(&netdev->dev, "firmware hang detected\n");
@@ -2982,7 +2981,7 @@ detach:
 	adapter->dev_state = (state == QLCNIC_DEV_NEED_QUISCENT) ? state :
 		QLCNIC_DEV_NEED_RESET;
 
-	if ((auto_fw_reset == AUTO_FW_RESET_ENABLED) &&
+	if (auto_fw_reset &&
 		!test_and_set_bit(__QLCNIC_RESETTING, &adapter->state)) {
 
 		qlcnic_schedule_work(adapter, qlcnic_detach_work, 0);
-- 
1.7.3.2


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

* [PATCHv2 NEXT 2/2] qlcnic: Remove validation for max tx and max rx queues
  2011-02-23 13:21 [PATCHv2 NEXT 0/2]qlcnic: minor fixes Amit Kumar Salecha
  2011-02-23 13:21 ` [PATCHv2 NEXT 1/2] qlcnic: fix checks for auto_fw_reset Amit Kumar Salecha
@ 2011-02-23 13:21 ` Amit Kumar Salecha
  2011-02-23 22:23 ` [PATCHv2 NEXT 0/2]qlcnic: minor fixes David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Amit Kumar Salecha @ 2011-02-23 13:21 UTC (permalink / raw)
  To: davem; +Cc: netdev, ameen.rahman, anirban.chakraborty, Rajesh Borundia

From: Rajesh Borundia <rajesh.borundia@qlogic.com>

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>
---
 drivers/net/qlcnic/qlcnic.h      |    4 ----
 drivers/net/qlcnic/qlcnic_main.c |    6 ++----
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/net/qlcnic/qlcnic.h b/drivers/net/qlcnic/qlcnic.h
index fa7f794..dc44564 100644
--- a/drivers/net/qlcnic/qlcnic.h
+++ b/drivers/net/qlcnic/qlcnic.h
@@ -1132,14 +1132,10 @@ struct qlcnic_eswitch {
 #define MAX_BW			100	/* % of link speed */
 #define MAX_VLAN_ID		4095
 #define MIN_VLAN_ID		2
-#define MAX_TX_QUEUES		1
-#define MAX_RX_QUEUES		4
 #define DEFAULT_MAC_LEARN	1
 
 #define IS_VALID_VLAN(vlan)	(vlan >= MIN_VLAN_ID && vlan < MAX_VLAN_ID)
 #define IS_VALID_BW(bw)		(bw <= MAX_BW)
-#define IS_VALID_TX_QUEUES(que)	(que > 0 && que <= MAX_TX_QUEUES)
-#define IS_VALID_RX_QUEUES(que)	(que > 0 && que <= MAX_RX_QUEUES)
 
 struct qlcnic_pci_func_cfg {
 	u16	func_type;
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
index 4994b94..cd88c7e 100644
--- a/drivers/net/qlcnic/qlcnic_main.c
+++ b/drivers/net/qlcnic/qlcnic_main.c
@@ -3653,10 +3653,8 @@ validate_npar_config(struct qlcnic_adapter *adapter,
 		if (adapter->npars[pci_func].type != QLCNIC_TYPE_NIC)
 			return QL_STATUS_INVALID_PARAM;
 
-		if (!IS_VALID_BW(np_cfg[i].min_bw)
-				|| !IS_VALID_BW(np_cfg[i].max_bw)
-				|| !IS_VALID_RX_QUEUES(np_cfg[i].max_rx_queues)
-				|| !IS_VALID_TX_QUEUES(np_cfg[i].max_tx_queues))
+		if (!IS_VALID_BW(np_cfg[i].min_bw) ||
+		    !IS_VALID_BW(np_cfg[i].max_bw))
 			return QL_STATUS_INVALID_PARAM;
 	}
 	return 0;
-- 
1.7.3.2


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

* Re: [PATCHv2 NEXT 0/2]qlcnic: minor fixes
  2011-02-23 13:21 [PATCHv2 NEXT 0/2]qlcnic: minor fixes Amit Kumar Salecha
  2011-02-23 13:21 ` [PATCHv2 NEXT 1/2] qlcnic: fix checks for auto_fw_reset Amit Kumar Salecha
  2011-02-23 13:21 ` [PATCHv2 NEXT 2/2] qlcnic: Remove validation for max tx and max rx queues Amit Kumar Salecha
@ 2011-02-23 22:23 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2011-02-23 22:23 UTC (permalink / raw)
  To: amit.salecha; +Cc: netdev, ameen.rahman, anirban.chakraborty

From: Amit Kumar Salecha <amit.salecha@qlogic.com>
Date: Wed, 23 Feb 2011 05:21:23 -0800

> Hi
>   Series v2 of minor fixes. Apply them on net-next.
>   Now, patch 1 doesn't change module parameters name and its properties.

Both applied, thanks.

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

end of thread, other threads:[~2011-02-23 22:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-23 13:21 [PATCHv2 NEXT 0/2]qlcnic: minor fixes Amit Kumar Salecha
2011-02-23 13:21 ` [PATCHv2 NEXT 1/2] qlcnic: fix checks for auto_fw_reset Amit Kumar Salecha
2011-02-23 13:21 ` [PATCHv2 NEXT 2/2] qlcnic: Remove validation for max tx and max rx queues Amit Kumar Salecha
2011-02-23 22:23 ` [PATCHv2 NEXT 0/2]qlcnic: minor fixes 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).