diff options
| -rw-r--r-- | drivers/scsi/libata-core.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 6c66877be2bf..bbd6665eb212 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
| @@ -1131,6 +1131,29 @@ unsigned ata_exec_internal(struct ata_device *dev, | |||
| 1131 | return err_mask; | 1131 | return err_mask; |
| 1132 | } | 1132 | } |
| 1133 | 1133 | ||
| 1134 | /* | ||
| 1135 | * Execute a 'simple' command, that only consists of the opcode 'cmd' itself, | ||
| 1136 | * without filling any other registers | ||
| 1137 | */ | ||
| 1138 | static int ata_do_simple_cmd(struct ata_device *dev, u8 cmd) | ||
| 1139 | { | ||
| 1140 | struct ata_taskfile tf; | ||
| 1141 | int err; | ||
| 1142 | |||
| 1143 | ata_tf_init(dev, &tf); | ||
| 1144 | |||
| 1145 | tf.command = cmd; | ||
| 1146 | tf.flags |= ATA_TFLAG_DEVICE; | ||
| 1147 | tf.protocol = ATA_PROT_NODATA; | ||
| 1148 | |||
| 1149 | err = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0); | ||
| 1150 | if (err) | ||
| 1151 | ata_dev_printk(dev, KERN_ERR, "%s: ata command failed: %d\n", | ||
| 1152 | __FUNCTION__, err); | ||
| 1153 | |||
| 1154 | return err; | ||
| 1155 | } | ||
| 1156 | |||
| 1134 | /** | 1157 | /** |
| 1135 | * ata_pio_need_iordy - check if iordy needed | 1158 | * ata_pio_need_iordy - check if iordy needed |
| 1136 | * @adev: ATA device | 1159 | * @adev: ATA device |
| @@ -4946,29 +4969,6 @@ int ata_port_offline(struct ata_port *ap) | |||
| 4946 | return 0; | 4969 | return 0; |
| 4947 | } | 4970 | } |
| 4948 | 4971 | ||
| 4949 | /* | ||
| 4950 | * Execute a 'simple' command, that only consists of the opcode 'cmd' itself, | ||
| 4951 | * without filling any other registers | ||
| 4952 | */ | ||
| 4953 | static int ata_do_simple_cmd(struct ata_device *dev, u8 cmd) | ||
| 4954 | { | ||
| 4955 | struct ata_taskfile tf; | ||
| 4956 | int err; | ||
| 4957 | |||
| 4958 | ata_tf_init(dev, &tf); | ||
| 4959 | |||
| 4960 | tf.command = cmd; | ||
| 4961 | tf.flags |= ATA_TFLAG_DEVICE; | ||
| 4962 | tf.protocol = ATA_PROT_NODATA; | ||
| 4963 | |||
| 4964 | err = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0); | ||
| 4965 | if (err) | ||
| 4966 | ata_dev_printk(dev, KERN_ERR, "%s: ata command failed: %d\n", | ||
| 4967 | __FUNCTION__, err); | ||
| 4968 | |||
| 4969 | return err; | ||
| 4970 | } | ||
| 4971 | |||
| 4972 | static int ata_flush_cache(struct ata_device *dev) | 4972 | static int ata_flush_cache(struct ata_device *dev) |
| 4973 | { | 4973 | { |
| 4974 | u8 cmd; | 4974 | u8 cmd; |
