Merge ../linux-2.6-watchdog-mm
[pandora-kernel.git] / drivers / ata / sata_via.c
index 1c7f19a..d3d5c0d 100644 (file)
@@ -74,9 +74,11 @@ enum {
 static int svia_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
 static u32 svia_scr_read (struct ata_port *ap, unsigned int sc_reg);
 static void svia_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val);
+static void svia_noop_freeze(struct ata_port *ap);
 static void vt6420_error_handler(struct ata_port *ap);
 
 static const struct pci_device_id svia_pci_tbl[] = {
+       { PCI_VDEVICE(VIA, 0x5337), vt6420 },
        { PCI_VDEVICE(VIA, 0x0591), vt6420 },
        { PCI_VDEVICE(VIA, 0x3149), vt6420 },
        { PCI_VDEVICE(VIA, 0x3249), vt6421 },
@@ -127,7 +129,7 @@ static const struct ata_port_operations vt6420_sata_ops = {
        .qc_issue               = ata_qc_issue_prot,
        .data_xfer              = ata_pio_data_xfer,
 
-       .freeze                 = ata_bmdma_freeze,
+       .freeze                 = svia_noop_freeze,
        .thaw                   = ata_bmdma_thaw,
        .error_handler          = vt6420_error_handler,
        .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)
        outl(val, ap->ioaddr.scr_addr + (4 * sc_reg));
 }
 
+static void svia_noop_freeze(struct ata_port *ap)
+{
+       /* Some VIA controllers choke if ATA_NIEN is manipulated in
+        * certain way.  Leave it alone and just clear pending IRQ.
+        */
+       ata_chk_status(ap);
+       ata_bmdma_irq_clear(ap);
+}
+
 /**
  *     vt6420_prereset - prereset for vt6420
  *     @ap: target ATA port