aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_via.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/sata_via.c')
-rw-r--r--drivers/ata/sata_via.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
index 1c7f19aecc25..d3d5c0d57032 100644
--- a/drivers/ata/sata_via.c
+++ b/drivers/ata/sata_via.c
@@ -74,9 +74,11 @@ enum {
74static int svia_init_one (struct pci_dev *pdev, const struct pci_device_id *ent); 74static int svia_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
75static u32 svia_scr_read (struct ata_port *ap, unsigned int sc_reg); 75static u32 svia_scr_read (struct ata_port *ap, unsigned int sc_reg);
76static void svia_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); 76static void svia_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val);
77static void svia_noop_freeze(struct ata_port *ap);
77static void vt6420_error_handler(struct ata_port *ap); 78static void vt6420_error_handler(struct ata_port *ap);
78 79
79static const struct pci_device_id svia_pci_tbl[] = { 80static const struct pci_device_id svia_pci_tbl[] = {
81 { PCI_VDEVICE(VIA, 0x5337), vt6420 },
80 { PCI_VDEVICE(VIA, 0x0591), vt6420 }, 82 { PCI_VDEVICE(VIA, 0x0591), vt6420 },
81 { PCI_VDEVICE(VIA, 0x3149), vt6420 }, 83 { PCI_VDEVICE(VIA, 0x3149), vt6420 },
82 { PCI_VDEVICE(VIA, 0x3249), vt6421 }, 84 { PCI_VDEVICE(VIA, 0x3249), vt6421 },
@@ -127,7 +129,7 @@ static const struct ata_port_operations vt6420_sata_ops = {
127 .qc_issue = ata_qc_issue_prot, 129 .qc_issue = ata_qc_issue_prot,
128 .data_xfer = ata_pio_data_xfer, 130 .data_xfer = ata_pio_data_xfer,
129 131
130 .freeze = ata_bmdma_freeze, 132 .freeze = svia_noop_freeze,
131 .thaw = ata_bmdma_thaw, 133 .thaw = ata_bmdma_thaw,
132 .error_handler = vt6420_error_handler, 134 .error_handler = vt6420_error_handler,
133 .post_internal_cmd = ata_bmdma_post_internal_cmd, 135 .post_internal_cmd = ata_bmdma_post_internal_cmd,
@@ -203,6 +205,15 @@ static void svia_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val)
203 outl(val, ap->ioaddr.scr_addr + (4 * sc_reg)); 205 outl(val, ap->ioaddr.scr_addr + (4 * sc_reg));
204} 206}
205 207
208static void svia_noop_freeze(struct ata_port *ap)
209{
210 /* Some VIA controllers choke if ATA_NIEN is manipulated in
211 * certain way. Leave it alone and just clear pending IRQ.
212 */
213 ata_chk_status(ap);
214 ata_bmdma_irq_clear(ap);
215}
216
206/** 217/**
207 * vt6420_prereset - prereset for vt6420 218 * vt6420_prereset - prereset for vt6420
208 * @ap: target ATA port 219 * @ap: target ATA port