Re: arcmsr(4) update

2020-05-12 Thread Sevan Janiyan



On 11/05/2020 10:57, John Nemeth wrote:
> I've been working on updating the arcmsr(4) driver which
> supports Areca RAID controllers.  This driver is originally from
> OpenBSD's arc(4) driver but hasn't seen any updates since the
> initial import (just maintenance).  I have updated arcmsr(4) to
> support all the devices currently support by OpenBSD's arc(4)
> driver.  It has been lightly tested on the 1280, 24 port PCIe SATA
> controller and somewhat more on an 1880, PCIe 6 Gbps SAS controller.
> I have not yet dealt with the bio(4) interface, so that part is
> commented out.  Please give it a try, especially with a card that
> isn't currently supported.  Also, people good with SMP, please have
> a look.  That's not my area, but I did my best to maintain the
> locks as it is marked MPSAFE.  I've been testing it with DIAGNOSTIC,
> DEBUG, and LOCKDEBUG (this helping to find a locking bug that got
> squashed). 

ARC-1882 with 1 disk attached works if I create a pass through disk with
the controller in RAID mode, if I switch to JBOD mode, disk is never
detected.

Even though there is no RAID volume configured, kernel still waits with
the following messages on reboot
arcmsr0: timeout waiting to stop bg rebuild
arcmsr0: timeout waiting to flush cache

dmesg from a patched kernel with controller configured with a
passthrough disk in RAID mode:

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
2018, 2019, 2020 The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California.  All rights reserved.

NetBSD 9.99.60 (GENERIC) #0: Tue May 12 18:48:23 BST 2020
:/usr/obj/amd64/sys/arch/amd64/compile/GENERIC
total memory = 16341 MB
avail memory = 15811 MB
entropy: entering seed from bootloader with 256 bits of entropy
entropy: ready
pool redzone disabled for 'buf4k'
pool redzone disabled for 'buf64k'
timecounter: Timecounters tick every 10.000 msec
Kernelized RAIDframe activated
running cgd selftest aes-xts-256 aes-xts-512 done
RTC BIOS diagnostic error
0x3f
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
Dell Inc. OptiPlex 990 (01)
mainbus0 (root)
ACPI: RSDP 0x000FE300 24 (v02 DELL  )
ACPI: XSDT 0xCF7FDE18 74 (v01 DELL   CBX3 06222004 MSFT
00010013)
ACPI: FACP 0xCF787D98 F4 (v04 DELL   CBX3 06222004 MSFT
00010013)
ACPI: DSDT 0xCF771018 007581 (v02 INT430 SYSFexxx 1001 INTL
20090903)
ACPI: FACS 0xCF7E4E40 40
ACPI: FACS 0xCF7E4D40 40
ACPI: APIC 0xCF7FCF18 CC (v02 DELL   CBX3 06222004 MSFT
00010013)
ACPI: TCPA 0xCF7E5D18 32 (v02 
)
ACPI: SSDT 0xCF788A98 0002F9 (v01 DELLTP TPM  3000 INTL
20090903)
ACPI: MCFG 0xCF7E5C98 3C (v01 DELL   SNDYBRDG 06222004 MSFT
0097)
ACPI: HPET 0xCF7E5C18 38 (v01 A M I   PCHHPET 06222004 AMI.
0003)
ACPI: BOOT 0xCF7E5B98 28 (v01 DELL   CBX3 06222004 AMI
00010013)
ACPI: SSDT 0xCF77E818 0007C2 (v01 PmRef  Cpu0Ist  3000 INTL
20090903)
ACPI: SSDT 0xCF77D018 000996 (v01 PmRef  CpuPm3000 INTL
20090903)
ACPI: DMAR 0xCF7E4A18 B0 (v01 INTEL  SNB  0001 INTL
0001)
ACPI: 4 ACPI AML tables successfully acquired and loaded
ioapic0 at mainbus0 apid 2: pa 0xfec0, version 0x20, 24 pins
cpu0 at mainbus0 apid 0
cpu0: Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz, id 0x206a7
cpu0: node 0, package 0, core 0, smt 0
cpu1 at mainbus0 apid 2
cpu1: Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz, id 0x206a7
cpu1: node 0, package 0, core 1, smt 0
cpu2 at mainbus0 apid 4
cpu2: Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz, id 0x206a7
cpu2: node 0, package 0, core 2, smt 0
cpu3 at mainbus0 apid 6
cpu3: Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz, id 0x206a7
cpu3: node 0, package 0, core 3, smt 0
acpi0 at mainbus0: Intel ACPICA 20200326
acpi0: X/RSDT: OemId , AslId 
acpi0: MCFG: segment 0, bus 0-63, address 0xf800
ACPI: Dynamic OEM Table Load:
ACPI: SSDT 0x931DCB763448 000727 (v01 PmRef  Cpu0Cst  3001 INTL
20090903)
ACPI: Dynamic OEM Table Load:
ACPI: SSDT 0x9320D9417088 000303 (v01 PmRef  ApIst3000 INTL
20090903)
ACPI: Dynamic OEM Table Load:
ACPI: SSDT 0x931DCB74FD08 000119 (v01 PmRef  ApCst3000 INTL
20090903)
acpi0: SCI interrupting at int 9
acpi0: fixed power button present
timecounter: Timecounter "ACPI-Fast" frequency 3579545 Hz quality 1000
hpet0 at acpi0: high precision event timer (mem 0xfed0-0xfed00400)
timecounter: Timecounter "hpet0" frequency 14318180 Hz quality 2000
FWHD (INT0800) at acpi0 not configured
LDRC (PNP0C02) at acpi0 not configured
attimer1 at acpi0 (TIMR, PNP0100): io 0x40-0x43,0x50-0x53 irq 0
CWDT (INT3F0D) at acpi0 not configured
COM1 (PNP0501) at acpi0 not configured
PDRC (PNP0C02) at acpi0 not configured
MEM2 

arcmsr(4) update

2020-05-11 Thread John Nemeth
 I've been working on updating the arcmsr(4) driver which
supports Areca RAID controllers.  This driver is originally from
OpenBSD's arc(4) driver but hasn't seen any updates since the
initial import (just maintenance).  I have updated arcmsr(4) to
support all the devices currently support by OpenBSD's arc(4)
driver.  It has been lightly tested on the 1280, 24 port PCIe SATA
controller and somewhat more on an 1880, PCIe 6 Gbps SAS controller.
I have not yet dealt with the bio(4) interface, so that part is
commented out.  Please give it a try, especially with a card that
isn't currently supported.  Also, people good with SMP, please have
a look.  That's not my area, but I did my best to maintain the
locks as it is marked MPSAFE.  I've been testing it with DIAGNOSTIC,
DEBUG, and LOCKDEBUG (this helping to find a locking bug that got
squashed).  BTW, debugging is turned on from boot, so don't expect
to use your console.  :-)  It is located at
http://ftp.NetBSD.org/pub/NetBSD/misc/jnemeth/ .  The two files
there can be dropped into pretty much any recent -current system.