aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/enic/vnic_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/enic/vnic_dev.c')
-rw-r--r--drivers/net/enic/vnic_dev.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/enic/vnic_dev.c b/drivers/net/enic/vnic_dev.c
index 180912f48007..662123c9581e 100644
--- a/drivers/net/enic/vnic_dev.c
+++ b/drivers/net/enic/vnic_dev.c
@@ -275,6 +275,11 @@ static int _vnic_dev_cmd(struct vnic_dev *vdev, enum vnic_devcmd_cmd cmd,
275 int err; 275 int err;
276 276
277 status = ioread32(&devcmd->status); 277 status = ioread32(&devcmd->status);
278 if (status == 0xFFFFFFFF) {
279 /* PCI-e target device is gone */
280 return -ENODEV;
281 }
282
278 if (status & STAT_BUSY) { 283 if (status & STAT_BUSY) {
279 pr_err("Busy devcmd %d\n", _CMD_N(cmd)); 284 pr_err("Busy devcmd %d\n", _CMD_N(cmd));
280 return -EBUSY; 285 return -EBUSY;
@@ -296,6 +301,10 @@ static int _vnic_dev_cmd(struct vnic_dev *vdev, enum vnic_devcmd_cmd cmd,
296 udelay(100); 301 udelay(100);
297 302
298 status = ioread32(&devcmd->status); 303 status = ioread32(&devcmd->status);
304 if (status == 0xFFFFFFFF) {
305 /* PCI-e target device is gone */
306 return -ENODEV;
307 }
299 308
300 if (!(status & STAT_BUSY)) { 309 if (!(status & STAT_BUSY)) {
301 310