Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
pata_pdc202xx_old: fix data corruption and other problems
pata_legacy: fix io/irq mismatch
ahci: RAID mode SATA patch for Intel ICH9M

+16 -9
+1
drivers/ata/ahci.c
··· 389 389 { PCI_VDEVICE(INTEL, 0x2929), board_ahci_pi }, /* ICH9M */ 390 390 { PCI_VDEVICE(INTEL, 0x292a), board_ahci_pi }, /* ICH9M */ 391 391 { PCI_VDEVICE(INTEL, 0x292b), board_ahci_pi }, /* ICH9M */ 392 + { PCI_VDEVICE(INTEL, 0x292c), board_ahci_pi }, /* ICH9M */ 392 393 { PCI_VDEVICE(INTEL, 0x292f), board_ahci_pi }, /* ICH9M */ 393 394 { PCI_VDEVICE(INTEL, 0x294d), board_ahci_pi }, /* ICH9 */ 394 395 { PCI_VDEVICE(INTEL, 0x294e), board_ahci_pi }, /* ICH9M */
+1 -1
drivers/ata/pata_legacy.c
··· 69 69 #define NR_HOST 6 70 70 71 71 static int legacy_port[NR_HOST] = { 0x1f0, 0x170, 0x1e8, 0x168, 0x1e0, 0x160 }; 72 - static int legacy_irq[NR_HOST] = { 15, 14, 11, 10, 8, 12 }; 72 + static int legacy_irq[NR_HOST] = { 14, 15, 11, 10, 8, 12 }; 73 73 74 74 struct legacy_data { 75 75 unsigned long timing;
+14 -8
drivers/ata/pata_pdc202xx_old.c
··· 2 2 * pata_pdc202xx_old.c - Promise PDC202xx PATA for new ATA layer 3 3 * (C) 2005 Red Hat Inc 4 4 * Alan Cox <alan@redhat.com> 5 + * (C) 2007 Bartlomiej Zolnierkiewicz 5 6 * 6 7 * Based in part on linux/drivers/ide/pci/pdc202xx_old.c 7 8 * 8 9 * First cut with LBA48/ATAPI 9 10 * 10 11 * TODO: 11 - * Channel interlock/reset on both required ? 12 + * Channel interlock/reset on both required 12 13 */ 13 14 14 15 #include <linux/kernel.h> ··· 22 21 #include <linux/libata.h> 23 22 24 23 #define DRV_NAME "pata_pdc202xx_old" 25 - #define DRV_VERSION "0.3.0" 24 + #define DRV_VERSION "0.4.0" 26 25 27 26 /** 28 27 * pdc2024x_pre_reset - probe begin ··· 77 76 static void pdc202xx_configure_piomode(struct ata_port *ap, struct ata_device *adev, int pio) 78 77 { 79 78 struct pci_dev *pdev = to_pci_dev(ap->host->dev); 80 - int port = 0x60 + 4 * ap->port_no + 2 * adev->devno; 79 + int port = 0x60 + 8 * ap->port_no + 4 * adev->devno; 81 80 static u16 pio_timing[5] = { 82 81 0x0913, 0x050C , 0x0308, 0x0206, 0x0104 83 82 }; ··· 86 85 pci_read_config_byte(pdev, port, &r_ap); 87 86 pci_read_config_byte(pdev, port + 1, &r_bp); 88 87 r_ap &= ~0x3F; /* Preserve ERRDY_EN, SYNC_IN */ 89 - r_bp &= ~0x07; 88 + r_bp &= ~0x1F; 90 89 r_ap |= (pio_timing[pio] >> 8); 91 90 r_bp |= (pio_timing[pio] & 0xFF); 92 91 ··· 124 123 static void pdc202xx_set_dmamode(struct ata_port *ap, struct ata_device *adev) 125 124 { 126 125 struct pci_dev *pdev = to_pci_dev(ap->host->dev); 127 - int port = 0x60 + 4 * ap->port_no + 2 * adev->devno; 126 + int port = 0x60 + 8 * ap->port_no + 4 * adev->devno; 128 127 static u8 udma_timing[6][2] = { 129 128 { 0x60, 0x03 }, /* 33 Mhz Clock */ 130 129 { 0x40, 0x02 }, ··· 133 132 { 0x20, 0x01 }, 134 133 { 0x20, 0x01 } 135 134 }; 135 + static u8 mdma_timing[3][2] = { 136 + { 0x60, 0x03 }, 137 + { 0x60, 0x04 }, 138 + { 0xe0, 0x0f }, 139 + }; 136 140 u8 r_bp, r_cp; 137 141 138 142 pci_read_config_byte(pdev, port + 1, &r_bp); 139 143 pci_read_config_byte(pdev, port + 2, &r_cp); 140 144 141 - r_bp &= ~0xF0; 145 + r_bp &= ~0xE0; 142 146 r_cp &= ~0x0F; 143 147 144 148 if (adev->dma_mode >= XFER_UDMA_0) { ··· 153 147 154 148 } else { 155 149 int speed = adev->dma_mode - XFER_MW_DMA_0; 156 - r_bp |= 0x60; 157 - r_cp |= (5 - speed); 150 + r_bp |= mdma_timing[speed][0]; 151 + r_cp |= mdma_timing[speed][1]; 158 152 } 159 153 pci_write_config_byte(pdev, port + 1, r_bp); 160 154 pci_write_config_byte(pdev, port + 2, r_cp);