The branch main has been updated by luporl:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=71fd1bfd5ed5fdc316600a0b425d81844c021e9b

commit 71fd1bfd5ed5fdc316600a0b425d81844c021e9b
Author:     Leandro Lupori <lup...@freebsd.org>
AuthorDate: 2021-06-21 18:13:13 +0000
Commit:     Leandro Lupori <lup...@freebsd.org>
CommitDate: 2021-06-21 18:13:13 +0000

    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
---
 sys/dev/aacraid/aacraid_cam.c | 6 ++++++
 1 file changed, 6 insertions(+)

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;
                                  /*
_______________________________________________
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"

Reply via email to