diff options
-rw-r--r-- | drivers/ide/pci/cy82c693.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/ide/pci/cy82c693.c b/drivers/ide/pci/cy82c693.c index 1cd4e9cb0521..e7466f2bee7b 100644 --- a/drivers/ide/pci/cy82c693.c +++ b/drivers/ide/pci/cy82c693.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/ide/pci/cy82c693.c Version 0.42 Oct 23, 2007 | 2 | * linux/drivers/ide/pci/cy82c693.c Version 0.43 Nov 7, 2007 |
3 | * | 3 | * |
4 | * Copyright (C) 1998-2000 Andreas S. Krebs (akrebs@altavista.net), Maintainer | 4 | * Copyright (C) 1998-2000 Andreas S. Krebs (akrebs@altavista.net), Maintainer |
5 | * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org>, Integrator | 5 | * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org>, Integrator |
@@ -182,10 +182,7 @@ static void cy82c693_dma_enable (ide_drive_t *drive, int mode, int single) | |||
182 | 182 | ||
183 | if (mode>2) /* make sure we set a valid mode */ | 183 | if (mode>2) /* make sure we set a valid mode */ |
184 | mode = 2; | 184 | mode = 2; |
185 | 185 | ||
186 | if (mode > drive->id->tDMA) /* to be absolutly sure we have a valid mode */ | ||
187 | mode = drive->id->tDMA; | ||
188 | |||
189 | index = (HWIF(drive)->channel==0) ? CY82_INDEX_CHANNEL0 : CY82_INDEX_CHANNEL1; | 186 | index = (HWIF(drive)->channel==0) ? CY82_INDEX_CHANNEL0 : CY82_INDEX_CHANNEL1; |
190 | 187 | ||
191 | #if CY82C693_DEBUG_LOGS | 188 | #if CY82C693_DEBUG_LOGS |
@@ -250,7 +247,10 @@ static int cy82c693_ide_dma_on (ide_drive_t *drive) | |||
250 | 247 | ||
251 | mmode = id->dma_mword & (id->dma_mword >> 8); | 248 | mmode = id->dma_mword & (id->dma_mword >> 8); |
252 | smode = id->dma_1word & (id->dma_1word >> 8); | 249 | smode = id->dma_1word & (id->dma_1word >> 8); |
253 | 250 | ||
251 | mmode &= ATA_MWDMA2; | ||
252 | smode &= ATA_SWDMA2; | ||
253 | |||
254 | if (mmode != 0) { | 254 | if (mmode != 0) { |
255 | /* enable multi */ | 255 | /* enable multi */ |
256 | cy82c693_dma_enable(drive, (mmode >> 1), 0); | 256 | cy82c693_dma_enable(drive, (mmode >> 1), 0); |