Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c1a6e2b082a7cefe58315af7a461bbf2f33221a3
Commit:     c1a6e2b082a7cefe58315af7a461bbf2f33221a3
Parent:     362cea339a34e04caae6cad67ea9bde5c100d12b
Author:     H. Peter Anvin <[EMAIL PROTECTED]>
AuthorDate: Mon Aug 13 16:27:42 2007 -0700
Committer:  H. Peter Anvin <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 17:54:47 2007 -0700

    [x86 setup] Don't use EDD to get the MBR signature
    
    At least one machine has been identified in the field which advertises
    EDD for all drives but locks up if one attempts an extended read from
    a non-primary drive.
    
    The MBR is always at CHS 0-0-1, so there is no reason to use an
    extended read, other than the possibility that the BIOS cannot handle
    it.
    
    Although this might break as many machines as it fixes (a small number
    either way), the current state is a regression but the reverse is not.
    Therefore revert to the previous state of not using extended read.
    
    Quite probably the Right Thing to do is to read using plain (CHS) read
    and extended read on failure, but that change would definitely have to
    go through -mm first.
    
    Signed-off-by: H. Peter Anvin <[EMAIL PROTECTED]>
---
 arch/i386/boot/edd.c |   30 +-----------------------------
 1 files changed, 1 insertions(+), 29 deletions(-)

diff --git a/arch/i386/boot/edd.c b/arch/i386/boot/edd.c
index 658834d..d65dd21 100644
--- a/arch/i386/boot/edd.c
+++ b/arch/i386/boot/edd.c
@@ -19,40 +19,12 @@
 
 #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
 
-struct edd_dapa {
-       u8      pkt_size;
-       u8      rsvd;
-       u16     sector_cnt;
-       u16     buf_off, buf_seg;
-       u64     lba;
-       u64     buf_lin_addr;
-};
-
 /*
  * Read the MBR (first sector) from a specific device.
  */
 static int read_mbr(u8 devno, void *buf)
 {
-       struct edd_dapa dapa;
-       u16 ax, bx, cx, dx, si;
-
-       memset(&dapa, 0, sizeof dapa);
-       dapa.pkt_size = sizeof(dapa);
-       dapa.sector_cnt = 1;
-       dapa.buf_off = (size_t)buf;
-       dapa.buf_seg = ds();
-       /* dapa.lba = 0; */
-
-       ax = 0x4200;            /* Extended Read */
-       si = (size_t)&dapa;
-       dx = devno;
-       asm("pushfl; stc; int $0x13; setc %%al; popfl"
-           : "+a" (ax), "+S" (si), "+d" (dx)
-           : "m" (dapa)
-           : "ebx", "ecx", "edi", "memory");
-
-       if (!(u8)ax)
-               return 0;       /* OK */
+       u16 ax, bx, cx, dx;
 
        ax = 0x0201;            /* Legacy Read, one sector */
        cx = 0x0001;            /* Sector 0-0-1 */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to