diff options
Diffstat (limited to 'drivers/scsi/libata.h')
-rw-r--r-- | drivers/scsi/libata.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h index d608b3a0f6fe..3d60190584ba 100644 --- a/drivers/scsi/libata.h +++ b/drivers/scsi/libata.h | |||
@@ -39,18 +39,23 @@ struct ata_scsi_args { | |||
39 | 39 | ||
40 | /* libata-core.c */ | 40 | /* libata-core.c */ |
41 | extern int atapi_enabled; | 41 | extern int atapi_enabled; |
42 | extern int ata_qc_complete_noop(struct ata_queued_cmd *qc, u8 drv_stat); | ||
42 | extern struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap, | 43 | extern struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap, |
43 | struct ata_device *dev); | 44 | struct ata_device *dev); |
45 | extern void ata_rwcmd_protocol(struct ata_queued_cmd *qc); | ||
44 | extern void ata_qc_free(struct ata_queued_cmd *qc); | 46 | extern void ata_qc_free(struct ata_queued_cmd *qc); |
45 | extern int ata_qc_issue(struct ata_queued_cmd *qc); | 47 | extern int ata_qc_issue(struct ata_queued_cmd *qc); |
46 | extern int ata_check_atapi_dma(struct ata_queued_cmd *qc); | 48 | extern int ata_check_atapi_dma(struct ata_queued_cmd *qc); |
47 | extern void ata_dev_select(struct ata_port *ap, unsigned int device, | 49 | extern void ata_dev_select(struct ata_port *ap, unsigned int device, |
48 | unsigned int wait, unsigned int can_sleep); | 50 | unsigned int wait, unsigned int can_sleep); |
49 | extern void ata_tf_to_host_nolock(struct ata_port *ap, struct ata_taskfile *tf); | 51 | extern void ata_tf_to_host_nolock(struct ata_port *ap, const struct ata_taskfile *tf); |
50 | extern void swap_buf_le16(u16 *buf, unsigned int buf_words); | 52 | extern void swap_buf_le16(u16 *buf, unsigned int buf_words); |
51 | 53 | ||
52 | 54 | ||
53 | /* libata-scsi.c */ | 55 | /* libata-scsi.c */ |
56 | extern void atapi_request_sense(struct ata_port *ap, struct ata_device *dev, | ||
57 | struct scsi_cmnd *cmd); | ||
58 | extern void ata_scsi_scan_host(struct ata_port *ap); | ||
54 | extern void ata_to_sense_error(struct ata_queued_cmd *qc, u8 drv_stat); | 59 | extern void ata_to_sense_error(struct ata_queued_cmd *qc, u8 drv_stat); |
55 | extern int ata_scsi_error(struct Scsi_Host *host); | 60 | extern int ata_scsi_error(struct Scsi_Host *host); |
56 | extern unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf, | 61 | extern unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf, |
@@ -76,18 +81,10 @@ extern unsigned int ata_scsiop_report_luns(struct ata_scsi_args *args, u8 *rbuf, | |||
76 | extern void ata_scsi_badcmd(struct scsi_cmnd *cmd, | 81 | extern void ata_scsi_badcmd(struct scsi_cmnd *cmd, |
77 | void (*done)(struct scsi_cmnd *), | 82 | void (*done)(struct scsi_cmnd *), |
78 | u8 asc, u8 ascq); | 83 | u8 asc, u8 ascq); |
84 | extern void ata_scsi_set_sense(struct scsi_cmnd *cmd, | ||
85 | u8 sk, u8 asc, u8 ascq); | ||
79 | extern void ata_scsi_rbuf_fill(struct ata_scsi_args *args, | 86 | extern void ata_scsi_rbuf_fill(struct ata_scsi_args *args, |
80 | unsigned int (*actor) (struct ata_scsi_args *args, | 87 | unsigned int (*actor) (struct ata_scsi_args *args, |
81 | u8 *rbuf, unsigned int buflen)); | 88 | u8 *rbuf, unsigned int buflen)); |
82 | 89 | ||
83 | static inline void ata_bad_scsiop(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) | ||
84 | { | ||
85 | ata_scsi_badcmd(cmd, done, 0x20, 0x00); | ||
86 | } | ||
87 | |||
88 | static inline void ata_bad_cdb(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) | ||
89 | { | ||
90 | ata_scsi_badcmd(cmd, done, 0x24, 0x00); | ||
91 | } | ||
92 | |||
93 | #endif /* __LIBATA_H__ */ | 90 | #endif /* __LIBATA_H__ */ |