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

Commit 2c3ca07d authored by Andrey Borzenkov's avatar Andrey Borzenkov Committed by Linus Torvalds
Browse files

[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: default avatarAndrey Borzenkov <arvidjaar@mail.ru>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9871728b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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