aacraid: ignore data overrun on INQUIRY

The INQUIRY command may return a CAM_DATA_RUN_ERR code, even when
it succeeds. This happens during driver startup, causing the
current and further inquiries to be aborted, resulting in some
missing information about the controller.

Reviewed by:            imp
Sponsored by:           Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision:  https://reviews.freebsd.org/D30843
This commit is contained in:
Leandro Lupori
2021-06-21 15:13:13 -03:00
parent 9c2c635319
commit 71fd1bfd5e
+6
View File
@@ -1205,6 +1205,12 @@ aac_cam_complete(struct aac_command *cm)
command = ccb->csio.cdb_io.cdb_bytes[0];
if (command == INQUIRY) {
/* Ignore Data Overrun errors on INQUIRY */
if ((ccb->ccb_h.status & CAM_STATUS_MASK) ==
CAM_DATA_RUN_ERR)
ccb->ccb_h.status = (ccb->ccb_h.status &
~CAM_STATUS_MASK) | CAM_REQ_CMP;
if (ccb->ccb_h.status == CAM_REQ_CMP) {
device = ccb->csio.data_ptr[0] & 0x1f;
/*