diff options
Diffstat (limited to 'drivers/ide/pci/hpt366.c')
-rw-r--r-- | drivers/ide/pci/hpt366.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 39f1c89f7c86..3d8d6b2ee41a 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/ide/pci/hpt366.c Version 1.12 Aug 19, 2007 | 2 | * linux/drivers/ide/pci/hpt366.c Version 1.13 Sep 29, 2007 |
3 | * | 3 | * |
4 | * Copyright (C) 1999-2003 Andre Hedrick <andre@linux-ide.org> | 4 | * Copyright (C) 1999-2003 Andre Hedrick <andre@linux-ide.org> |
5 | * Portions Copyright (C) 2001 Sun Microsystems, Inc. | 5 | * Portions Copyright (C) 2001 Sun Microsystems, Inc. |
@@ -114,7 +114,7 @@ | |||
114 | * unify HPT36x/37x timing setup code and the speedproc handlers by joining | 114 | * unify HPT36x/37x timing setup code and the speedproc handlers by joining |
115 | * the register setting lists into the table indexed by the clock selected | 115 | * the register setting lists into the table indexed by the clock selected |
116 | * - set the correct hwif->ultra_mask for each individual chip | 116 | * - set the correct hwif->ultra_mask for each individual chip |
117 | * - add UltraDMA mode filtering for the HPT37[24] based SATA cards | 117 | * - add Ultra and MW DMA mode filtering for the HPT37[24] based SATA cards |
118 | * Sergei Shtylyov, <sshtylyov@ru.mvista.com> or <source@mvista.com> | 118 | * Sergei Shtylyov, <sshtylyov@ru.mvista.com> or <source@mvista.com> |
119 | */ | 119 | */ |
120 | 120 | ||
@@ -562,6 +562,24 @@ static u8 hpt3xx_udma_filter(ide_drive_t *drive) | |||
562 | return check_in_drive_list(drive, bad_ata33) ? 0x00 : mask; | 562 | return check_in_drive_list(drive, bad_ata33) ? 0x00 : mask; |
563 | } | 563 | } |
564 | 564 | ||
565 | static u8 hpt3xx_mdma_filter(ide_drive_t *drive) | ||
566 | { | ||
567 | ide_hwif_t *hwif = HWIF(drive); | ||
568 | struct hpt_info *info = pci_get_drvdata(hwif->pci_dev); | ||
569 | |||
570 | switch (info->chip_type) { | ||
571 | case HPT372 : | ||
572 | case HPT372A: | ||
573 | case HPT372N: | ||
574 | case HPT374 : | ||
575 | if (ide_dev_is_sata(drive->id)) | ||
576 | return 0x00; | ||
577 | /* Fall thru */ | ||
578 | default: | ||
579 | return 0x07; | ||
580 | } | ||
581 | } | ||
582 | |||
565 | static u32 get_speed_setting(u8 speed, struct hpt_info *info) | 583 | static u32 get_speed_setting(u8 speed, struct hpt_info *info) |
566 | { | 584 | { |
567 | int i; | 585 | int i; |
@@ -1257,6 +1275,7 @@ static void __devinit init_hwif_hpt366(ide_hwif_t *hwif) | |||
1257 | hwif->busproc = &hpt3xx_busproc; | 1275 | hwif->busproc = &hpt3xx_busproc; |
1258 | 1276 | ||
1259 | hwif->udma_filter = &hpt3xx_udma_filter; | 1277 | hwif->udma_filter = &hpt3xx_udma_filter; |
1278 | hwif->mdma_filter = &hpt3xx_mdma_filter; | ||
1260 | 1279 | ||
1261 | /* | 1280 | /* |
1262 | * HPT3xxN chips have some complications: | 1281 | * HPT3xxN chips have some complications: |