Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6efd9360 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds
Browse files

[PATCH] ide: fix ide-disk inability to handle LBA only devices.



Years old bug, has to be fixed for it8212 to work

Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Acked-by: default avatarBartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c7b645f9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -119,6 +119,10 @@ static int lba_capacity_is_ok (struct hd_driveid *id)
{
	unsigned long lba_sects, chs_sects, head, tail;

	/* No non-LBA info .. so valid! */
	if (id->cyls == 0)
		return 1;

	/*
	 * The ATA spec tells large drives to return
	 * C/H/S = 16383/16/63 independent of their size.