Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jun 2021 18:16:16 GMT
From:      Leandro Lupori <luporl@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 71fd1bfd5ed5 - main - aacraid: ignore data overrun on INQUIRY
Message-ID:  <202106211816.15LIGGAJ067741@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by luporl:

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

commit 71fd1bfd5ed5fdc316600a0b425d81844c021e9b
Author:     Leandro Lupori <luporl@FreeBSD.org>
AuthorDate: 2021-06-21 18:13:13 +0000
Commit:     Leandro Lupori <luporl@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;
 				  /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106211816.15LIGGAJ067741>