Skip to content

Commit

Permalink
[SCSI] mpt2sas: Timeout occurred within the HANDSHAKE logic while wai…
Browse files Browse the repository at this point in the history
…ting on firmware to ACK.

Following a diag_reset, a request to send an ioc_init is timing out.  The
timeout occurred within the HANDSHAKE logic while waiting on firmware to
acknowledge that the driver had wrote to the doorbell register.  This was
root caused to a logic timeout in the firmware code.  The proposed solution
is for the driver to call the udelay instead of msleep API in function where
its looping reading the interrupt status.  In addition to this change, there
were two additional cases where we deleted the clearing interrupt status
outside handshake context.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Kashyap, Desai authored and James Bottomley committed Oct 2, 2009
1 parent bcfb6e6 commit 29786e1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/scsi/mpt2sas/mpt2sas_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,6 @@ _base_unmask_interrupts(struct MPT2SAS_ADAPTER *ioc)
{
u32 him_register;

writel(0, &ioc->chip->HostInterruptStatus);
him_register = readl(&ioc->chip->HostInterruptMask);
him_register &= ~MPI2_HIM_RIM;
writel(him_register, &ioc->chip->HostInterruptMask);
Expand Down Expand Up @@ -2463,7 +2462,7 @@ _base_handshake_req_reply_wait(struct MPT2SAS_ADAPTER *ioc, int request_bytes,
((request_bytes/4)<<MPI2_DOORBELL_ADD_DWORDS_SHIFT)),
&ioc->chip->Doorbell);

if ((_base_wait_for_doorbell_int(ioc, 5, sleep_flag))) {
if ((_base_wait_for_doorbell_int(ioc, 5, NO_SLEEP))) {
printk(MPT2SAS_ERR_FMT "doorbell handshake "
"int failed (line=%d)\n", ioc->name, __LINE__);
return -EFAULT;
Expand Down Expand Up @@ -3169,7 +3168,6 @@ _base_diag_reset(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)

drsprintk(ioc, printk(MPT2SAS_DEBUG_FMT "clear interrupts\n",
ioc->name));
writel(0, &ioc->chip->HostInterruptStatus);

count = 0;
do {
Expand Down

0 comments on commit 29786e1

Please sign in to comment.