summaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-disk.c
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2005-06-27 15:24:22 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-27 17:36:39 -0700
commit6efd936046b123303ace4330fd2f26195ad7b1c4 (patch)
treee307a02fc4e7477833453e4aa1efedf9378ee6f6 /drivers/ide/ide-disk.c
parentc7b645f934e52a54af58142d91fb51f881f8ce26 (diff)
downloadop-kernel-dev-6efd936046b123303ace4330fd2f26195ad7b1c4.zip
op-kernel-dev-6efd936046b123303ace4330fd2f26195ad7b1c4.tar.gz
[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 <alan@redhat.com> Acked-by: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/ide/ide-disk.c')
-rw-r--r--drivers/ide/ide-disk.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index d6f9348..f9c1acb4 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.
OpenPOWER on IntegriCloud