|
@@ -304,6 +304,12 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox, const void *cmd,
|
|
if (adap->pdev->error_state != pci_channel_io_normal)
|
|
if (adap->pdev->error_state != pci_channel_io_normal)
|
|
return -EIO;
|
|
return -EIO;
|
|
|
|
|
|
|
|
+ /* If we have a negative timeout, that implies that we can't sleep. */
|
|
|
|
+ if (timeout < 0) {
|
|
|
|
+ sleep_ok = false;
|
|
|
|
+ timeout = -timeout;
|
|
|
|
+ }
|
|
|
|
+
|
|
v = MBOWNER_G(t4_read_reg(adap, ctl_reg));
|
|
v = MBOWNER_G(t4_read_reg(adap, ctl_reg));
|
|
for (i = 0; v == MBOX_OWNER_NONE && i < 3; i++)
|
|
for (i = 0; v == MBOX_OWNER_NONE && i < 3; i++)
|
|
v = MBOWNER_G(t4_read_reg(adap, ctl_reg));
|
|
v = MBOWNER_G(t4_read_reg(adap, ctl_reg));
|