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>
This commit is contained in:
Родитель
2043e1fd09
Коммит
a232bfbe19
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
#define DRV_NAME "fnic"
|
#define DRV_NAME "fnic"
|
||||||
#define DRV_DESCRIPTION "Cisco FCoE HBA Driver"
|
#define DRV_DESCRIPTION "Cisco FCoE HBA Driver"
|
||||||
#define DRV_VERSION "1.6.0.11"
|
#define DRV_VERSION "1.6.0.12"
|
||||||
#define PFX DRV_NAME ": "
|
#define PFX DRV_NAME ": "
|
||||||
#define DFX DRV_NAME "%d: "
|
#define DFX DRV_NAME "%d: "
|
||||||
|
|
||||||
|
|
|
@ -437,21 +437,30 @@ static int fnic_dev_wait(struct vnic_dev *vdev,
|
||||||
unsigned long time;
|
unsigned long time;
|
||||||
int done;
|
int done;
|
||||||
int err;
|
int err;
|
||||||
|
int count;
|
||||||
|
|
||||||
|
count = 0;
|
||||||
|
|
||||||
err = start(vdev, arg);
|
err = start(vdev, arg);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
/* Wait for func to complete...2 seconds max */
|
/* Wait for func to complete.
|
||||||
|
* Sometime schedule_timeout_uninterruptible take long time
|
||||||
|
* to wake up so we do not retry as we are only waiting for
|
||||||
|
* 2 seconds in while loop. By adding count, we make sure
|
||||||
|
* we try atleast three times before returning -ETIMEDOUT
|
||||||
|
*/
|
||||||
time = jiffies + (HZ * 2);
|
time = jiffies + (HZ * 2);
|
||||||
do {
|
do {
|
||||||
err = finished(vdev, &done);
|
err = finished(vdev, &done);
|
||||||
|
count++;
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
if (done)
|
if (done)
|
||||||
return 0;
|
return 0;
|
||||||
schedule_timeout_uninterruptible(HZ / 10);
|
schedule_timeout_uninterruptible(HZ / 10);
|
||||||
} while (time_after(time, jiffies));
|
} while (time_after(time, jiffies) || (count < 3));
|
||||||
|
|
||||||
return -ETIMEDOUT;
|
return -ETIMEDOUT;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче