diff options
author | Leandro Lupori <luporl@FreeBSD.org> | 2021-06-21 18:13:13 +0000 |
---|---|---|
committer | Leandro Lupori <luporl@FreeBSD.org> | 2021-06-21 18:13:13 +0000 |
commit | 71fd1bfd5ed5fdc316600a0b425d81844c021e9b (patch) | |
tree | 1206799b37def3212a49f6605e296d7ffbdcf359 | |
parent | 9c2c6353193b53deb337777c2a06a2648b364f8b (diff) | |
download | src-71fd1bfd5ed5fdc316600a0b425d81844c021e9b.tar.gz src-71fd1bfd5ed5fdc316600a0b425d81844c021e9b.zip |
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
-rw-r--r-- | sys/dev/aacraid/aacraid_cam.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/aacraid/aacraid_cam.c b/sys/dev/aacraid/aacraid_cam.c index 9c73248472bd..a44833863891 100644 --- a/sys/dev/aacraid/aacraid_cam.c +++ b/sys/dev/aacraid/aacraid_cam.c @@ -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; /* |