aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fnic
diff options
context:
space:
mode:
authorHiral Shah <hishah@cisco.com>2014-11-10 15:54:32 -0500
committerChristoph Hellwig <hch@lst.de>2014-11-20 03:10:08 -0500
commita232bfbe195df4b85ff9e5876534fe4081d9fd9a (patch)
tree542e09e08c880ba99b78ccf640abb16509219636 /drivers/scsi/fnic
parent2043e1fd09c1896bb03a6e25b64baa84a30879c9 (diff)
Fnic: Not probing all the vNICS via fnic_probe on boot
In fnic_dev_wait, Wait for finish to complete at least three times in two seconds while loop before returning -ETIMEDOUT as sometime schedule_timeout_uninterruptible takes more than two seconds to wake up. - Increment fnic version from 1.6.0.11 to 1.6.0.12 Signed-off-by: Hiral Shah <hishah@cisco.com> Signed-off-by: Sesidhar Baddela <sebaddel@cisco.com> Signed-off-by: Anil Chintalapati <achintal@cisco.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/fnic')
-rw-r--r--drivers/scsi/fnic/fnic.h2
-rw-r--r--drivers/scsi/fnic/fnic_main.c13
2 files changed, 12 insertions, 3 deletions
diff --git a/drivers/scsi/fnic/fnic.h b/drivers/scsi/fnic/fnic.h
index bf8d34c26f13..69dee6838678 100644
--- a/drivers/scsi/fnic/fnic.h
+++ b/drivers/scsi/fnic/fnic.h
@@ -39,7 +39,7 @@
39 39
40#define DRV_NAME "fnic" 40#define DRV_NAME "fnic"
41#define DRV_DESCRIPTION "Cisco FCoE HBA Driver" 41#define DRV_DESCRIPTION "Cisco FCoE HBA Driver"
42#define DRV_VERSION "1.6.0.11" 42#define DRV_VERSION "1.6.0.12"
43#define PFX DRV_NAME ": " 43#define PFX DRV_NAME ": "
44#define DFX DRV_NAME "%d: " 44#define DFX DRV_NAME "%d: "
45 45
diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c
index cf1560c30b7f..1e5706ed9a40 100644
--- a/drivers/scsi/fnic/fnic_main.c
+++ b/drivers/scsi/fnic/fnic_main.c
@@ -437,21 +437,30 @@ static int fnic_dev_wait(struct vnic_dev *vdev,
437 unsigned long time; 437 unsigned long time;
438 int done; 438 int done;
439 int err; 439 int err;
440 int count;
441
442 count = 0;
440 443
441 err = start(vdev, arg); 444 err = start(vdev, arg);
442 if (err) 445 if (err)
443 return err; 446 return err;
444 447
445 /* Wait for func to complete...2 seconds max */ 448 /* Wait for func to complete.
449 * Sometime schedule_timeout_uninterruptible take long time
450 * to wake up so we do not retry as we are only waiting for
451 * 2 seconds in while loop. By adding count, we make sure
452 * we try atleast three times before returning -ETIMEDOUT
453 */
446 time = jiffies + (HZ * 2); 454 time = jiffies + (HZ * 2);
447 do { 455 do {
448 err = finished(vdev, &done); 456 err = finished(vdev, &done);
457 count++;
449 if (err) 458 if (err)
450 return err; 459 return err;
451 if (done) 460 if (done)
452 return 0; 461 return 0;
453 schedule_timeout_uninterruptible(HZ / 10); 462 schedule_timeout_uninterruptible(HZ / 10);
454 } while (time_after(time, jiffies)); 463 } while (time_after(time, jiffies) || (count < 3));
455 464
456 return -ETIMEDOUT; 465 return -ETIMEDOUT;
457} 466}