From: Alan Cox Date: Mon, 27 Jun 2005 22:24:22 +0000 (-0700) Subject: [PATCH] ide: fix ide-disk inability to handle LBA only devices. X-Git-Tag: Ubuntu-5.13.0-19.19~65070^2~91 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=6efd936046b123303ace4330fd2f26195ad7b1c4;p=mirror_ubuntu-jammy-kernel.git [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: Alan Cox Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index d6f934886b04..f9c1acb4ed6a 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c @@ -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.