--- linux/kernel/blk_drv/scsi/seagate.h 2018/04/24 18:08:13 1.1 +++ linux/kernel/blk_drv/scsi/seagate.h 2018/04/24 18:13:29 1.1.1.2 @@ -13,7 +13,11 @@ */ #ifndef ASM int seagate_st0x_detect(int); -int seagate_st0x_command(unsigned char target, const void *cmnd, void *buff, int bufflen); +int seagate_st0x_command(unsigned char target, const void *cmnd, void *buff, + int bufflen); +int seagate_st0x_queue_command(unsigned char target, const void *cmnd, + void *buff, int bufflen, void (*done)(int, int)); + int seagate_st0x_abort(int); char *seagate_st0x_info(void); int seagate_st0x_reset(void); @@ -24,8 +28,8 @@ int seagate_st0x_reset(void); #define SEAGATE_ST0X {"Seagate ST-01/ST-02", seagate_st0x_detect, \ seagate_st0x_info, seagate_st0x_command, \ - NULL, seagate_st0x_abort, seagate_st0x_reset, \ - 0, 7, 0} + seagate_st0x_queue_command, seagate_st0x_abort, \ + seagate_st0x_reset, 1, 7, 0} #endif @@ -111,13 +115,17 @@ extern volatile int seagate_st0x_timeout #define PHASE_ETC (PHASE_DATAIN | PHASE_DATA_OUT | PHASE_CMDOUT | PHASE_MSGIN | PHASE_MSGOUT | PHASE_STATUSIN) #define PRINT_COMMAND 0x200 #define PHASE_EXIT 0x400 +#define PHASE_RESELECT 0x800 /* - Control options - these are timeouts specified in .01 seconds. -*/ + * Control options - these are timeouts specified in .01 seconds. + */ #define ST0X_BUS_FREE_DELAY 25 -#define ST0X_SELECTION_DELAY 25 +#define ST0X_SELECTION_DELAY 3 + +#define eoi() __asm__("push %%eax\nmovb $0x20, %%al\noutb %%al, $0x20\npop %%eax"::) + #endif