Andrey V. Elsukov wrote: > Can you update FreeBSD aac(4) driver to a current > adaptec driver that available on the site? > As i found last driver is b9114. This driver support > IBM ServeRAID 8K, I and L adapters. > But this driver available only for FreeBSD 5.4. :( Thanks to Andrew Jemerya for pointing to new aacu(4) driver for FreeBSD 6.0. http://www.adaptec.com/en-US/downloads/unix/freebsd?productId=AAR-2820SA http://www.adaptec.com/en-US/speed/raid/aac/linux/aacraid_drv_freebsd6_v9179_tar_gz.htm I've merged some changes from this driver to RELENG_6 sources. I've created a custom FreeBSD 6.2-BETA1 ISO image with a my patch to aac(4). Now i've successfully installed FreeBSD to my new IBM x3650 with an IBM ServeRAID-8k controller. I think that this patch can be successfully applied to CURRENT sources. Patch and dmesg.boot is attached. -- WBR, Andrey V. Elsukov --- sys/dev/aac.orig/aac.c Mon Jan 30 00:00:00 2006 +++ sys/dev/aac/aac.c Fri Sep 22 12:51:24 2006 _at__at_ -33,7 +33,7 _at__at_ /* * Driver for the Adaptec 'FSA' family of PCI/SCSI RAID adapters. */ -#define AAC_DRIVER_VERSION 0x02000000 +#define AAC_DRIVER_VERSION 0x02000001 #define AAC_DRIVERNAME "aac" #include "opt_aac.h" _at__at_ -1668,14 +1668,12 _at__at_ sc->aac_max_sectors = 128; /* 64KB */ if (sc->flags & AAC_FLAGS_SG_64BIT) sc->aac_sg_tablesize = (AAC_FIB_DATASIZE - - sizeof(struct aac_blockwrite64) - + sizeof(struct aac_sg_table64)) - / sizeof(struct aac_sg_table64); + - sizeof(struct aac_blockwrite64)) + / sizeof(struct aac_sg_entry64); else sc->aac_sg_tablesize = (AAC_FIB_DATASIZE - - sizeof(struct aac_blockwrite) - + sizeof(struct aac_sg_table)) - / sizeof(struct aac_sg_table); + - sizeof(struct aac_blockwrite)) + / sizeof(struct aac_sg_entry); if (!aac_sync_command(sc, AAC_MONKER_GETCOMMPREF, 0, 0, 0, 0, NULL)) { options = AAC_GET_MAILBOX(sc, 1); _at__at_ -3220,7 +3218,7 _at__at_ mtx_lock(&sc->aac_aifq_lock); next = (sc->aac_aifq_head + 1) % AAC_AIFQ_LENGTH; if (next != sc->aac_aifq_tail) { - bcopy(aif, &sc->aac_aifq[next], sizeof(struct aac_aif_command)); + bcopy(fib, &sc->aac_aifq[next], sizeof(struct aac_fib)); sc->aac_aifq_head = next; /* On the off chance that someone is sleeping for an aif... */ _at__at_ -3327,7 +3325,7 _at__at_ next = (sc->aac_aifq_tail + 1) % AAC_AIFQ_LENGTH; error = copyout(&sc->aac_aifq[next], uptr, - sizeof(struct aac_aif_command)); + sizeof(struct aac_fib)); if (error) device_printf(sc->aac_dev, "aac_return_aif: copyout returned %d\n", error); --- sys/dev/aac.orig/aac_pci.c Thu Jun 22 09:01:00 2006 +++ sys/dev/aac/aac_pci.c Fri Sep 22 12:52:45 2006 _at__at_ -126,13 +126,13 _at__at_ {0x9005, 0x0285, 0x9005, 0x0286, AAC_HWIF_I960RX, AAC_FLAGS_NO4GB | AAC_FLAGS_256FIBS, "Adaptec SCSI RAID 2120S"}, {0x9005, 0x0285, 0x9005, 0x0290, AAC_HWIF_I960RX, AAC_FLAGS_NO4GB, - "Adaptec SATA RAID 2410SA"}, + "Adaptec SCSI RAID 2410SA"}, {0x9005, 0x0285, 0x1028, 0x0291, AAC_HWIF_I960RX, AAC_FLAGS_NO4GB, "Dell CERC SATA RAID 2"}, {0x9005, 0x0285, 0x9005, 0x0292, AAC_HWIF_I960RX, AAC_FLAGS_NO4GB, - "Adaptec SATA RAID 2810SA"}, + "Adaptec SCSI RAID 2810SA"}, {0x9005, 0x0285, 0x9005, 0x0293, AAC_HWIF_I960RX, AAC_FLAGS_NO4GB, - "Adaptec SATA RAID 21610SA"}, + "Adaptec SCSI RAID 21610SA"}, {0x9005, 0x0285, 0x103c, 0x3227, AAC_HWIF_I960RX, AAC_FLAGS_NO4GB, "HP ML110 G2 (Adaptec 2610SA)"}, {0x9005, 0x0286, 0x9005, 0x028c, AAC_HWIF_RKT, 0, _at__at_ -161,19 +161,19 _at__at_ {0x9005, 0x0286, 0x9005, 0x029d, AAC_HWIF_RKT, 0, "Adaptec SATA RAID 2420SA"}, {0x9005, 0x0286, 0x9005, 0x029e, AAC_HWIF_RKT, 0, - "ICP ICP9024RO SCSI RAID"}, + "ICP9024RO SATA RAID"}, {0x9005, 0x0286, 0x9005, 0x029f, AAC_HWIF_RKT, 0, - "ICP ICP9014RO SCSI RAID"}, + "ICP9014RO SATA RAID"}, {0x9005, 0x0285, 0x9005, 0x0294, AAC_HWIF_I960RX, 0, "Adaptec SATA RAID 2026ZCR"}, - {0x9005, 0x0285, 0x103c, 0x3227, AAC_HWIF_I960RX, 0, - "Adaptec SATA RAID 2610SA"}, {0x9005, 0x0285, 0x9005, 0x0296, AAC_HWIF_I960RX, 0, "Adaptec SCSI RAID 2240S"}, {0x9005, 0x0285, 0x9005, 0x0297, AAC_HWIF_I960RX, 0, "Adaptec SAS RAID 4005SAS"}, {0x9005, 0x0285, 0x1014, 0x02f2, AAC_HWIF_I960RX, 0, "IBM ServeRAID 8i"}, + {0x9005, 0x0285, 0x1014, 0x0312, AAC_HWIF_I960RX, 0, + "IBM ServeRAID 8i"}, {0x9005, 0x0285, 0x9005, 0x0298, AAC_HWIF_I960RX, 0, "Adaptec SAS RAID 4000SAS"}, {0x9005, 0x0285, 0x9005, 0x0299, AAC_HWIF_I960RX, 0, _at__at_ -185,45 +185,53 _at__at_ {0x9005, 0x0285, 0x9005, 0x028f, AAC_HWIF_I960RX, 0, "Adaptec SATA RAID 2025SA ZCR"}, {0x9005, 0x0285, 0x9005, 0x02a4, AAC_HWIF_I960RX, 0, - "ICP ICP9085LI SAS RAID"}, + "ICP 9085LI SAS RAID"}, {0x9005, 0x0285, 0x9005, 0x02a5, AAC_HWIF_I960RX, 0, - "ICP ICP5085BR SAS RAID"}, + "ICP 5085BR SAS RAID"}, {0x9005, 0x0286, 0x9005, 0x02a0, AAC_HWIF_RKT, 0, - "ICP ICP9047MA SATA RAID"}, + "ICP9047MA SATA RAID"}, {0x9005, 0x0286, 0x9005, 0x02a1, AAC_HWIF_RKT, 0, - "ICP ICP9087MA SATA RAID"}, + "ICP9087MA SATA RAID"}, + {0x9005, 0x0286, 0x9005, 0x02a2, AAC_HWIF_RKT, 0, + "Adaptec SAS RAID 3800SAS"}, + {0x9005, 0x0286, 0x9005, 0x02a3, AAC_HWIF_RKT, 0, + "ICP5445AU SAS RAID"}, + {0x9005, 0x0286, 0x9005, 0x02a6, AAC_HWIF_RKT, 0, + "ICP9067MA SATA RAID"}, + {0x9005, 0x0286, 0x9005, 0x02a7, AAC_HWIF_RKT, 0, + "Adaptec SAS RAID 3805SAS"}, + {0x9005, 0x0286, 0x9005, 0x02a9, AAC_HWIF_RKT, 0, + "ICP5085AU SAS RAID"}, + {0x9005, 0x0286, 0x9005, 0x02ac, AAC_HWIF_RKT, 0, + "Adaptec SAS RAID 1800SAS"}, + {0x9005, 0x0286, 0x1014, 0x9580, AAC_HWIF_RKT, 0, + "IBM ServeRAID 8k"}, + {0x9005, 0x0286, 0x1014, 0x9540, AAC_HWIF_RKT, 0, + "IBM ServeRAID 8L"}, {0, 0, 0, 0, 0, 0, 0} }; -static struct aac_ident * -aac_find_ident(device_t dev) -{ - struct aac_ident *m; - - for (m = aac_identifiers; m->vendor != 0; m++) { - if ((m->vendor == pci_get_vendor(dev)) && - (m->device == pci_get_device(dev)) && - (m->subvendor == pci_get_subvendor(dev)) && - (m->subdevice == pci_get_subdevice(dev))) - return (m); - } - - return (NULL); -} - /* * Determine whether this is one of our supported adapters. */ static int aac_pci_probe(device_t dev) { - struct aac_ident *id; + struct aac_ident *m; debug_called(1); - if ((id = aac_find_ident(dev)) != NULL) { - device_set_desc(dev, id->desc); - return(BUS_PROBE_DEFAULT); + for (m = aac_identifiers; m->vendor != 0; m++) { + if ((m->vendor == pci_get_vendor(dev)) && + (m->device == pci_get_device(dev)) && + ((m->subvendor == 0) || (m->subvendor == + pci_get_subvendor(dev))) && + ((m->subdevice == 0) || ((m->subdevice == + pci_get_subdevice(dev))))) { + + device_set_desc(dev, m->desc); + return(BUS_PROBE_SPECIFIC); + } } return(ENXIO); } _at__at_ -235,8 +243,7 _at__at_ aac_pci_attach(device_t dev) { struct aac_softc *sc; - struct aac_ident *id; - int error; + int i, error; u_int32_t command; debug_called(1); _at__at_ -310,8 +317,12 _at__at_ * Detect the hardware interface version, set up the bus interface * indirection. */ - id = aac_find_ident(dev); - sc->aac_hwif = id->hwif; + for (i = 0; aac_identifiers[i].vendor != 0; i++) { + if ((aac_identifiers[i].vendor == pci_get_vendor(dev)) && + (aac_identifiers[i].device == pci_get_device(dev)) && + (aac_identifiers[i].subvendor == pci_get_subvendor(dev)) && + (aac_identifiers[i].subdevice == pci_get_subdevice(dev))) { + sc->aac_hwif = aac_identifiers[i].hwif; switch(sc->aac_hwif) { case AAC_HWIF_I960RX: debug(2, "set hardware up for i960Rx"); _at__at_ -331,13 +342,21 _at__at_ break; default: sc->aac_hwif = AAC_HWIF_UNKNOWN; + break; + } + + /* Set up quirks */ + sc->flags = aac_identifiers[i].quirks; + + break; + } + } + if (sc->aac_hwif == AAC_HWIF_UNKNOWN) { device_printf(sc->aac_dev, "unknown hardware type\n"); error = ENXIO; goto out; } - /* Set up quirks */ - sc->flags = id->quirks; /* * Do bus-independent initialisation. --- sys/dev/aac.orig/aacvar.h Sun Oct 9 00:00:00 2005 +++ sys/dev/aac/aacvar.h Fri Sep 22 12:52:56 2006 _at__at_ -356,7 +356,7 _at__at_ /* management interface */ struct cdev *aac_dev_t; struct mtx aac_aifq_lock; - struct aac_aif_command aac_aifq[AAC_AIFQ_LENGTH]; + struct aac_fib aac_aifq[AAC_AIFQ_LENGTH]; int aac_aifq_head; int aac_aifq_tail; struct selinfo rcv_select; Copyright (c) 1992-2006 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 6.2-20060924-SNAP #0: Sat Sep 23 23:29:41 UTC 2006 root_at_bridge.hostel4.hvn:/usr/obj/usr/src/sys/SMP acpi_alloc_wakeup_handler: can't alloc wake memory Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Xeon(TM) CPU 3.00GHz (3000.13-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf64 Stepping = 4 Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE> Features2=0xe4bd<SSE3,RSVD2,MON,DS_CPL,VMX,EST,CNTX-ID,CX16,<b14>,<b15>> AMD Features=0x20000000<LM> AMD Features2=0x1<LAHF> Cores per package: 2 Logical CPUs per core: 2 real memory = 3221008384 (3071 MB) avail memory = 3150974976 (3005 MB) ACPI APIC Table: <IBM SERVALNT> FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 cpu2 (AP): APIC ID: 2 cpu3 (AP): APIC ID: 3 cpu4 (AP): APIC ID: 4 cpu5 (AP): APIC ID: 5 cpu6 (AP): APIC ID: 6 cpu7 (AP): APIC ID: 7 ioapic0 <Version 2.0> irqs 0-23 on motherboard kbd1 at kbdmux0 ath_hal: 0.9.17.2 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413) acpi0: <IBM SERVALNT> on motherboard acpi_bus_number: can't get _ADR acpi_bus_number: can't get _ADR acpi0: Power Button (fixed) acpi_bus_number: can't get _ADR acpi_bus_number: can't get _ADR Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x588-0x58b on acpi0 cpu0: <ACPI CPU> on acpi0 acpi_perf0: <ACPI CPU Frequency Control> on cpu0 acpi_throttle0: <ACPI CPU Throttling> on cpu0 cpu1: <ACPI CPU> on acpi0 acpi_throttle1: <ACPI CPU Throttling> on cpu1 acpi_throttle1: failed to attach P_CNT device_attach: acpi_throttle1 attach returned 6 cpu2: <ACPI CPU> on acpi0 acpi_throttle2: <ACPI CPU Throttling> on cpu2 acpi_throttle2: failed to attach P_CNT device_attach: acpi_throttle2 attach returned 6 cpu3: <ACPI CPU> on acpi0 acpi_throttle3: <ACPI CPU Throttling> on cpu3 acpi_throttle3: failed to attach P_CNT device_attach: acpi_throttle3 attach returned 6 cpu4: <ACPI CPU> on acpi0 acpi_throttle4: <ACPI CPU Throttling> on cpu4 acpi_throttle4: failed to attach P_CNT device_attach: acpi_throttle4 attach returned 6 cpu5: <ACPI CPU> on acpi0 acpi_throttle5: <ACPI CPU Throttling> on cpu5 acpi_throttle5: failed to attach P_CNT device_attach: acpi_throttle5 attach returned 6 cpu6: <ACPI CPU> on acpi0 acpi_throttle6: <ACPI CPU Throttling> on cpu6 acpi_throttle6: failed to attach P_CNT device_attach: acpi_throttle6 attach returned 6 cpu7: <ACPI CPU> on acpi0 acpi_throttle7: <ACPI CPU Throttling> on cpu7 acpi_throttle7: failed to attach P_CNT device_attach: acpi_throttle7 attach returned 6 pcib0: <ACPI Host-PCI bridge> on acpi0 pci0: <ACPI PCI bus> on pcib0 pcib1: <ACPI PCI-PCI bridge> at device 2.0 on pci0 pci26: <ACPI PCI bus> on pcib1 pcib2: <ACPI PCI-PCI bridge> at device 0.0 on pci26 pci27: <ACPI PCI bus> on pcib2 pcib3: <ACPI PCI-PCI bridge> at device 0.0 on pci27 pci28: <ACPI PCI bus> on pcib3 pcib4: <ACPI PCI-PCI bridge> at device 1.0 on pci27 pci36: <ACPI PCI bus> on pcib4 pcib5: <PCI-PCI bridge> at device 0.3 on pci26 pci37: <PCI bus> on pcib5 pcib6: <ACPI PCI-PCI bridge> at device 3.0 on pci0 pci4: <ACPI PCI bus> on pcib6 aac0: <IBM ServeRAID 8k> port 0x5000-0x50ff mem 0xc9e00000-0xc9ffffff,0xc7fe0000-0xc7ffffff irq 17 at device 0.0 on pci4 aac0: New comm. interface enabled aac0: Adaptec Raid Controller 2.0.1-1 pcib7: <ACPI PCI-PCI bridge> at device 4.0 on pci0 pci16: <ACPI PCI bus> on pcib7 pcib8: <PCI-PCI bridge> at device 5.0 on pci0 pci69: <PCI bus> on pcib8 pcib9: <ACPI PCI-PCI bridge> at device 6.0 on pci0 pci7: <ACPI PCI bus> on pcib9 pcib10: <PCI-PCI bridge> at device 7.0 on pci0 pci68: <PCI bus> on pcib10 pci0: <base peripheral> at device 8.0 (no driver attached) pcib11: <ACPI PCI-PCI bridge> at device 28.0 on pci0 pci2: <ACPI PCI bus> on pcib11 pcib12: <PCI-PCI bridge> at device 0.0 on pci2 pci3: <PCI bus> on pcib12 bce0: <Broadcom NetXtreme II BCM5708 1000Base-T (B1), v0.9.6> mem 0xce000000-0xcfffffff irq 16 at device 0.0 on pci3 bce0: ASIC ID 0x57081010; Revision (B1); PCI-X 64-bit 133MHz miibus0: <MII bus> on bce0 brgphy0: <BCM5708C 10/100/1000baseTX PHY> on miibus0 brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, 1000baseTX-FDX, auto bce0: Ethernet address: 00:14:5e:18:16:72 pcib13: <ACPI PCI-PCI bridge> at device 28.1 on pci0 pci5: <ACPI PCI bus> on pcib13 pcib14: <PCI-PCI bridge> at device 0.0 on pci5 pci6: <PCI bus> on pcib14 bce1: <Broadcom NetXtreme II BCM5708 1000Base-T (B1), v0.9.6> mem 0xca000000-0xcbffffff irq 17 at device 0.0 on pci6 bce1: ASIC ID 0x57081010; Revision (B1); PCI-X 64-bit 133MHz miibus1: <MII bus> on bce1 brgphy1: <BCM5708C 10/100/1000baseTX PHY> on miibus1 brgphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, 1000baseTX-FDX, auto bce1: Ethernet address: 00:14:5e:18:16:74 uhci0: <UHCI (generic) USB controller> port 0x2200-0x221f irq 23 at device 29.0 on pci0 uhci0: [GIANT-LOCKED] usb0: <UHCI (generic) USB controller> on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: <UHCI (generic) USB controller> port 0x2600-0x261f irq 22 at device 29.1 on pci0 uhci1: [GIANT-LOCKED] usb1: <UHCI (generic) USB controller> on uhci1 usb1: USB revision 1.0 uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered uhci2: <UHCI (generic) USB controller> port 0x2a00-0x2a1f irq 23 at device 29.2 on pci0 uhci2: [GIANT-LOCKED] usb2: <UHCI (generic) USB controller> on uhci2 usb2: USB revision 1.0 uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub2: 2 ports with 2 removable, self powered uhci3: <UHCI (generic) USB controller> port 0x2e00-0x2e1f irq 22 at device 29.3 on pci0 uhci3: [GIANT-LOCKED] usb3: <UHCI (generic) USB controller> on uhci3 usb3: USB revision 1.0 uhub3: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub3: 2 ports with 2 removable, self powered ehci0: <EHCI (generic) USB 2.0 controller> mem 0xf9000000-0xf90003ff irq 23 at device 29.7 on pci0 ehci0: [GIANT-LOCKED] usb4: EHCI version 1.0 usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3 usb4: <EHCI (generic) USB 2.0 controller> on ehci0 usb4: USB revision 2.0 uhub4: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 uhub4: 8 ports with 8 removable, self powered pcib15: <ACPI PCI-PCI bridge> at device 30.0 on pci0 pci1: <ACPI PCI bus> on pcib15 pci1: <display, VGA> at device 6.0 (no driver attached) isab0: <PCI-ISA bridge> at device 31.0 on pci0 isa0: <ISA bus> on isab0 atapci0: <Intel 63XXESB2 SATA300 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x480-0x48f at device 31.2 on pci0 ata0: <ATA channel 0> on atapci0 ata1: <ATA channel 1> on atapci0 pci0: <serial bus, SMBus> at device 31.3 (no driver attached) sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A pmtimer0 on isa0 orm0: <ISA Option ROMs> at iomem 0xc0000-0xcafff,0xcb000-0xcc7ff,0xcc800-0xcdfff,0xce000-0xd2fff on isa0 atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0 atkbd0: <AT Keyboard> irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] ppc0: parallel port not found. sc0: <System console> at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 ukbd0: CHICONY HP Basic USB Keyboard, rev 1.10/3.00, addr 2, iclass 3/1 kbd2 at ukbd0 ukbd1: vendor 0x10d5 UKU-M02 1.7, rev 1.10/0.00, addr 2, iclass 3/1 kbd3 at ukbd1 ums0: vendor 0x10d5 UKU-M02 1.7, rev 1.10/0.00, addr 2, iclass 3/1 ums0: 5 buttons and Z dir. Timecounters tick every 1.000 msec acd0: CDRW <UJDA770 DVD/CDRW/1.20> at ata1-master UDMA33 aacd0: <RAID 1 (Mirror)> on aac0 aacd0: 69890MB (143134720 sectors) aacd1: <RAID 5> on aac0 aacd1: 139788MB (286285824 sectors) SMP: AP CPU #2 Launched! SMP: AP CPU #6 Launched! SMP: AP CPU #3 Launched! SMP: AP CPU #1 Launched! SMP: AP CPU #4 Launched! SMP: AP CPU #7 Launched! SMP: AP CPU #5 Launched! Trying to mount root from ufs:/dev/aacd0s1aReceived on Mon Sep 25 2006 - 07:36:13 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:00 UTC