From: Xingui Yang yangxingui@huawei.com
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: Xingui Yang yangxingui@huawei.com Reviewed by kangfenglong kangfenglong@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index babf6486af526..4508c4a2f02fc 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -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*/