From: Robert Jennings <rcj@linux.vnet.ibm.com>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: linux-scsi@vger.kernel.org, santil@linux.vnet.ibm.com,
brking@linux.vnet.ibm.com
Subject: [PATCH 1/1] ibmvscsi: retry on H_DROPPED during send_crq
Date: Wed, 5 Dec 2007 10:24:51 -0600 [thread overview]
Message-ID: <20071205162451.GA9995@linux.vnet.ibm.com> (raw)
Currently the vscsi client driver responds to the case where H_SEND_CRQ
returns H_DROPPED by returning DID_ERROR. If the server CRQ is full,
either from mismanaging the request_limit or problems on the server,
we should return SCSI_MLQUEUE_HOST_BUSY instead.
The places where we are calling send_srp_login are not checking the
return code. We could get H_DROPPED or H_CLOSED and in that case we
should reset and retry.
Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
---
drivers/scsi/ibmvscsi/ibmvscsi.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
Index: b/drivers/scsi/ibmvscsi/ibmvscsi.c
===================================================================
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -629,14 +629,15 @@ static int ibmvscsi_send_srp_event(struc
list_del(&evt_struct->list);
del_timer(&evt_struct->timer);
- /* If send_crq returns H_CLOSED, return SCSI_MLQUEUE_HOST_BUSY.
- * Firmware will send a CRQ with a transport event (0xFF) to
- * tell this client what has happened to the transport. This
- * will be handled in ibmvscsi_handle_crq()
+ /* If send_crq returns H_CLOSED or H_DROPPED, return
+ * SCSI_MLQUEUE_HOST_BUSY. Firmware will send a CRQ with
+ * a transport event (0xFF) to tell this client what has
+ * happened to the transport. This will be handled in
+ * ibmvscsi_handle_crq().
*/
- if (rc == H_CLOSED) {
+ if (rc == H_CLOSED || rc == H_DROPPED) {
dev_warn(hostdata->dev, "send warning. "
- "Receive queue closed, will retry.\n");
+ "Receive queue unavailable, will retry.\n");
goto send_busy;
}
dev_err(hostdata->dev, "send error %d\n", rc);
@@ -1270,7 +1271,8 @@ void ibmvscsi_handle_crq(struct viosrp_c
if ((rc = ibmvscsi_ops->send_crq(hostdata,
0xC002000000000000LL, 0)) == 0) {
/* Now login */
- send_srp_login(hostdata);
+ if (send_srp_login(hostdata))
+ ibmvscsi_reset_host(hostdata);
} else {
dev_err(hostdata->dev, "Unable to send init rsp. rc=%ld\n", rc);
}
@@ -1280,7 +1282,8 @@ void ibmvscsi_handle_crq(struct viosrp_c
dev_info(hostdata->dev, "partner initialization complete\n");
/* Now login */
- send_srp_login(hostdata);
+ if (send_srp_login(hostdata))
+ ibmvscsi_reset_host(hostdata);
break;
default:
dev_err(hostdata->dev, "unknown crq message type: %d\n", crq->format);
reply other threads:[~2007-12-05 16:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071205162451.GA9995@linux.vnet.ibm.com \
--to=rcj@linux.vnet.ibm.com \
--cc=James.Bottomley@SteelEye.com \
--cc=brking@linux.vnet.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=santil@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.