Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 May 2021 05:03:51 GMT
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 2941198570cd - stable/13 - arcmsr(4): Fix SCSI command timeout on ARC-1886.
Message-ID:  <202105050503.14553pwh061627@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by delphij:

URL: https://cgit.FreeBSD.org/src/commit/?id=2941198570cde6357de80064d70bcafdbef17353

commit 2941198570cde6357de80064d70bcafdbef17353
Author:     Xin LI <delphij@FreeBSD.org>
AuthorDate: 2021-04-21 08:03:54 +0000
Commit:     Xin LI <delphij@FreeBSD.org>
CommitDate: 2021-05-05 05:03:22 +0000

    arcmsr(4): Fix SCSI command timeout on ARC-1886.
    
    Many thanks to Areca for continuing to support FreeBSD.
    
    Submitted by:   黃清隆 <ching2048 areca com tw>
    
    (cherry picked from commit 438b5532070f7c52e88f514380ee8662de1f600b)
---
 sys/dev/arcmsr/arcmsr.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/sys/dev/arcmsr/arcmsr.c b/sys/dev/arcmsr/arcmsr.c
index f2217deb1ce0..f7f913de89af 100644
--- a/sys/dev/arcmsr/arcmsr.c
+++ b/sys/dev/arcmsr/arcmsr.c
@@ -83,6 +83,8 @@
 ** 1.40.00.01   10/30/2017  Ching Huang     Fixed release memory resource
 ** 1.50.00.00   09/30/2020  Ching Huang     Added support ARC-1886, NVMe/SAS/SATA controller
 ** 1.50.00.01   02/26/2021  Ching Huang     Fixed no action of hot plugging device on type_F adapter
+** 1.50.00.02   04/16/2021  Ching Huang     Fixed scsi command timeout on ARC-1886 when
+**                                          scatter-gather count large than some number
 ******************************************************************************************
 */
 
@@ -140,7 +142,7 @@ __FBSDID("$FreeBSD$");
 
 #define arcmsr_callout_init(a)	callout_init(a, /*mpsafe*/1);
 
-#define ARCMSR_DRIVER_VERSION	"arcmsr version 1.50.00.01 2021-02-26"
+#define ARCMSR_DRIVER_VERSION	"arcmsr version 1.50.00.02 2021-04-16"
 #include <dev/arcmsr/arcmsr.h>
 /*
 **************************************************************************
@@ -1183,8 +1185,12 @@ static void arcmsr_post_srb(struct AdapterControlBlock *acb, struct CommandContr
 
 			if (srb->arc_cdb_size <= 0x300)
 				arc_cdb_size = (srb->arc_cdb_size - 1) >> 6 | 1;
-			else
-				arc_cdb_size = (((srb->arc_cdb_size + 0xff) >> 8) + 2) << 1 | 1;
+			else {
+				arc_cdb_size = ((srb->arc_cdb_size + 0xff) >> 8) + 2;
+				if (arc_cdb_size > 0xF)
+					arc_cdb_size = 0xF;
+				arc_cdb_size = (arc_cdb_size << 1) | 1;
+			}
 			ccb_post_stamp = (srb->smid | arc_cdb_size);
 			CHIP_REG_WRITE32(HBF_MessageUnit, 0, inbound_queueport_high, 0);
 			CHIP_REG_WRITE32(HBF_MessageUnit, 0, inbound_queueport_low, ccb_post_stamp);



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