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@xxxxxxxxxxxxxxxxxx> --- 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); - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html