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.

[PATCH] hpt37x: Two important bug fixes

The HPT37x driver very carefully handles DMA completions and the needed
fixups are done on pci registers 0x50 and 0x52. This is unfortunate
because the actual registers are 0x50 and 0x54. Fixing this offset cures
the second channel problems reported.

Secondly there are some problems with the HPT370 and certain ATA drives.
The filter code however only filters ATAPI devices due to a reversed type
check.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Alan and committed by
Linus Torvalds
6929da44 516e72cb

+3 -3
+3 -3
drivers/ata/pata_hpt37x.c
··· 25 25 #include <linux/libata.h> 26 26 27 27 #define DRV_NAME "pata_hpt37x" 28 - #define DRV_VERSION "0.5.1" 28 + #define DRV_VERSION "0.5.2" 29 29 30 30 struct hpt_clock { 31 31 u8 xfer_speed; ··· 416 416 417 417 static unsigned long hpt370_filter(const struct ata_port *ap, struct ata_device *adev, unsigned long mask) 418 418 { 419 - if (adev->class != ATA_DEV_ATA) { 419 + if (adev->class == ATA_DEV_ATA) { 420 420 if (hpt_dma_blacklisted(adev, "UDMA", bad_ata33)) 421 421 mask &= ~ATA_MASK_UDMA; 422 422 if (hpt_dma_blacklisted(adev, "UDMA100", bad_ata100_5)) ··· 749 749 { 750 750 struct ata_port *ap = qc->ap; 751 751 struct pci_dev *pdev = to_pci_dev(ap->host->dev); 752 - int mscreg = 0x50 + 2 * ap->port_no; 752 + int mscreg = 0x50 + 4 * ap->port_no; 753 753 u8 bwsr_stat, msc_stat; 754 754 755 755 pci_read_config_byte(pdev, 0x6A, &bwsr_stat);