From: Andrey Borzenkov Date: Sat, 25 Mar 2006 11:07:07 +0000 (-0800) Subject: [PATCH] Fix EDD to properly ignore signature of non-existing drives X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=2c3ca07d2f691a463b715c83122c87f57c2a7b7c;p=deliverable%2Flinux.git [PATCH] Fix EDD to properly ignore signature of non-existing drives 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 Cc: Matt Domsch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/i386/boot/edd.S b/arch/i386/boot/edd.S index d8d69f2b911d..4b84ea216f2b 100644 --- a/arch/i386/boot/edd.S +++ b/arch/i386/boot/edd.S @@ -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