Александр В. Шутко
2012-May-29 02:50 UTC
FreeBSD 9.0-RELEASE amd64 strange interrupts behavior
Hi, All. I can't get working Adaptec 6805 driver on 9.0 for unknown reason. I got Supermicro X8DTH-iF based server with two Xeon 5645 (6 cores x 2 threads), 24Gb RAM, Adaptec sas 6805 raid. I downloaded 6805 driver code for FreeBSD 8.3 from adaptec site and compiled it under fresh-installed FreeBSD 9.0-RELEASE (amd64), kldloaded it and got hung and timeouts: aacu0: <Adaptec RAID Controller> mem 0xf8c00000-0xf8ffffff,0xf8bbc000-0xf8bbc7ff, 0xf8bbe000-0xf8bbe0ff irq 50 at device 0.0 on pci132 aacu0: Enable Raw I/O aacu0: Enable 64-bit array aacu0: New comm. interface type1 enabled ioapic2: routing intpin 2 (PCI IRQ 50) to lapic 0 vector 50 aacu0: Adaptec 6805, aac driver 2.4.2-18668 aacu0: Supported Options=141f1d7c<WCACHE,DATA64,HOSTTIME,RAID50,WINDOW4GB, SOFTERR,SGMAP64,ALARM,NONDASD,ADPTINFO,NEWCOMM,ARRAY64BIT,HEATSENSOR> aacd0: <RAID 6> on aacu0 aacd0: 2860022MB (5857325056 sectors) GEOM: new disk aacd0 pci133: driver added pci134: driver added pci254: driver added pci255: driver added aacp0: <SCSI Passthrough Bus> on aacu0 aacp1: <SCSI Passthrough Bus> on aacu0 aacp2: <SCSI Passthrough Bus> on aacu0 pci0: driver added aacu0: COMMAND 0xffffff8001fd08e8 TIMEOUT AFTER 40 SECONDS aacu0: COMMAND 0xffffff8001fd0ac8 TIMEOUT AFTER 40 SECONDS aacu0: COMMAND 0xffffff8001fd0ca8 TIMEOUT AFTER 40 SECONDS aacu0: COMMAND 0xffffff8001fd0e88 TIMEOUT AFTER 40 SECONDS aacu0: COMMAND 0xffffff8001fd1068 TIMEOUT AFTER 40 SECONDS aacu0: COMMAND 0xffffff8001fd1248 TIMEOUT AFTER 40 SECONDS aacu0: COMMAND 0xffffff8001fd1428 TIMEOUT AFTER 40 SECONDS aacu0: COMMAND 0xffffff8001fd1608 TIMEOUT AFTER 40 SECONDS aacu0: COMMAND 0xffffff8001fd17e8 TIMEOUT AFTER 40 SECONDS ..... Then I installed 8.3, compiled driver and it started without any problem. After that I cvsup-ed FreeBSD10 code (head, 28.05.2012), compiled it, booted new kernel (set module_path/boot clang), compiled driver and it kldloaded again without any error (raid6 2.8Tb disk read-write speed good, no errors). Here is kernel 10 aacu driver dmesg lines: aacu0: <Adaptec RAID Controller> mem 0xf8c00000-0xf8ffffff, 0xf8bbc000-0xf8bbc7ff,0xf8bbe000-0xf8bbe0ff irq 50 at device 0.0 on pci132 aacu0: Enable Raw I/O aacu0: Enable 64-bit array aacu0: New comm. interface type1 enabled ioapic2: routing intpin 2 (PCI IRQ 50) to lapic 33 vector 49 aacu0: Adaptec 6805, aac driver 2.4.2-18668 aacu0: Supported Options=141f1d7c<WCACHE,DATA64,HOSTTIME,RAID50,WINDOW4GB,SOFTERR,SGMAP64, ALARM,NONDASD,ADPTINFO,NEWCOMM,ARRAY64BIT,HEATSENSOR> aacd0 on aacu0 aacd0: 2860022MB (5857325056 sectors) GEOM: new disk aacd0 pci133: driver added pci134: driver added ...... The problem exists only under 9.0-RELEASE. Interrupts doesn't work for this device at all. Driver makes device initialization using sync requests and then hungs on first async io waiting interrupt. Driver interrupts install code looks good: sc->aac_irq_rid = 0; if ((sc->aac_irq = bus_alloc_resource_any(sc->aac_dev, SYS_RES_IRQ, &sc->aac_irq_rid, RF_SHAREABLE | RF_ACTIVE)) == NULL) { device_printf(sc->aac_dev, "can't allocate interrupt\n"); return (EINVAL); } if (sc->flags & AAC_FLAGS_NEW_COMM_TYPE1) { if (bus_setup_intr(sc->aac_dev, sc->aac_irq, INTR_MPSAFE|INTR_TYPE_BIO, NULL,. aac_new_intr_type1, sc, &sc->aac_intr)) { device_printf(sc->aac_dev, "can't set up interrupt\n"); return (EINVAL); } I added "panic" call at the beginning of interrupt handler "aac_new_intr_type1()" and found it never called during driver initialization on 9.0. Is this 9.0-RELEASE bug or future ? -- ????????? ?. ????? <AVShutko@mail.khstu.ru>