aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_hpt37x.c
diff options
context:
space:
mode:
authorAlan <alan@lxorguk.ukuu.org.uk>2007-01-05 19:37:01 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2007-01-06 02:55:29 -0500
commit6929da4427b4335365dd51ab0b7dd2a0393656f0 (patch)
treebd25939d6777ce87e32e21617f39381a8ceab7b5 /drivers/ata/pata_hpt37x.c
parent516e72cb47ae4457f368aff449ffc284c5f357c1 (diff)
[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>
Diffstat (limited to 'drivers/ata/pata_hpt37x.c')
-rw-r--r--drivers/ata/pata_hpt37x.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c
index 47082df7199e..dfb306057cf4 100644
--- a/drivers/ata/pata_hpt37x.c
+++ b/drivers/ata/pata_hpt37x.c
@@ -25,7 +25,7 @@
25#include <linux/libata.h> 25#include <linux/libata.h>
26 26
27#define DRV_NAME "pata_hpt37x" 27#define DRV_NAME "pata_hpt37x"
28#define DRV_VERSION "0.5.1" 28#define DRV_VERSION "0.5.2"
29 29
30struct hpt_clock { 30struct hpt_clock {
31 u8 xfer_speed; 31 u8 xfer_speed;
@@ -416,7 +416,7 @@ static const char *bad_ata100_5[] = {
416 416
417static unsigned long hpt370_filter(const struct ata_port *ap, struct ata_device *adev, unsigned long mask) 417static 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 if (hpt_dma_blacklisted(adev, "UDMA", bad_ata33)) 420 if (hpt_dma_blacklisted(adev, "UDMA", bad_ata33))
421 mask &= ~ATA_MASK_UDMA; 421 mask &= ~ATA_MASK_UDMA;
422 if (hpt_dma_blacklisted(adev, "UDMA100", bad_ata100_5)) 422 if (hpt_dma_blacklisted(adev, "UDMA100", bad_ata100_5))
@@ -749,7 +749,7 @@ static void hpt37x_bmdma_stop(struct ata_queued_cmd *qc)
749{ 749{
750 struct ata_port *ap = qc->ap; 750 struct ata_port *ap = qc->ap;
751 struct pci_dev *pdev = to_pci_dev(ap->host->dev); 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 u8 bwsr_stat, msc_stat; 753 u8 bwsr_stat, msc_stat;
754 754
755 pci_read_config_byte(pdev, 0x6A, &bwsr_stat); 755 pci_read_config_byte(pdev, 0x6A, &bwsr_stat);