提交 a54cfa2d 编写于 作者: X Xingui Yang 提交者: Yang Yingliang

scsi: hisi_sas: print status and error when sata io abnormally completed

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

---------------------
To help debugging efforts, print d2h status and error

D2H:
      FIS Status Bits    =    0x53
        BSY =                  0... ....  Off
        DRDY =                 .1.. ....  On
        DF =                   ..0. ....  Off
        DSC =                  ...1 ....  On
        DRQ =                  .... 0...  Off
        Alignment Error =      .... .0..  Off
        Sense Data Available = .... ..1.  On
        ERR =                  .... ...1  On
      FIS Error Bits    =    0x40
        ICRC =    0... ....  Off
        UNC =     .1.. ....  On
        MC (O) =  ..0. ....  Off
        IDNF =    ...0 ....  Off
        MCR (O) = .... 0...  Off
        ABRT =    .... .0..  Off
        EOM =     .... ..0.  Off
        CCTO =    .... ...0  Off

Here is an example print:
hisi_sas_v3_hw 0000:74:02.0: sata d2h status 0x53, error 0x40
Signed-off-by: NXingui Yang <yangxingui@huawei.com>
Reviewed by kangfenglong <kangfenglong@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 4e89e218
......@@ -2419,6 +2419,19 @@ slot_complete_v3_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot)
error_info[0], error_info[1],
error_info[2], error_info[3]);
if ((complete_hdr->dw0 & CMPLT_HDR_RSPNS_XFRD_MSK) &&
(task->task_proto & SAS_PROTOCOL_SATA ||
task->task_proto & SAS_PROTOCOL_STP)) {
struct hisi_sas_status_buffer *status_buf =
hisi_sas_status_buf_addr_mem(slot);
u8 *iu = &status_buf->iu[0];
struct dev_to_host_fis *d2h =
(struct dev_to_host_fis *)iu;
dev_info(dev, "sata d2h status 0x%02x, error 0x%02x\n",
d2h->status, d2h->error);
}
if ((error_info[3] & RX_DATA_LEN_UNDERFLOW_MSK) &&
(task->task_proto == SAS_PROTOCOL_SSP)) {
/*print detail sense info when data underflow happened*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册