* [PATCH] netxen: avoid using reset_devices as it may become obsolete
@ 2010-11-23 13:08 Amit Kumar Salecha
2010-11-28 18:48 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Amit Kumar Salecha @ 2010-11-23 13:08 UTC (permalink / raw)
To: davem; +Cc: netdev, ameen.rahman, anirban.chakraborty, Rajesh Borundia
From: Rajesh Borundia <rajesh.borundia@qlogic.com>
In kdump environment do not depend on reset_devices
parameter to reset the device as the parameter may become obsolete.
Instead use an adapter specific mechanism to determine if the device
needs a reset.
Driver maintains a count of number of pci functions probed
and decrements the count when remove handler of that pci function
is called. If the first probe, probe of function 0,
detects the count as non zero then reset the device.
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
---
drivers/net/netxen/netxen_nic_main.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index e1d30d7..ceeaac9 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -1277,6 +1277,7 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
int i = 0, err;
int pci_func_id = PCI_FUNC(pdev->devfn);
uint8_t revision_id;
+ u32 val;
if (pdev->revision >= NX_P3_A0 && pdev->revision <= NX_P3_B1) {
pr_warning("%s: chip revisions between 0x%x-0x%x "
@@ -1352,8 +1353,9 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
break;
}
- if (reset_devices) {
- if (adapter->portnum == 0) {
+ if (adapter->portnum == 0) {
+ val = NXRD32(adapter, NX_CRB_DEV_REF_COUNT);
+ if (val != 0xffffffff && val != 0) {
NXWR32(adapter, NX_CRB_DEV_REF_COUNT, 0);
adapter->need_fw_reset = 1;
}
--
1.7.3.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] netxen: avoid using reset_devices as it may become obsolete
2010-11-23 13:08 [PATCH] netxen: avoid using reset_devices as it may become obsolete Amit Kumar Salecha
@ 2010-11-28 18:48 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-11-28 18:48 UTC (permalink / raw)
To: amit.salecha; +Cc: netdev, ameen.rahman, anirban.chakraborty, rajesh.borundia
From: Amit Kumar Salecha <amit.salecha@qlogic.com>
Date: Tue, 23 Nov 2010 05:08:27 -0800
> From: Rajesh Borundia <rajesh.borundia@qlogic.com>
>
> In kdump environment do not depend on reset_devices
> parameter to reset the device as the parameter may become obsolete.
> Instead use an adapter specific mechanism to determine if the device
> needs a reset.
>
> Driver maintains a count of number of pci functions probed
> and decrements the count when remove handler of that pci function
> is called. If the first probe, probe of function 0,
> detects the count as non zero then reset the device.
>
> Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-28 18:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-23 13:08 [PATCH] netxen: avoid using reset_devices as it may become obsolete Amit Kumar Salecha
2010-11-28 18:48 ` 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).