Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 335806
b: refs/heads/master
c: b03e66a
h: refs/heads/master
v: v3
  • Loading branch information
David Milburn authored and Jeff Garzik committed Nov 16, 2012
1 parent daee29c commit 2cb1fc4
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cd705d5ad49bb8894dda2726dcaef8f63ddeba43
refs/heads/master: b03e66a6be91f8389fcd902ab6c1563db1c9c06b
35 changes: 35 additions & 0 deletions trunk/drivers/ata/sata_svw.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,39 @@ static int k2_sata_scr_write(struct ata_link *link,
return 0;
}

static int k2_sata_softreset(struct ata_link *link,
unsigned int *class, unsigned long deadline)
{
u8 dmactl;
void __iomem *mmio = link->ap->ioaddr.bmdma_addr;

dmactl = readb(mmio + ATA_DMA_CMD);

/* Clear the start bit */
if (dmactl & ATA_DMA_START) {
dmactl &= ~ATA_DMA_START;
writeb(dmactl, mmio + ATA_DMA_CMD);
}

return ata_sff_softreset(link, class, deadline);
}

static int k2_sata_hardreset(struct ata_link *link,
unsigned int *class, unsigned long deadline)
{
u8 dmactl;
void __iomem *mmio = link->ap->ioaddr.bmdma_addr;

dmactl = readb(mmio + ATA_DMA_CMD);

/* Clear the start bit */
if (dmactl & ATA_DMA_START) {
dmactl &= ~ATA_DMA_START;
writeb(dmactl, mmio + ATA_DMA_CMD);
}

return sata_sff_hardreset(link, class, deadline);
}

static void k2_sata_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
{
Expand Down Expand Up @@ -346,6 +379,8 @@ static struct scsi_host_template k2_sata_sht = {

static struct ata_port_operations k2_sata_ops = {
.inherits = &ata_bmdma_port_ops,
.softreset = k2_sata_softreset,
.hardreset = k2_sata_hardreset,
.sff_tf_load = k2_sata_tf_load,
.sff_tf_read = k2_sata_tf_read,
.sff_check_status = k2_stat_check_status,
Expand Down

0 comments on commit 2cb1fc4

Please sign in to comment.