On Fri, 20 Jul 2007, Stephan A. Rickauer wrote:
On Fri, 20 Jul 2007 00:49:03 -0600
Joel Knight <[EMAIL PROTECTED]> wrote:
--- Quoting Doros Eracledes on 2007/07/19 at 10:42 +0100:
I have a proliant DL360-G5 and loaded 4.1-stable on it, all
hardware is detected fine.
I want see if I can get the raid controller status with bioctl.
Controller initially came with firmware 1.20 so I upgraded it to the
latest (1.66) version but still can't get the raid controller status
using bioctl.
Here is what I get:
#bioctl sd0
bioctl: BIOCINQ: Inappropriate ioctl for device
Known issue, no fix.
mickey@ told me he found the issue but I'm not sure what happened to
the code. FYI, this issue doesn't seem to happen on the DL380.
I do have the same issue with 4.1 on a DL385, though. Only one volume
configured, controller firmware 2.08.
# bioctl ciss0
bioctl: Can't locate ciss0 device via /dev/bio
The cause is that the ciss_inquiry struct returned by the firmware has the
member buswidth set to 0 (zero). So the physical drives do not get probed
by the driver. If you set this to some other value (the original value in
the last firmware versions was 16) the "Identify Drive" commands will
fail. If you change the addressing mode from the "Big Bit" method to the
old scheme the drives can be queried. I hacked up a small patch that made
it "work" for the servers used in our project (DL 380 G5). I attach it
here, but beware that it has some problems:
1. Drives that are identified by the scsi id 0:0.0 do not display the
right status. We do not have a drive there, so I did not look into that
for longer (no time for "beauty work").
2. I had to check the drive present bit and would add only those drives
that were present on driver initialisation. Else the bioctl would show all
drives as "Invalid" (with exception to the one that would get the id
0:0.0).
Overall it is only a quick and dirty hack to make it work. I try to look
into that because I will have the servers here available a little bit
longer, but I can't promise that. The other parts of the overall project
are eating up all my time...
So this is the hack, I checked the functionality by removing one of the
drives and reinserting it. All seems to work ok with the exceptions
mentioned above. You can even mark a drive via bioctl. The patch is
against 4.1-stable, dmesg and bioctl output follows below. There is a
similar system with 5 HDs in a RAID 5 that works too. Use this at your
own risk:
Index: ciss.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/ciss.c,v
retrieving revision 1.24
diff -u -p -r1.24 ciss.c
--- ciss.c 18 Jan 2007 14:46:24 -0000 1.24
+++ ciss.c 20 Jul 2007 10:21:41 -0000
@@ -330,6 +330,14 @@ ciss_attach(struct ciss_softc *sc)
sc->maxunits = inq->numld;
sc->nbus = inq->nscsi_bus;
sc->ndrives = inq->buswidth;
+
+ if (sc->ndrives == 0) {
+ /* Handle the new firmware */
+
+ sc->sc_flags |= CISS_NOBIGBIT;
+ sc->ndrives = 16;
+ }
+
printf(": %d LD%s, HW rev %d, FW %4.4s/%4.4s\n",
inq->numld, inq->numld == 1? "" : "s",
inq->hw_rev, inq->fw_running, inq->fw_stored);
@@ -1152,11 +1160,19 @@ ciss_ioctl(struct device *dev, u_long cm
if (!ldp)
continue;
for (pd = 0; pd < ldp->ndrives; pd++)
- if (ldp->tgts[pd] == (CISS_BIGBIT +
- bb->bb_channel * sc->ndrives +
- bb->bb_target))
- error = ciss_blink(sc, ld, pd,
- bb->bb_status, blink);
+ if (sc->sc_flags & CISS_NOBIGBIT) {
+ if (ldp->tgts[pd] == (
+ bb->bb_channel * sc->ndrives +
+ bb->bb_target))
+ error = ciss_blink(sc, ld, pd,
+ bb->bb_status, blink);
+ } else {
+ if (ldp->tgts[pd] == (CISS_BIGBIT +
+ bb->bb_channel * sc->ndrives +
+ bb->bb_target))
+ error = ciss_blink(sc, ld, pd,
+ bb->bb_status, blink);
+ }
}
break;
@@ -1318,9 +1334,14 @@ ciss_pdscan(struct ciss_softc *sc, int l
pdid = sc->scratch;
for (i = 0; i < sc->nbus; i++)
for (j = 0; j < sc->ndrives; j++) {
- drv = CISS_BIGBIT + i * sc->ndrives + j;
- if (!ciss_pdid(sc, drv, pdid, SCSI_NOSLEEP|SCSI_POLL))
- buf[k++] = drv;
+ drv = i * sc->ndrives + j;
+ if (! (sc->sc_flags & CISS_NOBIGBIT))
+ drv += CISS_BIGBIT;
+ if (!ciss_pdid(sc, drv, pdid, SCSI_NOSLEEP|SCSI_POLL)) {
+ /* Only use those which have a drive present */
+ if (pdid->present & CISS_PD_PRESENT)
+ buf[k++] = drv;
+ }
}
if (!k)
Index: cissvar.h
===================================================================
RCS file: /cvs/src/sys/dev/ic/cissvar.h,v
retrieving revision 1.6
diff -u -p -r1.6 cissvar.h
--- cissvar.h 23 Dec 2006 17:46:39 -0000 1.6
+++ cissvar.h 20 Jul 2007 10:21:41 -0000
@@ -40,6 +40,7 @@ struct ciss_softc {
u_int sc_flags;
#define CISS_BIO 0x0001
+#define CISS_NOBIGBIT 0x0002
int ccblen, maxcmd, maxsg, nbus, ndrives, maxunits;
ciss_queue_head sc_free_ccb, sc_ccbq, sc_ccbdone;
dmesg:
OpenBSD 4.1-stable (GENERIC.MP.ACPI) #23: Fri Jul 20 09:29:28 CEST 2007
[EMAIL PROTECTED]:/usr/src/sys/arch/amd64/compile/GENERIC.MP.ACPI
real mem = 2145349632 (2095068K)
avail mem = 1618526208 (1580592K)
using 22937 buffers containing 429486080 bytes (419420K) of memory
mainbus0 (root)
bios0 at mainbus0: SMBIOS rev. 2.3 @ 0xee000 (70 entries)
bios0: HP ProLiant DL380 G5
acpi0 at mainbus0: rev 2
acpi0: tables DSDT FACP SPCR MCFG HPET SPMI APIC
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Xeon(R) CPU 5130 @ 2.00GHz, 2000.27 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,TM2,CX16,xTPR,NXE,LONG
cpu0: 4MB 64b/line 16-way L2 cache
cpu0: apic clock running at 333MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Xeon(R) CPU 5130 @ 2.00GHz, 2000.00 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,TM2,CX16,xTPR,NXE,LONG
cpu1: 4MB 64b/line 16-way L2 cache
ioapic0 at mainbus0 apid 8 pa 0xfec00000, version 20, 24 pins
acpimadt0: unknown apic structure type ff
acpiprt0 at acpi0: bus 1 (IP2P)
acpiprt1 at acpi0: bus 2 (IPTA)
acpiprt2 at acpi0: bus 4 (IPTB)
acpiprt3 at acpi0: bus 11 (IPE1)
acpiprt4 at acpi0: bus 14 (IPE2)
acpiprt5 at acpi0: bus 17 (IPE3)
acpiprt6 at acpi0: bus 10 (IPE4)
acpiprt7 at acpi0: bus 9 (PT02)
acpiprt8 at acpi0: bus 6 (PT03)
acpiprt9 at acpi0: bus 19 (PT04)
acpiprt10 at acpi0: bus 23 (PT06)
acpiprt11 at acpi0: bus 0 (PCI0)
acpitz0 at acpi0, critical temperature: 31 degC
ipmi0 at mainbus0: version 2.0 interface KCS iobase 0xca2/2 spacing 1
pci0 at mainbus0 bus 0: configuration mode 1
pchb0 at pci0 dev 0 function 0 vendor "Intel", unknown product 0x25d8 rev 0xb1
ppb0 at pci0 dev 2 function 0 "Intel 5000 PCIE" rev 0xb1
pci1 at ppb0 bus 9
ppb1 at pci1 dev 0 function 0 "Intel 6321ESB PCIE" rev 0x01
pci2 at ppb1 bus 10
ppb2 at pci2 dev 0 function 0 "Intel 6321ESB PCIE" rev 0x01
pci3 at ppb2 bus 11
ppb3 at pci2 dev 1 function 0 "Intel 6321ESB PCIE" rev 0x01
pci4 at ppb3 bus 14
ppb4 at pci2 dev 2 function 0 "Intel 6321ESB PCIE" rev 0x01
pci5 at ppb4 bus 17
ppb5 at pci1 dev 0 function 3 "Intel 6321ESB PCIE-PCIX" rev 0x01
pci6 at ppb5 bus 18
ppb6 at pci0 dev 3 function 0 "Intel 5000 PCIE" rev 0xb1
pci7 at ppb6 bus 6
ciss0 at pci7 dev 0 function 0 "Hewlett-Packard Smart Array" rev 0x03: apic 8
int 18 (irq 10)
ciss0: 1 LD, HW rev 3, FW 2.10/2.10
scsibus0 at ciss0: 1 targets
sd0 at scsibus0 targ 0 lun 0: <HP, LOGICAL VOLUME, 2.10> SCSI3 0/direct fixed
sd0: 69973MB, 69973 cyl, 64 head, 32 sec, 512 bytes/sec, 143305920 sec total
ppb7 at pci0 dev 4 function 0 "Intel 5000 PCIE" rev 0xb1
pci8 at ppb7 bus 19
ppb8 at pci0 dev 5 function 0 "Intel 5000 PCIE" rev 0xb1
pci9 at ppb8 bus 22
ppb9 at pci0 dev 6 function 0 "Intel 5000 PCIE" rev 0xb1
pci10 at ppb9 bus 23
ppb10 at pci0 dev 7 function 0 "Intel 5000 PCIE" rev 0xb1
pci11 at ppb10 bus 26
pchb1 at pci0 dev 16 function 0 "Intel 5000 Error Reporting" rev 0xb1
pchb2 at pci0 dev 16 function 1 "Intel 5000 Error Reporting" rev 0xb1
pchb3 at pci0 dev 16 function 2 "Intel 5000 Error Reporting" rev 0xb1
pchb4 at pci0 dev 17 function 0 "Intel 5000 Reserved" rev 0xb1
pchb5 at pci0 dev 19 function 0 "Intel 5000 Reserved" rev 0xb1
pchb6 at pci0 dev 21 function 0 "Intel 5000 FBD" rev 0xb1
pchb7 at pci0 dev 22 function 0 "Intel 5000 FBD" rev 0xb1
ppb11 at pci0 dev 28 function 0 "Intel 6321ESB PCIE" rev 0x09
pci12 at ppb11 bus 2
ppb12 at pci12 dev 0 function 0 "ServerWorks PCIE-PCIX" rev 0xc3
pci13 at ppb12 bus 3
bnx0 at pci13 dev 0 function 0 "Broadcom BCM5708" rev 0x12: apic 8 int 16 (irq
5)
ppb13 at pci0 dev 28 function 1 "Intel 6321ESB PCIE" rev 0x09
pci14 at ppb13 bus 4
ppb14 at pci14 dev 0 function 0 "ServerWorks PCIE-PCIX" rev 0xc3
pci15 at ppb14 bus 5
bnx1 at pci15 dev 0 function 0 "Broadcom BCM5708" rev 0x12: apic 8 int 17 (irq
7)
uhci0 at pci0 dev 29 function 0 "Intel 6321ESB USB" rev 0x09: apic 8 int 16
(irq 5)
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1 at pci0 dev 29 function 1 "Intel 6321ESB USB" rev 0x09: apic 8 int 17
(irq 7)
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2 at pci0 dev 29 function 2 "Intel 6321ESB USB" rev 0x09: apic 8 int 18
(irq 10)
usb2 at uhci2: USB revision 1.0
uhub2 at usb2
uhub2: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
uhci3 at pci0 dev 29 function 3 "Intel 6321ESB USB" rev 0x09: apic 8 int 19
(irq 10)
usb3 at uhci3: USB revision 1.0
uhub3 at usb3
uhub3: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub3: 2 ports with 2 removable, self powered
ehci0 at pci0 dev 29 function 7 "Intel 6321ESB USB" rev 0x09: apic 8 int 16
(irq 5)
usb4 at ehci0: USB revision 2.0
uhub4 at usb4
uhub4: Intel EHCI root hub, rev 2.00/1.00, addr 1
uhub4: 8 ports with 8 removable, self powered
ppb15 at pci0 dev 30 function 0 "Intel 82801BA AGP" rev 0xd9
pci16 at ppb15 bus 1
vga1 at pci16 dev 3 function 0 "ATI ES1000" rev 0x02
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
"Compaq iLO" rev 0x03 at pci16 dev 4 function 0 not configured
"Compaq iLO" rev 0x03 at pci16 dev 4 function 2 not configured
uhci4 at pci16 dev 4 function 4 "Hewlett-Packard USB" rev 0x00: apic 8 int 22
(irq 10)
usb5 at uhci4: USB revision 1.0
uhub5 at usb5
uhub5: Hewlett-Packard UHCI root hub, rev 1.00/1.00, addr 1
uhub5: 2 ports with 2 removable, self powered
"Hewlett-Packard IPMI" rev 0x00 at pci16 dev 4 function 6 not configured
pcib0 at pci0 dev 31 function 0 "Intel 6321ESB LPC" rev 0x09
pciide0 at pci0 dev 31 function 1 "Intel 6321ESB IDE" rev 0x09: DMA, channel 0
configured to compatibility, channel 1 configured to compatibility
atapiscsi0 at pciide0 channel 0 drive 0
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: <Optiarc, DVD-ROM DDU810A, RH52> SCSI0 5/cdrom
removable
cd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 disabled (no drives)
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
uhidev0 at uhub5 port 1 configuration 1 interface 0
uhidev0: HP Virtual Keyboard, rev 1.10/0.02, addr 2, iclass 3/1
ukbd0 at uhidev0: 8 modifier keys, 6 key codes, country code 33
wskbd1 at ukbd0 mux 1
wskbd1: connecting to wsdisplay0
uhidev1 at uhub5 port 1 configuration 1 interface 1
uhidev1: HP Virtual Keyboard, rev 1.10/0.02, addr 2, iclass 3/1
ums0 at uhidev1: 3 buttons
wsmouse0 at ums0 mux 0
uhub6 at uhub5 port 2
uhub6: HP Virtual Hub, rev 1.10/0.01, addr 3
uhub6: 7 ports with 7 removable, self powered
dkcsum: sd0 matches BIOS drive 0x80
root on sd0a
rootdev=0x400 rrootdev=0xd00 rawdev=0xd02
bnx1: address 00:1b:78:37:51:02
brgphy0 at bnx1 phy 1: BCM5708C 10/100/1000baseT PHY, rev. 6
bnx0: address 00:1b:78:37:51:04
brgphy1 at bnx0 phy 1: BCM5708C 10/100/1000baseT PHY, rev. 6
bioctl output:
$ sudo bioctl sd0
Volume Status Size Device
ciss0 0 Online 73372631040 sd0 RAID1
0 Online 73407865856 0:6.0 noencl <HP DG072ABAB3 >
1 Online 73407865856 0:7.0 noencl <HP DG072ABAB3 >