diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2008-02-13 01:41:44 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2008-02-15 13:51:18 -0500 |
commit | b6966a61a8b5df2987856c81f39a8fd014d32a80 (patch) | |
tree | beb3c473fae91311d243c301d2438f83c41c0cfe /drivers/ata | |
parent | 7a3a16fe7ddf0570e2fcf286d7e244a5e1e16f6a (diff) |
pata_cs5536.c bugfix
Fix speed negotiation for secondary device.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/pata_cs5536.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c index d753e568588e..89fc8db1fb32 100644 --- a/drivers/ata/pata_cs5536.c +++ b/drivers/ata/pata_cs5536.c | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <asm/msr.h> | 40 | #include <asm/msr.h> |
41 | 41 | ||
42 | #define DRV_NAME "pata_cs5536" | 42 | #define DRV_NAME "pata_cs5536" |
43 | #define DRV_VERSION "0.0.6" | 43 | #define DRV_VERSION "0.0.7" |
44 | 44 | ||
45 | enum { | 45 | enum { |
46 | CFG = 0, | 46 | CFG = 0, |
@@ -153,8 +153,8 @@ static void cs5536_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
153 | struct ata_device *pair = ata_dev_pair(adev); | 153 | struct ata_device *pair = ata_dev_pair(adev); |
154 | int mode = adev->pio_mode - XFER_PIO_0; | 154 | int mode = adev->pio_mode - XFER_PIO_0; |
155 | int cmdmode = mode; | 155 | int cmdmode = mode; |
156 | int dshift = ap->port_no ? IDE_D1_SHIFT : IDE_D0_SHIFT; | 156 | int dshift = adev->devno ? IDE_D1_SHIFT : IDE_D0_SHIFT; |
157 | int cshift = ap->port_no ? IDE_CAST_D1_SHIFT : IDE_CAST_D0_SHIFT; | 157 | int cshift = adev->devno ? IDE_CAST_D1_SHIFT : IDE_CAST_D0_SHIFT; |
158 | u32 dtc, cast, etc; | 158 | u32 dtc, cast, etc; |
159 | 159 | ||
160 | if (pair) | 160 | if (pair) |
@@ -201,7 +201,7 @@ static void cs5536_set_dmamode(struct ata_port *ap, struct ata_device *adev) | |||
201 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | 201 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
202 | u32 dtc, etc; | 202 | u32 dtc, etc; |
203 | int mode = adev->dma_mode; | 203 | int mode = adev->dma_mode; |
204 | int dshift = ap->port_no ? IDE_D1_SHIFT : IDE_D0_SHIFT; | 204 | int dshift = adev->devno ? IDE_D1_SHIFT : IDE_D0_SHIFT; |
205 | 205 | ||
206 | if (mode >= XFER_UDMA_0) { | 206 | if (mode >= XFER_UDMA_0) { |
207 | cs5536_read(pdev, ETC, &etc); | 207 | cs5536_read(pdev, ETC, &etc); |