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.h31
1 files changed, 27 insertions, 4 deletions
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h
index bac8cbae06fe..bdd488897096 100644
--- a/drivers/scsi/libata.h
+++ b/drivers/scsi/libata.h
@@ -29,10 +29,9 @@
29#define __LIBATA_H__ 29#define __LIBATA_H__
30 30
31#define DRV_NAME "libata" 31#define DRV_NAME "libata"
32#define DRV_VERSION "1.20" /* must be exactly four chars */ 32#define DRV_VERSION "1.30" /* must be exactly four chars */
33 33
34struct ata_scsi_args { 34struct ata_scsi_args {
35 struct ata_port *ap;
36 struct ata_device *dev; 35 struct ata_device *dev;
37 u16 *id; 36 u16 *id;
38 struct scsi_cmnd *cmd; 37 struct scsi_cmnd *cmd;
@@ -40,18 +39,32 @@ struct ata_scsi_args {
40}; 39};
41 40
42/* libata-core.c */ 41/* libata-core.c */
42extern struct workqueue_struct *ata_aux_wq;
43extern int atapi_enabled; 43extern int atapi_enabled;
44extern int atapi_dmadir;
44extern int libata_fua; 45extern int libata_fua;
45extern struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap, 46extern struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev);
46 struct ata_device *dev);
47extern int ata_rwcmd_protocol(struct ata_queued_cmd *qc); 47extern int ata_rwcmd_protocol(struct ata_queued_cmd *qc);
48extern void ata_dev_disable(struct ata_device *dev);
48extern void ata_port_flush_task(struct ata_port *ap); 49extern void ata_port_flush_task(struct ata_port *ap);
50extern unsigned ata_exec_internal(struct ata_device *dev,
51 struct ata_taskfile *tf, const u8 *cdb,
52 int dma_dir, void *buf, unsigned int buflen);
53extern int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
54 int post_reset, u16 *id);
55extern int ata_dev_configure(struct ata_device *dev, int print_info);
56extern int sata_down_spd_limit(struct ata_port *ap);
57extern int sata_set_spd_needed(struct ata_port *ap);
58extern int ata_down_xfermask_limit(struct ata_device *dev, int force_pio0);
59extern int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev);
49extern void ata_qc_free(struct ata_queued_cmd *qc); 60extern void ata_qc_free(struct ata_queued_cmd *qc);
50extern void ata_qc_issue(struct ata_queued_cmd *qc); 61extern void ata_qc_issue(struct ata_queued_cmd *qc);
62extern void __ata_qc_complete(struct ata_queued_cmd *qc);
51extern int ata_check_atapi_dma(struct ata_queued_cmd *qc); 63extern int ata_check_atapi_dma(struct ata_queued_cmd *qc);
52extern void ata_dev_select(struct ata_port *ap, unsigned int device, 64extern void ata_dev_select(struct ata_port *ap, unsigned int device,
53 unsigned int wait, unsigned int can_sleep); 65 unsigned int wait, unsigned int can_sleep);
54extern void swap_buf_le16(u16 *buf, unsigned int buf_words); 66extern void swap_buf_le16(u16 *buf, unsigned int buf_words);
67extern void ata_dev_init(struct ata_device *dev);
55extern int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg); 68extern int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg);
56extern int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg); 69extern int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg);
57 70
@@ -60,6 +73,8 @@ extern int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg);
60extern struct scsi_transport_template ata_scsi_transport_template; 73extern struct scsi_transport_template ata_scsi_transport_template;
61 74
62extern void ata_scsi_scan_host(struct ata_port *ap); 75extern void ata_scsi_scan_host(struct ata_port *ap);
76extern int ata_scsi_offline_dev(struct ata_device *dev);
77extern void ata_scsi_hotplug(void *data);
63extern unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf, 78extern unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf,
64 unsigned int buflen); 79 unsigned int buflen);
65 80
@@ -88,5 +103,13 @@ extern void ata_scsi_set_sense(struct scsi_cmnd *cmd,
88extern void ata_scsi_rbuf_fill(struct ata_scsi_args *args, 103extern void ata_scsi_rbuf_fill(struct ata_scsi_args *args,
89 unsigned int (*actor) (struct ata_scsi_args *args, 104 unsigned int (*actor) (struct ata_scsi_args *args,
90 u8 *rbuf, unsigned int buflen)); 105 u8 *rbuf, unsigned int buflen));
106extern void ata_schedule_scsi_eh(struct Scsi_Host *shost);
107extern void ata_scsi_dev_rescan(void *data);
108
109/* libata-eh.c */
110extern enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd);
111extern void ata_scsi_error(struct Scsi_Host *host);
112extern void ata_port_wait_eh(struct ata_port *ap);
113extern void ata_qc_schedule_eh(struct ata_queued_cmd *qc);
91 114
92#endif /* __LIBATA_H__ */ 115#endif /* __LIBATA_H__ */