aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libata.h')
-rw-r--r--drivers/scsi/libata.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h
index d608b3a0f6fe..10ecd9e15e4f 100644
--- a/drivers/scsi/libata.h
+++ b/drivers/scsi/libata.h
@@ -39,19 +39,25 @@ struct ata_scsi_args {
39 39
40/* libata-core.c */ 40/* libata-core.c */
41extern int atapi_enabled; 41extern int atapi_enabled;
42extern int ata_qc_complete_noop(struct ata_queued_cmd *qc, unsigned int err_mask);
42extern struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap, 43extern struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap,
43 struct ata_device *dev); 44 struct ata_device *dev);
45extern void ata_rwcmd_protocol(struct ata_queued_cmd *qc);
44extern void ata_qc_free(struct ata_queued_cmd *qc); 46extern void ata_qc_free(struct ata_queued_cmd *qc);
45extern int ata_qc_issue(struct ata_queued_cmd *qc); 47extern int ata_qc_issue(struct ata_queued_cmd *qc);
46extern int ata_check_atapi_dma(struct ata_queued_cmd *qc); 48extern int ata_check_atapi_dma(struct ata_queued_cmd *qc);
47extern void ata_dev_select(struct ata_port *ap, unsigned int device, 49extern 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);
49extern void ata_tf_to_host_nolock(struct ata_port *ap, struct ata_taskfile *tf); 51extern void ata_tf_to_host_nolock(struct ata_port *ap, const struct ata_taskfile *tf);
50extern void swap_buf_le16(u16 *buf, unsigned int buf_words); 52extern void swap_buf_le16(u16 *buf, unsigned int buf_words);
53extern int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg);
54extern int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg);
51 55
52 56
53/* libata-scsi.c */ 57/* libata-scsi.c */
54extern void ata_to_sense_error(struct ata_queued_cmd *qc, u8 drv_stat); 58extern void atapi_request_sense(struct ata_port *ap, struct ata_device *dev,
59 struct scsi_cmnd *cmd);
60extern void ata_scsi_scan_host(struct ata_port *ap);
55extern int ata_scsi_error(struct Scsi_Host *host); 61extern int ata_scsi_error(struct Scsi_Host *host);
56extern unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf, 62extern unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf,
57 unsigned int buflen); 63 unsigned int buflen);
@@ -76,18 +82,10 @@ extern unsigned int ata_scsiop_report_luns(struct ata_scsi_args *args, u8 *rbuf,
76extern void ata_scsi_badcmd(struct scsi_cmnd *cmd, 82extern void ata_scsi_badcmd(struct scsi_cmnd *cmd,
77 void (*done)(struct scsi_cmnd *), 83 void (*done)(struct scsi_cmnd *),
78 u8 asc, u8 ascq); 84 u8 asc, u8 ascq);
85extern void ata_scsi_set_sense(struct scsi_cmnd *cmd,
86 u8 sk, u8 asc, u8 ascq);
79extern void ata_scsi_rbuf_fill(struct ata_scsi_args *args, 87extern void ata_scsi_rbuf_fill(struct ata_scsi_args *args,
80 unsigned int (*actor) (struct ata_scsi_args *args, 88 unsigned int (*actor) (struct ata_scsi_args *args,
81 u8 *rbuf, unsigned int buflen)); 89 u8 *rbuf, unsigned int buflen));
82 90
83static 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
88static 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__ */ 91#endif /* __LIBATA_H__ */