scsi: hisi_sas: fix bug of LM fail to add list which caused by IO release when receive underflow cq
when we unplug the disk with IO running,sas controller will retry IO for 5s. As disk havn't receive any response from initiator for long time , it will return underflow to tell controller that initiator response timeout have happened. At current handle of receive underflow, we direct release IPTT of io without clean the residue of IPTT remained at hardware logic.If we reuse this IPTT and send a new IO to logic before logic clean the residue,it will cause LM fail to add list. So we should modify the handle of underflow to avoid directly release IPTT but to enter error handle base on flag: CMPLT_HDR_IO_IN_TARGET_MSK And we should enable the verify of Data transfer length for rw IO only, so we can prevent the generate of underflow cq when scan the disk. we should ensure not to enter the error handle when inquiry the disk. For the different command we use to inquiry the SAS(INQUIRY) and SATA (IDENTIFY DEVICE), underflow will not be report during SATA disk inquiry, so we only check for rw IO at func:prep_ssp_v3_hw. BTW, we also add some print to get the sensekey of underflow at func:slot_complete_v3_hw to help debug. Signed-off-by: NLuo Jiaxing <luojiaxing@huawei.com> Feature or Bugfix:Bugfix Signed-off-by: Nluojiaxing <luojiaxing@huawei.com> Reviewed-by: Nchenxiang <chenxiang66@hisilicon.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录