From: Bartlomiej Zolnierkiewicz Date: Thu, 11 Oct 2007 21:54:01 +0000 (+0200) Subject: sis5513: don't change UDMA settings when programming PIO X-Git-Tag: v2.6.24-rc1~1456^2~1 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=0d3be723cb6432e384267d0fe83ee0bae5e17846;p=linux-2.6-omap-h63xx.git sis5513: don't change UDMA settings when programming PIO Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz --- diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c index 7455bf357ed..3a8cb1468a7 100644 --- a/drivers/ide/pci/sis5513.c +++ b/drivers/ide/pci/sis5513.c @@ -1,5 +1,5 @@ /* - * linux/drivers/ide/pci/sis5513.c Version 0.26 Jul 7, 2007 + * linux/drivers/ide/pci/sis5513.c Version 0.27 Jul 14, 2007 * * Copyright (C) 1999-2000 Andre Hedrick * Copyright (C) 2002 Lionel Bouton , Maintainer @@ -537,6 +537,9 @@ static int sis5513_tune_chipset(ide_drive_t *drive, const u8 speed) u32 regdw; u8 drive_pci, reg; + if (speed >= XFER_PIO_0 && speed <= XFER_PIO_4) + return sis5513_tune_drive(drive, speed - XFER_PIO_0); + /* See config_art_rwp_pio for drive pci config registers */ drive_pci = 0x40; if (chipset_family >= ATA_133) { @@ -601,12 +604,6 @@ static int sis5513_tune_chipset(ide_drive_t *drive, const u8 speed) case XFER_SW_DMA_1: case XFER_SW_DMA_0: break; - case XFER_PIO_4: - case XFER_PIO_3: - case XFER_PIO_2: - case XFER_PIO_1: - case XFER_PIO_0: - return sis5513_tune_drive(drive, speed - XFER_PIO_0); default: BUG(); break;