[PATCH] Fix EDD to properly ignore signature of non-existing drives
authorAndrey Borzenkov <arvidjaar@mail.ru>
Sat, 25 Mar 2006 11:07:07 +0000 (03:07 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 25 Mar 2006 16:22:52 +0000 (08:22 -0800)
Some BIOSes do not always set CF on error before return from int13.  The
patch adds additional check for status being zero (AH == 0).

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/boot/edd.S

index d8d69f2b911d62c909b651de0d9e61a7c7b3b461..4b84ea216f2b81ede738e80206a5fafd8e5ef994 100644 (file)
@@ -76,6 +76,8 @@ edd_mbr_sig_read:
        popw    %es
        popw    %bx
        jc      edd_mbr_sig_done                # on failure, we're done.
+       cmpb    $0, %ah         # some BIOSes do not set CF
+       jne     edd_mbr_sig_done                # on failure, we're done.
        movl    (EDDBUF+EDD_MBR_SIG_OFFSET), %eax # read sig out of the MBR
        movl    %eax, (%bx)                     # store success
        incb    (EDD_MBR_SIG_NR_BUF)            # note that we stored something