generate package for the new IXP4xx crpyto driver
[10.03/openwrt.git] / target / linux / ixp4xx / patches / 998-VT6421.patch
1 I think that I've found and fixed the problem. There is a copy/paste bug in  
2 vt6421_set_dma_mode() function which causes wrong values to be written to  
3 PATA_UDMA_TIMING register.  
4  
5  
6 This patch fixes a copy/paste bug that breaks DMA modes on VT6421 PATA port.  
7  
8 Signed-off-by: Ondrej Zary <linux@rain...>  
9 Index: linux-2.6.21.7/drivers/ata/sata_via.c
10 ===================================================================
11 --- linux-2.6.21.7.orig/drivers/ata/sata_via.c
12 +++ linux-2.6.21.7/drivers/ata/sata_via.c
13 @@ -380,7 +380,7 @@ static void vt6421_set_dma_mode(struct a
14  {
15         struct pci_dev *pdev = to_pci_dev(ap->host->dev);
16         static const u8 udma_bits[] = { 0xEE, 0xE8, 0xE6, 0xE4, 0xE2, 0xE1, 0xE0, 0xE0 };
17 -       pci_write_config_byte(pdev, PATA_UDMA_TIMING, udma_bits[adev->pio_mode - XFER_UDMA_0]);
18 +       pci_write_config_byte(pdev, PATA_UDMA_TIMING, udma_bits[adev->dma_mode - XFER_UDMA_0]);
19  }
20  
21  static int vt6421_port_start(struct ata_port *ap)