diff options
author | Joe Carnuccio <joe.carnuccio@qlogic.com> | 2014-04-11 16:54:29 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-05-19 07:31:03 -0400 |
commit | 50a9ff301ed734f2fa95b3c38154454416d934f8 (patch) | |
tree | 628a22da0cda6273fe6b1a4290430c804b588ff7 /drivers/scsi/qla2xxx/qla_nx2.c | |
parent | b6ae5ba6c73f585ae03e4cc7c4c62bf131ff2f8d (diff) |
qla2xxx: ISP8044 poll ipmdio bus timeout improvement.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_nx2.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_nx2.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/scsi/qla2xxx/qla_nx2.c b/drivers/scsi/qla2xxx/qla_nx2.c index 75e947a23b5c..e5b4a4092893 100644 --- a/drivers/scsi/qla2xxx/qla_nx2.c +++ b/drivers/scsi/qla2xxx/qla_nx2.c | |||
@@ -175,18 +175,17 @@ qla8044_poll_wait_ipmdio_bus_idle(struct scsi_qla_host *vha, | |||
175 | uint32_t temp; | 175 | uint32_t temp; |
176 | 176 | ||
177 | /* jiffies after 100 msecs */ | 177 | /* jiffies after 100 msecs */ |
178 | timeout = jiffies + (HZ / 1000) * TIMEOUT_100_MS; | 178 | timeout = jiffies + msecs_to_jiffies(TIMEOUT_100_MS); |
179 | do { | 179 | do { |
180 | temp = qla8044_ipmdio_rd_reg(vha, addr1, addr3, mask, addr2); | 180 | temp = qla8044_ipmdio_rd_reg(vha, addr1, addr3, mask, addr2); |
181 | if ((temp & 0x1) != 1) | 181 | if ((temp & 0x1) != 1) |
182 | break; | 182 | break; |
183 | } while (!time_after_eq(jiffies, timeout)); | 183 | if (time_after_eq(jiffies, timeout)) { |
184 | 184 | ql_log(ql_log_warn, vha, 0xb152, | |
185 | if (time_after_eq(jiffies, timeout)) { | 185 | "Error in processing mdiobus idle\n"); |
186 | ql_log(ql_log_warn, vha, 0xb152, | 186 | return -1; |
187 | "Error in processing mdiobus idle\n"); | 187 | } |
188 | return -1; | 188 | } while (1); |
189 | } | ||
190 | 189 | ||
191 | return 0; | 190 | return 0; |
192 | } | 191 | } |