From: Geert Uytterhoeven <geert@linux-m68k.org>
Apparently some IDE drives (e.g. a pile of 80 GB ST380020ACE drives I have
access to) advertise to support LBA48, but don't, causing kernels that support
LBA48 (i.e. anything newer than 2.4.18, including 2.4.25 and 2.6.4) to fail on
them. Older kernels (including 2.2.20 on the Debian woody CDs) work fine.
Check for id->lba_capacity_2 being non-zero in idedisk_supports_lba48().
*/
static inline int idedisk_supports_lba48(const struct hd_driveid *id)
{
- return (id->command_set_2 & 0x0400) && (id->cfs_enable_2 & 0x0400);
+ return (id->command_set_2 & 0x0400) && (id->cfs_enable_2 & 0x0400)
+ && id->lba_capacity_2;
}
static inline void idedisk_check_hpa(ide_drive_t *drive)