X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=include%2Fscsi%2Fscsi_device.h;h=3f566af3f1017e55338f7754f2b70387e3d126f7;hb=7eef4091a653c243a87e5375c54504cc03bec4d8;hp=a37a8148a31033970c3d5cd52905f324a140c41a;hpb=f0c0a376d0fcd4c5579ecf5e95f88387cba85211;p=safe%2Fjmp%2Flinux-2.6 diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index a37a814..3f566af 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -159,8 +159,6 @@ struct scsi_device { atomic_t iodone_cnt; atomic_t ioerr_cnt; - int timeout; - struct device sdev_gendev, sdev_dev; @@ -342,6 +340,7 @@ extern int scsi_mode_select(struct scsi_device *sdev, int pf, int sp, struct scsi_sense_hdr *); extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout, int retries, struct scsi_sense_hdr *sshdr); +extern unsigned char *scsi_get_vpd_page(struct scsi_device *, u8 page); extern int scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state); extern struct scsi_event *sdev_evt_alloc(enum scsi_device_event evt_type, @@ -367,16 +366,11 @@ extern int scsi_is_target_device(const struct device *); extern int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, int data_direction, void *buffer, unsigned bufflen, unsigned char *sense, int timeout, int retries, - int flag); + int flag, int *resid); extern int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd, int data_direction, void *buffer, unsigned bufflen, - struct scsi_sense_hdr *, int timeout, int retries); -extern int scsi_execute_async(struct scsi_device *sdev, - const unsigned char *cmd, int cmd_len, int data_direction, - void *buffer, unsigned bufflen, int use_sg, - int timeout, int retries, void *privdata, - void (*done)(void *, char *, int, int), - gfp_t gfp); + struct scsi_sense_hdr *, int timeout, int retries, + int *resid); static inline int __must_check scsi_device_reprobe(struct scsi_device *sdev) { @@ -401,7 +395,8 @@ static inline unsigned int sdev_id(struct scsi_device *sdev) */ static inline int scsi_device_online(struct scsi_device *sdev) { - return sdev->sdev_state != SDEV_OFFLINE; + return (sdev->sdev_state != SDEV_OFFLINE && + sdev->sdev_state != SDEV_DEL); } static inline int scsi_device_blocked(struct scsi_device *sdev) {