diff options
author | Alan <alan@lxorguk.ukuu.org.uk> | 2006-11-15 11:17:13 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-01 22:46:41 -0500 |
commit | 54083f114efad2d4fa993c52024f8973c70b9edb (patch) | |
tree | 60597286cfbba1ddbbae1e7a3ab55078693845a1 | |
parent | b2d1eee1e99e15a80fa9623724d6861a81d2aba4 (diff) |
[PATCH] pata_hpt366 enablebits
More enablebits
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r-- | drivers/ata/pata_hpt366.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c index c0e150a9586b..c15c8dc3a6db 100644 --- a/drivers/ata/pata_hpt366.c +++ b/drivers/ata/pata_hpt366.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <linux/libata.h> | 27 | #include <linux/libata.h> |
28 | 28 | ||
29 | #define DRV_NAME "pata_hpt366" | 29 | #define DRV_NAME "pata_hpt366" |
30 | #define DRV_VERSION "0.5" | 30 | #define DRV_VERSION "0.5.1" |
31 | 31 | ||
32 | struct hpt_clock { | 32 | struct hpt_clock { |
33 | u8 xfer_speed; | 33 | u8 xfer_speed; |
@@ -222,9 +222,17 @@ static u32 hpt36x_find_mode(struct ata_port *ap, int speed) | |||
222 | 222 | ||
223 | static int hpt36x_pre_reset(struct ata_port *ap) | 223 | static int hpt36x_pre_reset(struct ata_port *ap) |
224 | { | 224 | { |
225 | static const struct pci_bits hpt36x_enable_bits[] = { | ||
226 | { 0x50, 1, 0x04, 0x04 }, | ||
227 | { 0x54, 1, 0x04, 0x04 } | ||
228 | }; | ||
229 | |||
225 | u8 ata66; | 230 | u8 ata66; |
226 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | 231 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
227 | 232 | ||
233 | if (!pci_test_config_bits(pdev, &hpt36x_enable_bits[ap->port_no])) | ||
234 | return -ENOENT; | ||
235 | |||
228 | pci_read_config_byte(pdev, 0x5A, &ata66); | 236 | pci_read_config_byte(pdev, 0x5A, &ata66); |
229 | if (ata66 & (1 << ap->port_no)) | 237 | if (ata66 & (1 << ap->port_no)) |
230 | ap->cbl = ATA_CBL_PATA40; | 238 | ap->cbl = ATA_CBL_PATA40; |