aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/ahci.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2008-04-07 09:47:21 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-04-17 15:44:24 -0400
commit520d06f92b32d7abe5127d7cc46a819db0f384e6 (patch)
treefd4f9ce7fdfa4296a1e71457906500736ca27fa0 /drivers/ata/ahci.c
parent4c9bf4e799ce06a7378f1196587084802a414c03 (diff)
libata: remove check_status from non-SFF drivers
Now that all SFF stuff is separated out of core layer, core layer doesn't call ops->[alt_]check_status(). In fact, no one calls them for non-SFF drivers anymore. Kill them. Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/ata/ahci.c')
-rw-r--r--drivers/ata/ahci.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index ad5b6f384ba1..9642a7103cb6 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -247,7 +247,6 @@ static bool ahci_qc_fill_rtf(struct ata_queued_cmd *qc);
247static int ahci_port_start(struct ata_port *ap); 247static int ahci_port_start(struct ata_port *ap);
248static void ahci_port_stop(struct ata_port *ap); 248static void ahci_port_stop(struct ata_port *ap);
249static void ahci_qc_prep(struct ata_queued_cmd *qc); 249static void ahci_qc_prep(struct ata_queued_cmd *qc);
250static u8 ahci_check_status(struct ata_port *ap);
251static void ahci_freeze(struct ata_port *ap); 250static void ahci_freeze(struct ata_port *ap);
252static void ahci_thaw(struct ata_port *ap); 251static void ahci_thaw(struct ata_port *ap);
253static void ahci_pmp_attach(struct ata_port *ap); 252static void ahci_pmp_attach(struct ata_port *ap);
@@ -292,9 +291,6 @@ static struct scsi_host_template ahci_sht = {
292static struct ata_port_operations ahci_ops = { 291static struct ata_port_operations ahci_ops = {
293 .inherits = &sata_pmp_port_ops, 292 .inherits = &sata_pmp_port_ops,
294 293
295 .sff_check_status = ahci_check_status,
296 .sff_check_altstatus = ahci_check_status,
297
298 .qc_defer = sata_pmp_qc_defer_cmd_switch, 294 .qc_defer = sata_pmp_qc_defer_cmd_switch,
299 .qc_prep = ahci_qc_prep, 295 .qc_prep = ahci_qc_prep,
300 .qc_issue = ahci_qc_issue, 296 .qc_issue = ahci_qc_issue,
@@ -1185,11 +1181,12 @@ static int ahci_kick_engine(struct ata_port *ap, int force_restart)
1185{ 1181{
1186 void __iomem *port_mmio = ap->ioaddr.cmd_addr; 1182 void __iomem *port_mmio = ap->ioaddr.cmd_addr;
1187 struct ahci_host_priv *hpriv = ap->host->private_data; 1183 struct ahci_host_priv *hpriv = ap->host->private_data;
1184 u8 status = readl(port_mmio + PORT_TFDATA) & 0xFF;
1188 u32 tmp; 1185 u32 tmp;
1189 int busy, rc; 1186 int busy, rc;
1190 1187
1191 /* do we need to kick the port? */ 1188 /* do we need to kick the port? */
1192 busy = ahci_check_status(ap) & (ATA_BUSY | ATA_DRQ); 1189 busy = status & (ATA_BUSY | ATA_DRQ);
1193 if (!busy && !force_restart) 1190 if (!busy && !force_restart)
1194 return 0; 1191 return 0;
1195 1192
@@ -1466,13 +1463,6 @@ static int ahci_pmp_softreset(struct ata_link *link, unsigned int *class,
1466 return ahci_do_softreset(link, class, link->pmp, deadline); 1463 return ahci_do_softreset(link, class, link->pmp, deadline);
1467} 1464}
1468 1465
1469static u8 ahci_check_status(struct ata_port *ap)
1470{
1471 void __iomem *mmio = ap->ioaddr.cmd_addr;
1472
1473 return readl(mmio + PORT_TFDATA) & 0xFF;
1474}
1475
1476static unsigned int ahci_fill_sg(struct ata_queued_cmd *qc, void *cmd_tbl) 1466static unsigned int ahci_fill_sg(struct ata_queued_cmd *qc, void *cmd_tbl)
1477{ 1467{
1478 struct scatterlist *sg; 1468 struct scatterlist *sg;