--- shuttle_usbat.0 Wed Apr 18 13:17:24 2001 +++ shuttle_usbat.c Wed Apr 18 13:42:18 2001 @@ -344,12 +344,14 @@ if (result!=USB_STOR_TRANSPORT_GOOD) return result; - if (status&0x01) // check condition + if (status&0x01) { // check condition + result = usbat_read(us, USBAT_ATA, 0x10, &status) ; return USB_STOR_TRANSPORT_FAILED; + } if (status&0x20) // device fault return USB_STOR_TRANSPORT_FAILED; - if ((status&0x80)!=0x80) { // not busy + if ((status&0x80)==0x00) { // not busy US_DEBUGP("Waited not busy for %d steps\n", i); return USB_STOR_TRANSPORT_GOOD; } @@ -971,6 +973,9 @@ registers[i] = 0x10; data[i] = (i-7 >= srb->cmd_len) ? 0 : srb->cmnd[i-7]; } + + result = usbat_read(us, USBAT_ATA, 0x17, &status); + US_DEBUGP("Status = %02x\n", status) ; if (srb->cmnd[0] == TEST_UNIT_READY) transferred = 0;