hisi_sas: use slot abort in v1 hw
When TRANS_TX_CREDIT_TIMEOUT_ERR or TRANS_TX_CLOSE_NORMAL_ERR error occur in a slot, the command should be re-attempted. This error is equivalent to meaning that the queue is full in the sdev (and not the host). Signed-off-by: John Garry <john.garry@huawei.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
cac9b2a217
commit
91b2bb92fe
|
@ -1212,6 +1212,14 @@ static void slot_err_v1_hw(struct hisi_hba *hisi_hba,
|
||||||
ts->stat = SAS_NAK_R_ERR;
|
ts->stat = SAS_NAK_R_ERR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case TRANS_TX_CREDIT_TIMEOUT_ERR:
|
||||||
|
case TRANS_TX_CLOSE_NORMAL_ERR:
|
||||||
|
{
|
||||||
|
/* This will request a retry */
|
||||||
|
ts->stat = SAS_QUEUE_FULL;
|
||||||
|
slot->abort = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
ts->stat = SAM_STAT_CHECK_CONDITION;
|
ts->stat = SAM_STAT_CHECK_CONDITION;
|
||||||
|
@ -1319,6 +1327,11 @@ static int slot_complete_v1_hw(struct hisi_hba *hisi_hba,
|
||||||
!(cmplt_hdr_data & CMPLT_HDR_RSPNS_XFRD_MSK)) {
|
!(cmplt_hdr_data & CMPLT_HDR_RSPNS_XFRD_MSK)) {
|
||||||
|
|
||||||
slot_err_v1_hw(hisi_hba, task, slot);
|
slot_err_v1_hw(hisi_hba, task, slot);
|
||||||
|
if (unlikely(slot->abort)) {
|
||||||
|
queue_work(hisi_hba->wq, &slot->abort_slot);
|
||||||
|
/* immediately return and do not complete */
|
||||||
|
return ts->stat;
|
||||||
|
}
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue