All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] ibmvscsi: retry on H_DROPPED during send_crq
@ 2007-12-05 16:24 Robert Jennings
  0 siblings, 0 replies; only message in thread
From: Robert Jennings @ 2007-12-05 16:24 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi, santil, brking

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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-12-05 16:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-05 16:24 [PATCH 1/1] ibmvscsi: retry on H_DROPPED during send_crq Robert Jennings

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.