> Date: Wed, 29 Dec 2010 19:19:32 +0100
> From: Mathias Schmocker <s...@smat.ch>
> 
> wd0c: id not found reading fsbn 268435440 of 268435440-268435455 (wd0 bn 
> 268435440; cn 16709 tn 85 sn 0), retrying
> wd0c: id not found reading fsbn 268435455 of 268435440-268435455 (wd0 bn 
> 268435455; cn 16709 tn 85 sn 15), retrying
> wd0c: id not found reading fsbn 268435455 of 268435440-268435455 (wd0 bn 
> 268435455; cn 16709 tn 85 sn 15)

Hmm, the block numbers there suggest that there is actually a problem
with reading the last sector that is still addressable with 32 bits.

We really want to avoid using LBA48 addressing if we don't have to use
it.  On some Acer Labs pciide(4) controllers DMA with LBA48 addresses
is broken and we have to use PIO instead, which is horribly slow.

Can you try the diff below instead of your origional diff?


Index: wd.c
===================================================================
RCS file: /cvs/src/sys/dev/ata/wd.c,v
retrieving revision 1.95
diff -u -p -r1.95 wd.c
--- wd.c        22 Sep 2010 01:18:57 -0000      1.95
+++ wd.c        29 Dec 2010 18:52:54 -0000
@@ -548,7 +548,7 @@ __wdstart(struct wd_softc *wd, struct bu
        nblks = bp->b_bcount / wd->sc_dk.dk_label->d_secsize;
        if ((wd->sc_flags & WDF_LBA48) &&
            /* use LBA48 only if really need */
-           ((wd->sc_wdc_bio.blkno + nblks - 1 > LBA48_THRESHOLD) ||
+           ((wd->sc_wdc_bio.blkno + nblks - 1 >= LBA48_THRESHOLD) ||
             (nblks > 0xff)))
                wd->sc_wdc_bio.flags |= ATA_LBA48;
        if (wd->sc_flags & WDF_LBA)

Reply via email to