On Oct 21 18:11:07, Stephane Lapie wrote: > Hello, > > I am currently working with a Portwell NAR-5530 (network appliance > running off Intel hardware, can use regular HDs or CF cards as boot > device). > > We want to use this at work for network appliances, but end up > bumping in the following problem : the kernel detects any device > plugged to the controller (SATA or CF) as UltraDMA-5, even though the > BIOS specifies otherwise clearly. > > This results in error messages while installing OpenBSD 4.3 (via > PXE), as seen in the following dmesg trace retrieved from the serial > interface : > > OpenBSD 4.3 (RAMDISK_CD) #645: Wed Mar 12 11:31:03 MDT 2008 > [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/RAMDISK_CD > cpu0: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz ("GenuineIntel" 686- > class) 2.40 GHz > cpu0: > FPU,V86,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,EST,TM2,CX16,xTPRPXEBOOT 2.02 > real mem = 2138324992 (2039MB) > avail mem = 2061471744 (1965MB) > mainbus0 at roote to com0 > bios0 at mainbus0: AT/286+ BIOS, date 03/15/07, BIOS32 rev. 0 @ > 0xf0010, SMBIOS rev. 2.4 @ 0xfbc30 (27 entries) > bios0: vendor American Megatrends Inc. version "080014" date 03/15/2007 > apm at bios0 function 0x15 not configured > acpi0 at bios0: rev 2, can't enable ACPI > bios0: ROM list: 0xc0000/0xb000! 0xcb000/0x1000 > cpu0 at mainbus0 > pci0 at mainbus0 bus 0: configuration mode 1 (no bios) > pchb0 at pci0 dev 0 function 0 "Intel 82Q965 Host" rev 0x02 > agp at pchb0 not configured > vga1 at pci0 dev 2 function 0 "Intel 82Q965 Video" rev 0x02 > wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) > ppb0 at pci0 dev 28 function 0 "Intel 82801H PCIE" rev 0x02: irq 10 > pci1 at ppb0 bus 1 > em0 at pci1 dev 0 function 0 "Intel PRO/1000MT (82573L)" rev 0x00: > irq 10, address 00:90:fb:12:b4:6d > ppb1 at pci0 dev 28 function 1 "Intel 82801H PCIE" rev 0x02: irq 11 > pci2 at ppb1 bus 2 > em1 at pci2 dev 0 function 0 "Intel PRO/1000MT (82573L)" rev 0x00: > irq 11, address 00:90:fb:12:b4:6e > ppb2 at pci0 dev 28 function 2 "Intel 82801H PCIE" rev 0x02: irq 5 > pci3 at ppb2 bus 3 > em2 at pci3 dev 0 function 0 "Intel PRO/1000MT (82573L)" rev 0x00: > irq 5, address 00:90:fb:12:b4:6f > ppb3 at pci0 dev 28 function 3 "Intel 82801H PCIE" rev 0x02: irq 15 > pci4 at ppb3 bus 4 > em3 at pci4 dev 0 function 0 "Intel PRO/1000MT (82573L)" rev 0x00: > irq 15, address 00:90:fb:12:b4:70 > ppb4 at pci0 dev 28 function 4 "Intel 82801H PCIE" rev 0x02: irq 10 > pci5 at ppb4 bus 5 > em4 at pci5 dev 0 function 0 "Intel PRO/1000MT (82573L)" rev 0x00: > irq 10, address 00:90:fb:12:b4:71 > ppb5 at pci0 dev 28 function 5 "Intel 82801H PCIE" rev 0x02: irq 11 > pci6 at ppb5 bus 6 > em5 at pci6 dev 0 function 0 "Intel PRO/1000MT (82573L)" rev 0x00: > irq 11, address 00:90:fb:12:b4:72 > uhci0 at pci0 dev 29 function 0 "Intel 82801H USB" rev 0x02: irq 14 > uhci1 at pci0 dev 29 function 1 "Intel 82801H USB" rev 0x02: irq 15 > ehci0 at pci0 dev 29 function 7 "Intel 82801H USB" rev 0x02: irq 14 > usb0 at ehci0: USB revision 2.0 > uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1 > ppb6 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0xf2 > pci7 at ppb6 bus 7 > em6 at pci7 dev 12 function 0 "Intel PRO/1000MT (82541GI)" rev 0x05: > irq 10, address 00:90:fb:12:b4:73 > em7 at pci7 dev 13 function 0 "Intel PRO/1000MT (82541GI)" rev 0x05: > irq 11, address 00:90:fb:12:b4:74 > em8 at pci7 dev 14 function 0 "Intel PRO/1000MT (82541GI)" rev 0x05: > irq 5, address 00:90:fb:12:b4:75 > ichpcib0 at pci0 dev 31 function 0 "Intel 82801H LPC" rev 0x02: PM > disabled > pciide0 at pci0 dev 31 function 2 "Intel 82801H SATA" rev 0x02: DMA, > channel 0 configured to native-PCI, channel 1 configured to native-PCI > pciide0: using irq 15 for native-PCI interrupt > wd0 at pciide0 channel 0 drive 0: <SanDisk SDCFH2-002G> > wd0: 4-sector PIO, LBA, 1953MB, 4001760 sectors > wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5 > "Intel 82801H SMBus" rev 0x02 at pci0 dev 31 function 3 not configured > pciide1 at pci0 dev 31 function 5 "Intel 82801H SATA" rev 0x02: DMA, > channel 0 wired to native-PCI, channel 1 wired to native-PCI > pciide1: using irq 15 for native-PCI interrupt > usb1 at uhci0: USB revision 1.0 > uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1 > usb2 at uhci1: USB revision 1.0 > uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1 > isa0 at ichpcib0 > isadma0 at isa0 > 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 > npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16 > pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo > pccom0: console > pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo > biomask f3c5 netmask ffe5 ttymask ffe7 > rd0: fixed, 3800 blocks > uhub3 at uhub1 port 2 "Mitsumi Electric Hub in Apple Extended USB > Keyboard" rev 1.10/4.10 addr 2 > uhidev0 at uhub3 port 3 configuration 1 interface 0 "Mitsumi Electric > Apple Extended USB Keyboard" rev 1.10/4.10 addr 3 > uhidev0: iclass 3/1 > ukbd0 at uhidev0 > wskbd1 at ukbd0 mux 1 > wskbd1: connecting to wsdisplay0 > uhidev1 at uhub3 port 3 configuration 1 interface 1 "Mitsumi Electric > Apple Extended USB Keyboard" rev 1.10/4.10 addr 3 > uhidev1: iclass 3/0, 3 report ids > uhid at uhidev1 reportid 2 not configured > uhid at uhidev1 reportid 3 not configured > uhidev2 at uhub3 port 2 configuration 1 interface 0 "Mitsumi Electric > Apple Optical USB Mouse" rev 1.10/1.08 addr 4 > uhidev2: iclass 3/1 > uhid at uhidev2 not configured > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), > retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), > retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), > retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), > retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), > retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0) > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 64 of 64-67 (wd0 bn 64; cn 0 tn 1 > sn 1), retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 64 of 64-67 (wd0 bn 64; cn 0 tn 1 > sn 1), retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 64 of 64-67 (wd0 bn 64; cn 0 tn 1 > sn 1), retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 64 of 64-67 (wd0 bn 64; cn 0 tn 1 > sn 1), retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 64 of 64-67 (wd0 bn 64; cn 0 tn 1 > sn 1), retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 64 of 64-67 (wd0 bn 64; cn 0 tn 1 > sn 1) > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 1024 of 1024-1027 (wd0 bn 1024; cn > 0 tn 16 sn 16), retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 1024 of 1024-1027 (wd0 bn 1024; cn > 0 tn 16 sn 16), retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 1024 of 1024-1027 (wd0 bn 1024; cn > 0 tn 16 sn 16), retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 1024 of 1024-1027 (wd0 bn 1024; cn > 0 tn 16 sn 16), retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 1024 of 1024-1027 (wd0 bn 1024; cn > 0 tn 16 sn 16), retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 1024 of 1024-1027 (wd0 bn 1024; cn > 0 tn 16 sn 16) > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), > retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), > retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), > retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), > retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), > retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0) > PXE boot MAC address 00:90:fb:12:b4:6d, interface em0 > root on rd0a swap on rd0b dump on rd0b > > > > I also tried with OpenBSD 4.4-current just in case the problem might > have been solved : > > OpenBSD 4.4-current (RAMDISK_CD) #920: Sat Oct 18 21:21:09 MDT 2008 > [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/RAMDISK_CD > cpu0: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz ("GenuineIntel" 686- > class) 2.40 GHz > cpu0: > FPU,V86,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,EST,TM2,CX16,xTPR > real mem = 2138324992 (2039MB) > avail mem = 2061066240 (1965MB) > mainbus0 at root > bios0 at mainbus0: AT/286+ BIOS, date 03/15/07, BIOS32 rev. 0 @ > 0xf0010, SMBIOS rev. 2.4 @ 0xfbc30 (27 entries) > bios0: vendor American Megatrends Inc. version "080014" date 03/15/2007 > apm0 at bios0: Power Management spec V1.2 > acpi at bios0 function 0x0 not configured > pcibios0 at bios0: rev 3.0 @ 0xf0000/0x10000 > pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xf57b0/320 (18 entries) > pcibios0: no compatible PCI ICU found: ICU vendor 0x8086 product 0x2810 > pcibios0: Warning, unable to fix up PCI interrupt routing > pcibios0: PCI bus #7 is the last bus > bios0: ROM list: 0xc0000/0xb000! 0xcb000/0x1000 > cpu0 at mainbus0: (uniprocessor) > pci0 at mainbus0 bus 0: configuration mode 1 (no bios) > pchb0 at pci0 dev 0 function 0 "Intel 82Q965 Host" rev 0x02 > vga1 at pci0 dev 2 function 0 "Intel 82Q965 Video" rev 0x02 > wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) > ppb0 at pci0 dev 28 function 0 "Intel 82801H PCIE" rev 0x02: irq 10 > pci1 at ppb0 bus 1 > em0 at pci1 dev 0 function 0 "Intel PRO/1000MT (82573L)" rev 0x00: > irq 10, address 00:90:fb:12:b4:6d > ppb1 at pci0 dev 28 function 1 "Intel 82801H PCIE" rev 0x02: irq 11 > pci2 at ppb1 bus 2 > em1 at pci2 dev 0 function 0 "Intel PRO/1000MT (82573L)" rev 0x00: > irq 11, address 00:90:fb:12:b4:6e > ppb2 at pci0 dev 28 function 2 "Intel 82801H PCIE" rev 0x02: irq 5 > pci3 at ppb2 bus 3 > em2 at pci3 dev 0 function 0 "Intel PRO/1000MT (82573L)" rev 0x00: > irq 5, address 00:90:fb:12:b4:6f > ppb3 at pci0 dev 28 function 3 "Intel 82801H PCIE" rev 0x02: irq 15 > pci4 at ppb3 bus 4 > em3 at pci4 dev 0 function 0 "Intel PRO/1000MT (82573L)" rev 0x00: > irq 15, address 00:90:fb:12:b4:70 > ppb4 at pci0 dev 28 function 4 "Intel 82801H PCIE" rev 0x02: irq 10 > pci5 at ppb4 bus 5 > em4 at pci5 dev 0 function 0 "Intel PRO/1000MT (82573L)" rev 0x00: > irq 10, address 00:90:fb:12:b4:71 > ppb5 at pci0 dev 28 function 5 "Intel 82801H PCIE" rev 0x02: irq 11 > pci6 at ppb5 bus 6 > em5 at pci6 dev 0 function 0 "Intel PRO/1000MT (82573L)" rev 0x00: > irq 11, address 00:90:fb:12:b4:72 > uhci0 at pci0 dev 29 function 0 "Intel 82801H USB" rev 0x02: irq 14 > uhci1 at pci0 dev 29 function 1 "Intel 82801H USB" rev 0x02: irq 15 > ehci0 at pci0 dev 29 function 7 "Intel 82801H USB" rev 0x02: irq 14 > usb0 at ehci0: USB revision 2.0 > uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1 > ppb6 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0xf2 > pci7 at ppb6 bus 7 > em6 at pci7 dev 12 function 0 "Intel PRO/1000MT (82541GI)" rev 0x05: > irq 10, address 00:90:fb:12:b4:73 > em7 at pci7 dev 13 function 0 "Intel PRO/1000MT (82541GI)" rev 0x05: > irq 11, address 00:90:fb:12:b4:74 > em8 at pci7 dev 14 function 0 "Intel PRO/1000MT (82541GI)" rev 0x05: > irq 5, address 00:90:fb:12:b4:75 > ichpcib0 at pci0 dev 31 function 0 "Intel 82801H LPC" rev 0x02: PM > disabled > pciide0 at pci0 dev 31 function 2 "Intel 82801H SATA" rev 0x02: DMA, > channel 0 configured to native-PCI, channel 1 configured to native-PCI > pciide0: using irq 15 for native-PCI interrupt > wd0 at pciide0 channel 0 drive 0: <SanDisk SDCFH2-002G> > wd0: 4-sector PIO, LBA, 1953MB, 4001760 sectors > wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5 > "Intel 82801H SMBus" rev 0x02 at pci0 dev 31 function 3 not configured > pciide1 at pci0 dev 31 function 5 "Intel 82801H SATA" rev 0x02: DMA, > channel 0 wired to native-PCI, channel 1 wired to native-PCI > pciide1: using irq 15 for native-PCI interrupt > usb1 at uhci0: USB revision 1.0 > uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1 > usb2 at uhci1: USB revision 1.0 > uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1 > isa0 at ichpcib0 > isadma0 at isa0 > com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo > com0: console > 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 > npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16 > biomask f3c5 netmask ffe5 ttymask ffff > rd0: fixed, 3800 blocks > uhub3 at uhub1 port 2 "Mitsumi Electric Hub in Apple Extended USB > Keyboard" rev 1.10/4.10 addr 2 > uhidev0 at uhub3 port 3 configuration 1 interface 0 "Mitsumi Electric > Apple Extended USB Keyboard" rev 1.10/4.10 addr 3 > uhidev0: iclass 3/1 > ukbd0 at uhidev0 > wskbd1 at ukbd0 mux 1 > wskbd1: connecting to wsdisplay0 > uhidev1 at uhub3 port 3 configuration 1 interface 1 "Mitsumi Electric > Apple Extended USB Keyboard" rev 1.10/4.10 addr 3 > uhidev1: iclass 3/0, 3 report ids > uhid at uhidev1 reportid 2 not configured > uhid at uhidev1 reportid 3 not configured > uhidev2 at uhub3 port 2 configuration 1 interface 0 "Mitsumi Electric > Apple Optical USB Mouse" rev 1.10/1.08 addr 4 > uhidev2: iclass 3/1 > uhid at uhidev2 not configured > softraid0 at root > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), > retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), > retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), > retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), > retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), > retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0) > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 64 of 64-67 (wd0 bn 64; cn 0 tn 1 > sn 1), retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 64 of 64-67 (wd0 bn 64; cn 0 tn 1 > sn 1), retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 64 of 64-67 (wd0 bn 64; cn 0 tn 1 > sn 1), retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 64 of 64-67 (wd0 bn 64; cn 0 tn 1 > sn 1), retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 64 of 64-67 (wd0 bn 64; cn 0 tn 1 > sn 1), retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 64 of 64-67 (wd0 bn 64; cn 0 tn 1 > sn 1) > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 1024 of 1024-1027 (wd0 bn 1024; cn > 0 tn 16 sn 16), retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 1024 of 1024-1027 (wd0 bn 1024; cn > 0 tn 16 sn 16), retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 1024 of 1024-1027 (wd0 bn 1024; cn > 0 tn 16 sn 16), retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 1024 of 1024-1027 (wd0 bn 1024; cn > 0 tn 16 sn 16), retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 1024 of 1024-1027 (wd0 bn 1024; cn > 0 tn 16 sn 16), retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 1024 of 1024-1027 (wd0 bn 1024; cn > 0 tn 16 sn 16) > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), > retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), > retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), > retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), > retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), > retrying > pciide0:0:0: dmamode error (4) > wd0c: aborted command reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0) > PXE boot MAC address 00:90:fb:12:b4:6d, interface em0 > root on rd0a swap on rd0b dump on rd0b > > > > I can't help but be startled by the following line : > > wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5 > > while the BIOS states Ultra-DMA is not supported by my flash card. > > Accordingly to wd(4), I attempted setting the flags to 0x0fac to no > avail (PIO mode 4, DMA mode 2, no UDMA). The flags were plainly ignored. > > We asked a Portwell salesperson to come on-site and proceed to testing : > - with a Transcend CF card (BIOS reported Ultra-DMA 4 capable ; > OpenBSD kept on reporting UDMA-5) > - with a SATA hard disk (BIOS reported Ultra-DMA 6 capable ; OpenBSD > kept on reporting UDMA-5) > > And while the SATA hard disk proceeded quite fine, the Transcend CF > card yielded DMA errors (as one would expect). > > As a last resort, I started digging in the source code for the wd > device in OpenBSD 4.3's source, and stumbled upon the following code > in /usr/src/sys/dev/ic/wdc.c at line 1274 : > > if ((wdc->cap & WDC_CAPABILITY_SATA) != 0 && > (params->atap_sata_caps != 0x0000 && > params->atap_sata_caps != 0xffff)) { > WDCDEBUG_PRINT(("%s: atap_sata_caps=0x%x\n", __func__, > params->atap_sata_caps), DEBUG_PROBE); > > /* Skip ATA modes detection for native SATA drives */ > drvp->PIO_mode = drvp->PIO_cap = 4; > drvp->DMA_mode = drvp->DMA_cap = 2; > drvp->UDMA_mode = drvp->UDMA_cap = 5; > drvp->drive_flags |= DRIVE_SATA | DRIVE_MODE | > DRIVE_UDMA; > drvp->ata_vers = 4; > return; > } > > Obviously this is the reason why no matter what device or flags I > use, it gets detected as UDMA-5. > > Forcing everything like this into the UDMA-5 box without any checking > looks like a pretty scary gamble to me, so I'd like to raise the > issue, or even, if there is anyone who could give me enough pointers > about the proper behavior, I don't mind trying implementing a patch.
My disk too has been forced to use Ultra DMA mode 5, see http://marc.info/?l=openbsd-misc&m=122235339020243&w=2 Being lazy enough to look at the source then, I only noticed that the mode is limited from above (I was trying to use mode 7); your example shows it is also bounded from below. See the above thread for the answer I was given: the wd(4) flags are not necesarilly used, e.g. they are ignored on my pciide (and your too, probably): (me) pciide1 at pci0 dev 31 function 2 "Intel 82801I SATA" rev 0x02 (you) pciide0 at pci0 dev 31 function 2 "Intel 82801H SATA" rev 0x02 "The flags are used only with controllers that support DMA operations and mode settings (like some pciide(4) controllers)." - wd(4). ^^^^ Jan