tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: WD_QUIRK_FORCE_LBA48



> The 'wd' (aka ATA disk) driver has a load of code for the
> WD_QUIRK_FORCE_LBA48 quirk.

> This forces LBA48 transfers for an ever increasing number of disks.

> My suspicion is that the problems only relate to transfers that
> actually cross the LBA48 boundary.

> So quite possibly checking:
>       wd->sc_wdc_bio.blkno + nblks > LBA48_THRESHOLD
> would remove the need for the quirk.

In my wd.c, I actually added another quirk, one which effectively
lowers LBA48_THRESHOLD by one sector, upon finding that my "Hitachi
HDT721010SLA360" was returning errors for sector 0xfffffff:

        if ( (wd->sc_quirks & WD_QUIRK_FORCE_LBA48) ||
             ( (wd->sc_flags & WDF_LBA48) &&
               ( (wd->sc_quirks & WD_QUIRK_LOW_LBA48_THRESH) ?
                 (wd->sc_wdc_bio.blkno >= LBA48_THRESHOLD) :
                 (wd->sc_wdc_bio.blkno > LBA48_THRESHOLD) ) ) )

Looking at the comments, I suspect at least a few of the
QUIRK_FORCE_LBA48 drives could use this instead, but since I don't have
them to test, I don't know.

But, really, it's not clear to me that it's worth doing non-LBA48
transfers at all on drives capable of LBA48 - what's the cost, two more
command bytes per transfer?  Four?  And that, only for accesses below
the 128G point.

We might need quirks for drives that claim LBA48 but which do not
actually work with LBA48, but I suspect there would be very few of
them, way fewer than the current (and growing) list.

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML                mouse%rodents-montreal.org@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index