* [Intel-wired-lan] [PATCH] fm10k: don't continue probe if PCI device not in normal IO state
@ 2016-06-14 23:26 Jacob Keller
2016-06-23 5:24 ` Jeff Kirsher
0 siblings, 1 reply; 3+ messages in thread
From: Jacob Keller @ 2016-06-14 23:26 UTC (permalink / raw)
To: intel-wired-lan
In the event of an uncorrectable AER error occuring when the driver has
not loaded, the recovery routines are not done. This is done because
future loads of the driver may not be aware of the IO state and may not
be able to recover at all. In this case, when we next load the driver it
fails due to what appears to be a surprise remove event. Instead, add
a check to ensure that the device is in the normal IO state before
continuing to probe. This allows us to give a more descriptive message
of what is wrong.
Without this change, the driver will attempt to probe up to our first
call of .reset_hw() which will be unable to read registers and act as if
a surprise remove event occurred.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
index b0c3d7b3a34c..e23923729541 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
@@ -1950,6 +1950,12 @@ static int fm10k_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
struct fm10k_intfc *interface;
int err;
+ if (pdev->error_state != pci_channel_io_normal) {
+ dev_err(&pdev->dev,
+ "PCI device still in an error state. Unable to load...\n");
+ return -EIO;
+ }
+
err = pci_enable_device_mem(pdev);
if (err) {
dev_err(&pdev->dev,
--
2.9.0.rc1.405.g81f467e
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Intel-wired-lan] [PATCH] fm10k: don't continue probe if PCI device not in normal IO state
2016-06-14 23:26 [Intel-wired-lan] [PATCH] fm10k: don't continue probe if PCI device not in normal IO state Jacob Keller
@ 2016-06-23 5:24 ` Jeff Kirsher
2016-06-23 20:12 ` Keller, Jacob E
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Kirsher @ 2016-06-23 5:24 UTC (permalink / raw)
To: intel-wired-lan
On Tue, 2016-06-14 at 16:26 -0700, Jacob Keller wrote:
> In the event of an uncorrectable AER error occuring when the driver has
> not loaded, the recovery routines are not done. This is done because
> future loads of the driver may not be aware of the IO state and may not
> be able to recover at all. In this case, when we next load the driver it
> fails due to what appears to be a surprise remove event. Instead, add
> a check to ensure that the device is in the normal IO state before
> continuing to probe. This allows us to give a more descriptive message
> of what is wrong.
>
> Without this change, the driver will attempt to probe up to our first
> call of .reset_hw() which will be unable to read registers and act as if
> a surprise remove event occurred.
>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---
> ?drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 6 ++++++
> ?1 file changed, 6 insertions(+)
This does not apply at all, the code was already removed in a previous
patch. ?So I am dropping this patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20160622/926489df/attachment.asc>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Intel-wired-lan] [PATCH] fm10k: don't continue probe if PCI device not in normal IO state
2016-06-23 5:24 ` Jeff Kirsher
@ 2016-06-23 20:12 ` Keller, Jacob E
0 siblings, 0 replies; 3+ messages in thread
From: Keller, Jacob E @ 2016-06-23 20:12 UTC (permalink / raw)
To: intel-wired-lan
On Wed, 2016-06-22 at 22:24 -0700, Jeff Kirsher wrote:
> On Tue, 2016-06-14 at 16:26 -0700, Jacob Keller wrote:
> > In the event of an uncorrectable AER error occuring when the driver
> > has
> > not loaded, the recovery routines are not done. This is done
> > because
> > future loads of the driver may not be aware of the IO state and may
> > not
> > be able to recover at all. In this case, when we next load the
> > driver it
> > fails due to what appears to be a surprise remove event. Instead,
> > add
> > a check to ensure that the device is in the normal IO state before
> > continuing to probe. This allows us to give a more descriptive
> > message
> > of what is wrong.
> >
> > Without this change, the driver will attempt to probe up to our
> > first
> > call of .reset_hw() which will be unable to read registers and act
> > as if
> > a surprise remove event occurred.
> >
> > Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> > ---
> > ?drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 6 ++++++
> > ?1 file changed, 6 insertions(+)
>
> This does not apply at all, the code was already removed in a
> previous
> patch. ?So I am dropping this patch.
I'll take a look and re-submit a version on top of queue if we still
need something.
Thanks,
Jake
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-23 20:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-14 23:26 [Intel-wired-lan] [PATCH] fm10k: don't continue probe if PCI device not in normal IO state Jacob Keller
2016-06-23 5:24 ` Jeff Kirsher
2016-06-23 20:12 ` Keller, Jacob E
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.