Commit b095518e authored by Jeff Garzik's avatar Jeff Garzik

[libata] ATA passthru (arbitrary ATA command execution)

Authors:
Brett Russ <russb@emc.com>
John W. Linville <linville@tuxdriver.com>
Andy Warner <andyw@pobox.com>
parent 88d7bd8c
This diff is collapsed.
...@@ -44,10 +44,11 @@ extern void ata_dev_select(struct ata_port *ap, unsigned int device, ...@@ -44,10 +44,11 @@ extern void ata_dev_select(struct ata_port *ap, unsigned int device,
unsigned int wait, unsigned int can_sleep); unsigned int wait, unsigned int can_sleep);
extern void ata_tf_to_host_nolock(struct ata_port *ap, struct ata_taskfile *tf); extern void ata_tf_to_host_nolock(struct ata_port *ap, struct ata_taskfile *tf);
extern void swap_buf_le16(u16 *buf, unsigned int buf_words); extern void swap_buf_le16(u16 *buf, unsigned int buf_words);
extern int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg);
extern int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg);
/* libata-scsi.c */ /* libata-scsi.c */
extern void ata_to_sense_error(struct ata_queued_cmd *qc, u8 drv_stat);
extern int ata_scsi_error(struct Scsi_Host *host); extern int ata_scsi_error(struct Scsi_Host *host);
extern unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf, extern unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf,
unsigned int buflen); unsigned int buflen);
......
...@@ -113,6 +113,9 @@ extern const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE]; ...@@ -113,6 +113,9 @@ extern const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE];
/* values for service action in */ /* values for service action in */
#define SAI_READ_CAPACITY_16 0x10 #define SAI_READ_CAPACITY_16 0x10
/* Values for T10/04-262r7 */
#define ATA_16 0x85 /* 16-byte pass-thru */
#define ATA_12 0xa1 /* 12-byte pass-thru */
/* /*
* SCSI Architecture Model (SAM) Status codes. Taken from SAM-3 draft * SCSI Architecture Model (SAM) Status codes. Taken from SAM-3 draft
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment