tech-kern archive

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

Re: WD_QUIRK_FORCE_LBA48



bad%bsd.de@localhost writes:
> On Tue, Dec 15, 2009 at 10:35:37AM +0100, Manuel Bouyer wrote:
> > ATA up to and including ATA6 says that words 60-61 shall be less than
> > or equal to 0x10000000. ATA7 made this 0xfffffff (no idea why)
> > which means that the last sector effectively addressable by LBA28
> > effectively decreased by one sector between ATA6 and ATA7.
> 
> Yes, however, the sector 0xfffffff is accessible via LBA48 on drives that
> support LBA48.
> 
> The check I proposed in the patch effectively is:
> 
> if (drive supports LBA48) {
>       if (transfer accesses sectors beyond 0xffffffe)
>               use LBA48 transfer;
> }
> else
>       use LBA28 transfer;

I saw a Windows driver simply does

if (drive supports LBA48)
        use LBA48 transfer;
else if (drive supports LBA)
        use LBA28 transfer;
else
        use CHS transfer;

FYI.
-- 
ITOH Yasufumi


Home | Main Index | Thread Index | Old Index