PDA

View Full Version : CF, as wd0, 4.3 dmesg "DMA error"


s2scott
05-04-2008, 05:49 AM
Upgraded to 4.3, from 4.2, and all is good; however, the 4.3 dmesg newly reports the following, with regard to the COMPACT FLASH card, wd0,...
softraid0 at root
wd0(pciide0:0:0): timeout
type: ata
c_bcount: 512
c_skip: 0
pciide0:0:0: bus-master DMA error: missing interrupt, status=0x21
wd0c: device timeout reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
wd0(pciide0:0:0): timeout
type: ata
c_bcount: 512
c_skip: 0
pciide0:0:0: bus-master DMA error: missing interrupt, status=0x21
wd0: transfer error, downgrading to PIO mode 4
wd0(pciide0:0:0): using PIO mode 4
wd0c: device timeout reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
wd0: soft error (corrected)
root on wd0a swap on wd0b dump on wd0b
...None of this dmesg lines were in the 4.2 dmesg.

System is booted and running fine. Anyone with thoughts or suggestions? I was thinking about perhaps the wd flags 1111 1111 1100, or the like.

Also, the softraid0 is especially new dmesg inclusion.

/S

BSDfan666
05-04-2008, 04:53 PM
softraid0 is part of every 4.3 dmesg, it's simply a stating support is enabled in-kernel.

As for your CF problem, not a clue, a change 4.3 enabled DMA on 1-sector devices, but it shouldn't be enabled if you device doesn't support it.

In the boot UKC, change the flags for wd* devices to 0xcff, this will force a PIO 4 mode and leave DMA/UDMA disabled.

If that doesn't help, the problem lies elsewhere.. hope it helps. :)

s2scott
05-04-2008, 06:52 PM
... 4.3 enabled DMA on 1-sector devices, but it shouldn't be enabled if you device doesn't support it.The machine's BIOS shows this CF as a 1-sector device :confused:.

In the boot UKC, change the flags for wd* devices to 0xcff, this will force a PIO 4 mode and leave DMA/UDMA disabled.That's my thinking too.

openBSD seems ok; it just momentarily stalls the boot while it times out, and then figures it out.

Moral of the story... use transcend brand cf ... true ide and udma rocks! (This particular cf is an off brand gifted to me.)

Thanks,
/S

s2scott
05-05-2008, 08:55 AM
In the boot UKC, change the flags for wd* devices to 0xcff, this will force a PIO 4 mode and leave DMA/UDMA disabled.

Should it not be 0xffc???

/S

s2scott
05-05-2008, 09:16 AM
With the wd* flags set to 0xffc, the boot is stall-free and dmesg is clean...
pciide0 at pci0 dev 31 function 1 "Intel 82801BA IDE" rev 0x02: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <>
wd0: 1-sector PIO, LBA, 967MB, 1981728 sectors
wd0(pciide0:0:0): using PIO mode 4
atapiscsi0 at pciide0 channel 1 drive 0
...
softraid0 at root
root on wd0a swap on wd0b dump on wd0b
...

Thanks,
/S

BSDfan666
05-05-2008, 04:02 PM
Should it not be 0xffc???

/SCorrect, my sincere apologies. :o

s2scott
05-05-2008, 06:17 PM
FYI ... the default flag is 0x0, and, when set as such, it fails softly and self-adjusts. You will boot successfully.

When the flags are manually set, if they're incorrect, then the boot just loops in the timeout-retry cycle. It's not a hard failure, but it won't self-adjust and won't boot. Manual intervention is required.

Adjust with care and do so with a back out at the ready.

# config -o /bsd.pio -e /bsd
OpenBSD 4.3 (GENERIC) #698: Wed Mar 12 11:07:05 MDT 2008
deraadt@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
Enter 'help' for information
ukc> change wd*
44 wd* at wdc0|wdc1|wdc*|wdc*|pciide*|pciide* channel -1 flags 0x0
change [n] y
channel [-1] ?
flags [0] ? 0xffc
44 wd* changed
44 wd* at wdc0|wdc1|wdc*|wdc*|pciide*|pciide* channel -1 flags 0xffc
ukc>quit
I reboot, hit space to intercept the boot, then type

boot> boot /bsd.pio
If /bsd.pio should happen to be bad, then a reset button gets me back to /bsd (original).

Once I know bsd.pio is good, then,


mv bsd bsd.orig
mv bsd.pio bsd

/S

s2scott
05-05-2008, 06:20 PM
Correct, my sincere apologies. :oNot at all problem :).

Zmyrgel
05-09-2008, 11:38 AM
I will try this too. I tried to install OpenBSD 4.3 on my soekris CF and got similar errors when creating partitions.

Update: Didn't help in my case. I got 4-sector SanDisk CF. Dmesg that I get to climpse seems OK but when installer tries to create the partiotions it still gives me errors like "wd0c: device timeout reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), retrying"

s2scott
05-09-2008, 11:01 PM
I will try this too. I tried to install OpenBSD 4.3 on my soekris CF and got similar errors when creating partitions.

Update: Didn't help in my case. I got 4-sector SanDisk CF. Dmesg that I get to glimpse seems OK but when installer tries to create the partitions it still gives me errors like "wd0c: device timeout reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), retrying"



In machine BIOS, if configurable, try turning IDE bus mastering to OFF;
In machine BIOS, for the IDE drive that the CF enumerates to, try changing from type "AUTO" to a different but logical choice -- some BIOSs have a type "REMOVABLE IDE".
or, combination of the above.

SanDisk I know is internally flagged as removable, not fixed, and maybe openBSD and your BIOS settings are giving mixed messages.

Zmyrgel
05-09-2008, 11:12 PM
In machine BIOS, if configurable, try turning IDE bus mastering to OFF;
In machine BIOS, for the IDE drive that the CF enumerates to, try changing from type "AUTO" to a different but logical choice -- some BIOSs have a type "REMOVABLE IDE".

SanDisk I know is internally flagged as removable, not fixed, and maybe openBSD and your BIOS settings are giving mixed messages.

Ok, I'll check the BIOS options after a nights sleep and little Soekris manual reading.

Zmyrgel
05-10-2008, 09:21 AM
Ok, didn't help.

pciide:0:0:0: timeout waiting for DRQ, st=0x51 <DRDY,DSC,ERR>, err=0x00
wd0e: device timeout writing fsbn 47908 (wd0 bn 2100672, cn 521 tn 0 sn 0) retrying
...
newfs: wtfs: write error on block 47908 Input/Output error

First two lines loop ... apparently for each partition and then gives the write error and aborts installer.

I tested with 4.2,4.3 and -current but all gave same result. I also updated my Soekris BIOS.

Is my card broken or is there something else I could try? I didn't find any IDE BIOS options.