IDE updates
PATCH 1/1 IDE updates
Updates/fixes for host drivers.
Please pull from:
master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git/
to receive the following updates:
drivers/ide/cris/ide-cris.c | 9 +- drivers/ide/legacy/ide-cs.c | 1 + drivers/ide/pci/aec62xx.c | 22 +-- drivers/ide/pci/alim15x3.c | 7 +- drivers/ide/pci/cmd64x.c | 537 +++++++++++++++++++++------------------- drivers/ide/pci/hpt366.c | 7 +- drivers/ide/pci/it821x.c | 126 +++++----- drivers/ide/pci/pdc202xx_new.c | 3 - drivers/ide/pci/siimage.c | 12 +- drivers/ide/pci/sl82c105.c | 247 ++++++++----------- include/linux/ide.h | 1 - 11 files changed, 459 insertions(+), 513 deletions(-)
Bartlomiej Zolnierkiewicz (5):
alim15x3: PIO fallback fix
pdc202xx_new: enable DMA for all ATAPI devices
it821x: PIO mode setup fixes
siimage: fix wrong ->swdma_mask
ide-cris: fix ->speedproc and wrong ->swdma_mask
Fabrice Aeschbacher (1):
ide-cs: recognize 2GB CompactFlash from Transcend
Sergei Shtylyov (9):
sl82c105: rework PIO support (take 2)
sl82c105: DMA support code cleanup (take 4)
cmd64x: fix multiword and remove single-word DMA support
cmd64x: interrupt status fixes (take 2)
cmd64x: add/fix enablebits (take 2)
cmd64x: procfs code fixes/cleanups (take 2)
cmd64x: use interrupt status from MRDMODE register (take 2)
aec62xx: fix PIO/DMA setup issues
hpt366: don't check enablebits for HPT36x
drivers/ide/cris/ide-cris.c +4 -5
@@ -730,7 +730,7 @@ static int speed_cris_ide(ide_drive_t *drive, u8 speed)if (speed >=XFER_PIO_0 && speed <=XFER_PIO_4 ) {tune_cris_ide (drive, speed -XFER_PIO_0 ); -return 0 ; +return ide_config_drive_speed (drive, speed); } switch(speed)
@@ -760,7 +760,8 @@ static int speed_cris_ide(ide_drive_t *drive, u8 speed) hold =ATA_DMA2_HOLD ;break ;default : -return 0 ; +BUG (); +break ; }if (speed >=XFER_UDMA_0 )
@@ -768,7 +769,7 @@ static int speed_cris_ide(ide_drive_t *drive, u8 speed)else cris_ide_set_speed (TYPE_DMA ,0 , strobe, hold); -return 0 ; +return ide_config_drive_speed (drive, speed); }void __init
@@ -821,7 +822,6 @@ init_e100_ide (void) hwif->udma_four =0 ; hwif->ultra_mask = cris_ultra_mask; hwif->mwdma_mask =0x07 ;/* Multiword DMA 0-2 */ - hwif->swdma_mask =0x07 ;/* Singleword DMA 0-2 */ hwif->autodma =1 ; hwif->drives[0 ].autodma =1 ; hwif->drives[1 ].autodma =1 ;
@@ -1010,7 +1010,6 @@ static int cris_config_drive_for_dma (ide_drive_t *drive)return 0 ;speed_cris_ide (drive, speed); -ide_config_drive_speed (drive, speed);return ide_dma_enable (drive); }
drivers/ide/legacy/ide-cs.c +1 -0
@@ -401,6 +401,7 @@ static struct pcmcia_device_id ide_ids[] = {PCMCIA_DEVICE_PROD_ID12 ("TOSHIBA" ,"MK2001MPL" ,0xb4585a1a ,0x3489e003 ),PCMCIA_DEVICE_PROD_ID1 ("TRANSCEND 512M " ,0xd0909443 ),PCMCIA_DEVICE_PROD_ID12 ("TRANSCEND" ,"TS1GCF80" ,0x709b1bf1 ,0x2a54d4b1 ), +PCMCIA_DEVICE_PROD_ID12 ("TRANSCEND" ,"TS2GCF120" ,0x709b1bf1 ,0x969aa4f2 ),PCMCIA_DEVICE_PROD_ID12 ("TRANSCEND" ,"TS4GCF120" ,0x709b1bf1 ,0xf54a91c8 ),PCMCIA_DEVICE_PROD_ID12 ("WIT" ,"IDE16" ,0x244e5994 ,0x3e232852 ), PCMCIA_DEVICE_PROD_ID12("WEIDA", "TWTTI", 0xcc7cf69c, 0x212bb918),
drivers/ide/pci/aec62xx.c +6 -16
@@ -1,7 +1,8 @@/* -* linux/drivers/ide/pci/aec62xx.c Version 0.11 March 27, 2002 +* linux/drivers/ide/pci/aec62xx.c Version 0.21 Apr 21, 2007 * * Copyright (C) 1999-2002 Andre Hedrick <[email protected]> +* Copyright (C) 2007 MontaVista Software, Inc. <[email protected]> * */
@@ -193,18 +194,8 @@ static int config_chipset_for_dma (ide_drive_t *drive)static void aec62xx_tune_drive (ide_drive_t *drive,u8 pio) { -u8 speed =0 ; -u8 new_pio =XFER_PIO_0 +ide_get_best_pio_mode (drive,255 ,5 ,NULL ); - -switch (pio) { -case 5 : speed = new_pio;break ; -case 4 : speed =XFER_PIO_4 ;break ; -case 3 : speed =XFER_PIO_3 ;break ; -case 2 : speed =XFER_PIO_2 ;break ; -case 1 : speed =XFER_PIO_1 ;break ; -default : speed =XFER_PIO_0 ;break ; - } - (void )aec62xx_tune_chipset (drive, speed); + pio =ide_get_best_pio_mode (drive, pio,4 ,NULL ); + (void )aec62xx_tune_chipset (drive, pio +XFER_PIO_0 ); }static int aec62xx_config_drive_xfer_rate (ide_drive_t *drive)
@@ -213,7 +204,7 @@ static int aec62xx_config_drive_xfer_rate (ide_drive_t *drive)return 0 ;if (ide_use_fast_pio (drive)) -aec62xx_tune_drive (drive,5 ); +aec62xx_tune_drive (drive,255 );return -1 ; }
@@ -288,11 +279,10 @@ static void __devinit init_hwif_aec62xx(ide_hwif_t *hwif) hwif->ultra_mask =0x7f ; hwif->mwdma_mask =0x07 ; - hwif->swdma_mask =0x07 ; hwif->ide_dma_check = &aec62xx_config_drive_xfer_rate; hwif->ide_dma_lostirq = &aec62xx_irq_timeout; - hwif->ide_dma_timeout = &aec62xx_irq_timeout; +if (!noautodma) hwif->autodma =1 ; hwif->drives[0 ].autodma = hwif->autodma;
drivers/ide/pci/alim15x3.c +3 -4
@@ -534,7 +534,7 @@ static int ali15x3_config_drive_for_dma(ide_drive_t *drive)struct hd_driveid *id = drive->id;if ((m5229_revision<=0x20 ) && (drive->media!=ide_disk)) - goto no_dma_set; + goto ata_pio; drive->init_speed =0 ;
@@ -555,20 +555,19 @@ try_dma_modes: (id->dma_1word & hwif->swdma_mask)) {/* Force if Capable regular DMA modes */ if (!config_chipset_for_dma (drive)) - goto no_dma_set; + goto ata_pio; } }else if (__ide_dma_good_drive (drive) && (id->eide_dma_time <150 )) {/* Consult the list of known "good" drives */ if (!config_chipset_for_dma (drive)) - goto no_dma_set; + goto ata_pio; }else { goto ata_pio; } }else { ata_pio: hwif->tuneproc (drive,255 ); -no_dma_set:return -1 ; }
drivers/ide/pci/cmd64x.c +279 -258
703 lines not on this page · raw message
drivers/ide/pci/hpt366.c +6 -1
@@ -1,5 +1,5 @@/* -* linux/drivers/ide/pci/hpt366.c Version 1.02 Apr 18, 2007 +* linux/drivers/ide/pci/hpt366.c Version 1.03 May 4, 2007 * * Copyright (C) 1999-2003 Andre Hedrick <[email protected]> * Portions Copyright (C) 2001 Sun Microsystems, Inc.
@@ -1527,7 +1527,12 @@ static int __devinit init_setup_hpt366(struct pci_dev *dev, ide_pci_device_t *d)if (rev >2 ) goto init_single; +/* +* HPT36x chips are single channel and +* do not seem to have the channel enable bit... +*/ d->channels =1 ; + d->enablebits[0 ].reg =0 ;if ((dev2 =pci_get_slot (dev->bus, dev->devfn +1 )) !=NULL ) {u8 pin1 =0 , pin2 =0 ;
drivers/ide/pci/it821x.c +58 -68
209 lines not on this page · raw message
drivers/ide/pci/pdc202xx_new.c +0 -3
@@ -255,9 +255,6 @@ static int config_chipset_for_dma(ide_drive_t *drive)printk (KERN_WARNING "%s reduced to Ultra33 mode.\n" , drive->name); } -if (drive->media != ide_disk && drive->media != ide_cdrom) -return 0 ; -if (id->capability &4 ) {/* * Set IORDY_EN & PREFETCH_EN (this seems to have
drivers/ide/pci/siimage.c +2 -10
@@ -1,5 +1,5 @@/* -* linux/drivers/ide/pci/siimage.c Version 1.11 Jan 27, 2007 +* linux/drivers/ide/pci/siimage.c Version 1.12 Mar 10 2007 * * Copyright (C) 2001-2002 Andre Hedrick <[email protected]> * Copyright (C) 2003 Red Hat <[email protected]>
@@ -287,11 +287,6 @@ static void config_siimage_chipset_for_pio (ide_drive_t *drive, byte set_speed) (void )ide_config_drive_speed (drive, speed); } -static void config_chipset_for_pio (ide_drive_t *drive,byte set_speed) -{ -config_siimage_chipset_for_pio (drive, set_speed); -} -/** * siimage_tune_chipset - set controller timings * @drive: Drive to set up
@@ -396,8 +391,6 @@ static int config_chipset_for_dma (ide_drive_t *drive) {u8 speed =ide_dma_speed (drive,siimage_ratemask (drive)); -config_chipset_for_pio (drive, !speed); -if (!speed)return 0 ;
@@ -423,7 +416,7 @@ static int siimage_config_drive_for_dma (ide_drive_t *drive)return 0 ;if (ide_use_fast_pio (drive)) -config_chipset_for_pio (drive,1 ); +config_siimage_chipset_for_pio (drive,1 );return -1 ; }
@@ -1015,7 +1008,6 @@ static void __devinit init_hwif_siimage(ide_hwif_t *hwif) hwif->ultra_mask =0x7f ; hwif->mwdma_mask =0x07 ; - hwif->swdma_mask =0x07 ;if (!is_sata (hwif)) hwif->atapi_dma =1 ;
drivers/ide/pci/sl82c105.c +100 -147
388 lines not on this page · raw message
include/linux/ide.h +0 -1
@@ -613,7 +613,6 @@ typedef struct ide_drive_s {u8 quirk_list;/* considered quirky, set for a specific host */ u8 init_speed;/* transfer rate set at boot */ -u8 pio_speed;/* unused by core, used by some drivers for fallback from DMA */ u8 current_speed;/* current transfer rate set */ u8 desired_speed;/* desired transfer rate set */ u8 dn;/* now wide spread use */