From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx> This patch converts a handful of qla_target.c cases to -EAGAIN to signal QUEUE_FULL status. This includes two new exception cases called from the qla2xxx_xmit_response() call chain, and a second case to handle qla_tgt_pci_map_calc_cnt() failure during qla_tgt_rdy_to_xfer() from TFO->write_pending(). Tested with qla25xx hardware using SCF_SCSI_DATA_SG_IO_CDB type payloads. Reported-by: Roland Dreier <roland@xxxxxxxxxxxxxxx> Signed-off-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx> --- drivers/scsi/qla2xxx/qla_target.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index ade0d90..e890f3a 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -1731,7 +1731,7 @@ static int qla_tgt_check_reserve_free_req(struct scsi_qla_host *vha, uint32_t re "request ring: vha->req->ring_index=%d, vha->req->cnt=%d, " "req_cnt=%d\n", vha->vp_idx, vha->req->ring_index, vha->req->cnt, req_cnt); - return -ENOMEM; + return -EAGAIN; } vha->req->cnt -= req_cnt; @@ -1844,8 +1844,7 @@ static int qla24xx_build_ctio_pkt(struct qla_tgt_prm *prm, struct scsi_qla_host * know the initiator's LOOP ID, hence we can't find * the session and, so, the command. */ - dump_stack(); - return -ENOMEM; + return -EAGAIN; } else ha->cmds[h-1] = prm->cmd; @@ -2568,7 +2567,7 @@ int qla_tgt_rdy_to_xfer(struct qla_tgt_cmd *cmd) /* Calculate number of entries and segments required */ if (qla_tgt_pci_map_calc_cnt(&prm) != 0) - return -ENOMEM; + return -EAGAIN; spin_lock_irqsave(&ha->hardware_lock, flags); -- 1.7.2.5 -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html