static void reset_controller(void) { int i; outb(4, HD_CMD); for (i = 0; i < 1000; i++) nop(); outb(0, HD_CMD); for (i = 0; i < 10000 && drive_busy(); i++); /* nothing */ if (drive_busy()) printk("HD-controller still busy\n\r"); if ((i = inb(HD_STATUS)) & ERR_STAT) printk("HD-controller reset failed: %02x\n\r"); }
static void reset_controller(void) { int i; outb(4,HD_CMD); for(i = 0; i < 1000; i++) nop(); outb(hd_info[0].ctl & 0x0f ,HD_CMD); if (drive_busy()) printk("HD-controller still busy\n\r"); if ((i = inb(HD_ERROR)) != 1) printk("HD-controller reset failed: %02x\n\r",i); }
static void reset_controller(void) { int i; outb_p(4,HD_CMD); for(i = 0; i < 1000; i++) barrier(); outb_p(hd_info[0].ctl & 0x0f,HD_CMD); for(i = 0; i < 1000; i++) barrier(); if (drive_busy()) printk("hd: controller still busy\n"); else if ((hd_error = inb(HD_ERROR)) != 1) printk("hd: controller reset failed: %02x\n",hd_error); }