bk://gkernel.bkbits.net/libata-2.6 jgarzik@pobox.com|ChangeSet|20050310181812|03167 jgarzik # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2005/03/10 13:18:12-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/libata-dev/ahci-tf-read # into pobox.com:/garz/repo/libata-2.6 # # drivers/scsi/ahci.c # 2005/03/10 13:18:09-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/03/10 00:44:26-05:00 russb@emc.com # [PATCH] AHCI: fix fatal error int handling # # I noticed that the AHCI CI (cmd issue) reg wasn't getting cleared # after error ints resulting in no further commands being successfully # issued to the port. This patch fixes. All that's really needed is # the 1's complement but I also removed the disabling/enabling of the # FIS_RX b/c this isn't spec'd as necessary when handling error ints. # # Signed-off-by: Brett Russ # Signed-off-by: Jeff Garzik # # drivers/scsi/ahci.c # 2005/03/09 15:30:06-05:00 russb@emc.com +2 -2 # AHCI: fix fatal error int handling # # ChangeSet # 2005/02/25 18:18:09-05:00 jgarzik@pobox.com # [libata ahci] support ->tf_read hook # # drivers/scsi/ahci.c # 2005/02/25 18:18:03-05:00 jgarzik@pobox.com +11 -0 # [libata ahci] support ->tf_read hook # diff -Nru a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c --- a/drivers/scsi/ahci.c 2005-03-11 13:07:27 -08:00 +++ b/drivers/scsi/ahci.c 2005-03-11 13:07:27 -08:00 @@ -177,6 +177,7 @@ static int ahci_port_start(struct ata_port *ap); static void ahci_port_stop(struct ata_port *ap); static void ahci_host_stop(struct ata_host_set *host_set); +static void ahci_tf_read(struct ata_port *ap, struct ata_taskfile *tf); static void ahci_qc_prep(struct ata_queued_cmd *qc); static u8 ahci_check_status(struct ata_port *ap); static u8 ahci_check_err(struct ata_port *ap); @@ -210,6 +211,8 @@ .check_err = ahci_check_err, .dev_select = ata_noop_dev_select, + .tf_read = ahci_tf_read, + .phy_reset = ahci_phy_reset, .qc_prep = ahci_qc_prep, @@ -463,6 +466,14 @@ return (readl(mmio + PORT_TFDATA) >> 8) & 0xFF; } +static void ahci_tf_read(struct ata_port *ap, struct ata_taskfile *tf) +{ + struct ahci_port_priv *pp = ap->private_data; + u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG; + + ata_tf_from_fis(d2h_fis, tf); +} + static void ahci_fill_sg(struct ata_queued_cmd *qc) { struct ahci_port_priv *pp = qc->ap->private_data; @@ -539,7 +550,7 @@ /* stop DMA */ tmp = readl(port_mmio + PORT_CMD); - tmp &= PORT_CMD_START | PORT_CMD_FIS_RX; + tmp &= ~PORT_CMD_START; writel(tmp, port_mmio + PORT_CMD); /* wait for engine to stop. TODO: this could be @@ -571,7 +582,7 @@ /* re-start DMA */ tmp = readl(port_mmio + PORT_CMD); - tmp |= PORT_CMD_START | PORT_CMD_FIS_RX; + tmp |= PORT_CMD_START; writel(tmp, port_mmio + PORT_CMD); readl(port_mmio + PORT_CMD); /* flush */