From e298c1c3c257446eba06945a0b4755ca30387012 Mon Sep 17 00:00:00 2001 From: Xin LI Date: Tue, 2 Mar 2021 22:57:20 -0800 Subject: [PATCH] arcmsr(4): Fixed no action of hot plugging device on type_F adapter. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Many thanks to Areca for continuing to support FreeBSD. Submitted by: 黃清隆 MFC after: 3 days (cherry picked from commit 5842073a9b7471831e0da48d29dd984d575f4e9e) --- sys/dev/arcmsr/arcmsr.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/dev/arcmsr/arcmsr.c b/sys/dev/arcmsr/arcmsr.c index cba2a956ff3..f2217deb1ce 100644 --- a/sys/dev/arcmsr/arcmsr.c +++ b/sys/dev/arcmsr/arcmsr.c @@ -82,6 +82,7 @@ ** 1.40.00.00 07/11/2017 Ching Huang Added support ARC1884 ** 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 ****************************************************************************************** */ @@ -139,7 +140,7 @@ __FBSDID("$FreeBSD$"); #define arcmsr_callout_init(a) callout_init(a, /*mpsafe*/1); -#define ARCMSR_DRIVER_VERSION "arcmsr version 1.50.00.00 2020-09-30" +#define ARCMSR_DRIVER_VERSION "arcmsr version 1.50.00.01 2021-02-26" #include /* ************************************************************************** @@ -1902,7 +1903,10 @@ static void arcmsr_hbe_message_isr(struct AdapterControlBlock *acb) { u_int32_t outbound_message; CHIP_REG_WRITE32(HBE_MessageUnit, 0, host_int_status, 0); - outbound_message = CHIP_REG_READ32(HBE_MessageUnit, 0, msgcode_rwbuffer[0]); + if (acb->adapter_type == ACB_ADAPTER_TYPE_E) + outbound_message = CHIP_REG_READ32(HBE_MessageUnit, 0, msgcode_rwbuffer[0]); + else + outbound_message = acb->msgcode_rwbuffer[0]; if (outbound_message == ARCMSR_SIGNATURE_GET_CONFIG) arcmsr_dr_handle( acb ); } -- 2.45.0