IDE fixes
PATCH 1/1 IDE fixes
Please pull from:
master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git/
to receive the following updates:
drivers/ide/arm/icside.c | 3 +- drivers/ide/ide-tape.c | 2 +- drivers/ide/pci/alim15x3.c | 2 +- drivers/ide/pci/cmd64x.c | 4 +- drivers/ide/pci/cs5520.c | 2 +- drivers/ide/pci/cs5535.c | 42 +++++++++++++----------------- drivers/ide/pci/it8213.c | 33 ++++++++++++----------- drivers/ide/pci/jmicron.c | 21 +++------------ drivers/ide/pci/piix.c | 17 ++++++------ drivers/ide/pci/scc_pata.c | 61 ++++++++++++++----------------------------- drivers/ide/pci/sis5513.c | 1 + drivers/ide/pci/slc90e66.c | 15 +++++------ drivers/scsi/ide-scsi.c | 10 +++---- 13 files changed, 85 insertions(+), 128 deletions(-)
Bartlomiej Zolnierkiewicz (7):
alim15x3: Correct HP detect
cs5520: fix PIO auto-tuning in ->ide_dma_check method
cs5535: PIO fixes
it8213: PIO fixes (take 2)
jmicron: PIO fixes
piix/slc90e66: fix PIO1 handling in ->speedproc method (take 2)
scc_pata: PIO fixesDavid Lamparter (1):
sis5513: Add FSC Amilo A1630 PCI subvendor/dev to laptops
Jordan Crouse (1):
ide: Fix an overrun found in the CS5535 IDE driver
Mariusz Kozlowski (2):
drivers/ide/arm/icside.c: kmalloc + memset conversion to kzalloc drivers/scsi/ide-scsi.c: kmalloc + memset conversion to kzalloc
Meelis Roos (1):
ide: fix runtogether printk's in cmd64x IDE driver
Stephen Rothwell (1):
ide: eliminate warnings in ide-tape.c
drivers/ide/arm/icside.c +1 -2
@@ -693,13 +693,12 @@ icside_probe(struct expansion_card *ec, const struct ecard_id *id)if (ret) goto out; - state =kmalloc (sizeof (struct icside_state ),GFP_KERNEL ); + state =kzalloc (sizeof (struct icside_state ),GFP_KERNEL );if (!state) { ret = -ENOMEM ; goto release; } -memset (state,0 ,sizeof (state)); state->type =ICS_TYPE_NOTYPE ; state->dev = &ec->dev;
drivers/ide/ide-tape.c +1 -1
@@ -640,7 +640,7 @@ typedef enum { } idetape_chrdev_direction_t;struct idetape_bh { -unsigned short b_size; +u32 b_size;atomic_t b_count;struct idetape_bh *b_reqnext;char *b_data;
drivers/ide/pci/alim15x3.c +1 -1
@@ -593,7 +593,7 @@ static struct dmi_system_id cable_dmi_table[] = { .ident = "HP Pavilion N5430", .matches = {DMI_MATCH (DMI_BOARD_VENDOR ,"Hewlett-Packard" ), - DMI_MATCH(DMI_BOARD_NAME, "OmniBook N32N-736"), + DMI_MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736"), }, }, { }
drivers/ide/pci/cmd64x.c +2 -2
@@ -475,11 +475,11 @@ static unsigned int __devinit init_chipset_cmd64x(struct pci_dev *dev, const chaswitch (rev) {case 0x07 :case 0x05 : -printk ("%s: UltraDMA capable" , name); +printk ("%s: UltraDMA capable\n" , name);break ;case 0x03 :default : -printk ("%s: MultiWord DMA force limited" , name); +printk ("%s: MultiWord DMA force limited\n" , name);break ;case 0x01 : printk("%s: MultiWord DMA limited, "
drivers/ide/pci/cs5520.c +1 -1
@@ -133,7 +133,7 @@ static void cs5520_tune_drive(ide_drive_t *drive, u8 pio)static int cs5520_config_drive_xfer_rate (ide_drive_t *drive) {/* Tune the drive for PIO modes up to PIO 4 */ -cs5520_tune_drive (drive,4 ); +cs5520_tune_drive (drive,255 );/* Then tell the core to use DMA operations */ return 0 ;
drivers/ide/pci/cs5535.c +18 -24
77 lines not on this page · raw message
drivers/ide/pci/it8213.c +17 -16
@@ -21,7 +21,7 @@* it8213_dma_2_pio - return the PIO mode matching DMA * @xfer_rate: transfer speed * -* Returns the nearest equivalent PIO timing for the PIO or DMA +* Returns the nearest equivalent PIO timing for the DMA * mode requested by the controller. */
@@ -35,34 +35,28 @@ static u8 it8213_dma_2_pio (u8 xfer_rate) {case XFER_UDMA_1 :case XFER_UDMA_0 :case XFER_MW_DMA_2 : -case XFER_PIO_4 :return 4 ;case XFER_MW_DMA_1 : -case XFER_PIO_3 :return 3 ;case XFER_SW_DMA_2 : -case XFER_PIO_2 :return 2 ;case XFER_MW_DMA_0 :case XFER_SW_DMA_1 :case XFER_SW_DMA_0 : -case XFER_PIO_1 : -case XFER_PIO_0 : -case XFER_PIO_SLOW :default :return 0 ; } }/* -* it8213_tuneproc - tune a drive +* it8213_tune_pio - tune a drive * @drive: drive to tune * @pio: desired PIO mode * * Set the interface PIO mode. */ -static void it8213_tuneproc (ide_drive_t *drive,u8 pio) +static void it8213_tune_pio (ide_drive_t *drive,const u8 pio) {ide_hwif_t *hwif =HWIF (drive);struct pci_dev *dev = hwif->pci_dev;
@@ -82,8 +76,6 @@ static void it8213_tuneproc (ide_drive_t *drive, u8 pio) { 2, 1 }, { 2, 3 }, }; - pio =ide_get_best_pio_mode (drive, pio,4 ); -spin_lock_irqsave (&tune_lock, flags);pci_read_config_word (dev, master_port, &master_data);
@@ -113,6 +105,13 @@ static void it8213_tuneproc (ide_drive_t *drive, u8 pio)spin_unlock_irqrestore (&tune_lock, flags); } +static void it8213_tuneproc (ide_drive_t *drive,u8 pio) +{ + pio =ide_get_best_pio_mode (drive, pio,4 ); +it8213_tune_pio (drive, pio); +ide_config_drive_speed (drive,XFER_PIO_0 + pio); +} +/** * it8213_tune_chipset - set controller timings * @drive: Drive to set up
@@ -193,7 +192,12 @@ static int it8213_tune_chipset (ide_drive_t *drive, u8 xferspeed)if (reg55 & w_flag)pci_write_config_byte (dev,0x55 , (u8 ) reg55 & ~w_flag); } -it8213_tuneproc (drive,it8213_dma_2_pio (speed)); + +if (speed >XFER_PIO_4 ) +it8213_tune_pio (drive,it8213_dma_2_pio (speed)); +else +it8213_tune_pio (drive, speed -XFER_PIO_0 ); +return ide_config_drive_speed (drive, speed); }
@@ -209,13 +213,10 @@ static int it8213_tune_chipset (ide_drive_t *drive, u8 xferspeed)static int it8213_config_drive_for_dma (ide_drive_t *drive) { -u8 pio; -if (ide_tune_dma (drive))return 0 ; - pio =ide_get_best_pio_mode (drive,255 ,4 ); -it8213_tune_chipset (drive,XFER_PIO_0 + pio); +it8213_tuneproc (drive,255 );return -1 ; }
drivers/ide/pci/jmicron.c +4 -17
@@ -83,23 +83,10 @@ static u8 __devinit ata66_jmicron(ide_hwif_t *hwif)return ATA_CBL_PATA80 ; } -static void jmicron_tuneproc (ide_drive_t *drive,byte mode_wanted) +static void jmicron_tuneproc (ide_drive_t *drive,u8 pio) { -return ; -} - -/** -* config_jmicron_chipset_for_pio - set drive timings -* @drive: drive to tune -* @speed we want -* -*/ - -static void config_jmicron_chipset_for_pio (ide_drive_t *drive,byte set_speed) -{ -u8 speed =XFER_PIO_0 +ide_get_best_pio_mode (drive,255 ,5 ); -if (set_speed) - (void )ide_config_drive_speed (drive, speed); + pio =ide_get_best_pio_mode (drive, pio,5 ); +ide_config_drive_speed (drive,XFER_PIO_0 + pio); }/**
@@ -132,7 +119,7 @@ static int jmicron_config_drive_for_dma (ide_drive_t *drive)if (ide_tune_dma (drive))return 0 ; -config_jmicron_chipset_for_pio (drive,1 ); +jmicron_tuneproc (drive,255 );return -1 ; }
drivers/ide/pci/piix.c +8 -9
@@ -1,5 +1,5 @@/* -* linux/drivers/ide/pci/piix.c Version 0.50 Jun 10, 2007 +* linux/drivers/ide/pci/piix.c Version 0.51 Jul 6, 2007 * * Copyright (C) 1998-1999 Andrzej Krzysztofowicz, Author and Maintainer * Copyright (C) 1998-2000 Andre Hedrick <[email protected]>
@@ -109,7 +109,7 @@ static int no_piix_dma;* piix_dma_2_pio - return the PIO mode matching DMA * @xfer_rate: transfer speed * -* Returns the nearest equivalent PIO timing for the PIO or DMA +* Returns the nearest equivalent PIO timing for the DMA * mode requested by the controller. */
@@ -123,20 +123,14 @@ static u8 piix_dma_2_pio (u8 xfer_rate) {case XFER_UDMA_1 :case XFER_UDMA_0 :case XFER_MW_DMA_2 : -case XFER_PIO_4 :return 4 ;case XFER_MW_DMA_1 : -case XFER_PIO_3 :return 3 ;case XFER_SW_DMA_2 : -case XFER_PIO_2 :return 2 ;case XFER_MW_DMA_0 :case XFER_SW_DMA_1 :case XFER_SW_DMA_0 : -case XFER_PIO_1 : -case XFER_PIO_0 : -case XFER_PIO_SLOW :default :return 0 ; }
@@ -269,6 +263,7 @@ static int piix_tune_chipset (ide_drive_t *drive, u8 xferspeed)case XFER_PIO_4 :case XFER_PIO_3 :case XFER_PIO_2 : +case XFER_PIO_1 :case XFER_PIO_0 :break ;default :return -1 ; }
@@ -299,7 +294,11 @@ static int piix_tune_chipset (ide_drive_t *drive, u8 xferspeed)pci_write_config_byte (dev,0x55 , (u8 ) reg55 & ~w_flag); } -piix_tune_pio (drive,piix_dma_2_pio (speed)); +if (speed >XFER_PIO_4 ) +piix_tune_pio (drive,piix_dma_2_pio (speed)); +else +piix_tune_pio (drive, speed -XFER_PIO_0 ); +return ide_config_drive_speed (drive, speed); }
drivers/ide/pci/scc_pata.c +20 -41
115 lines not on this page · raw message
drivers/ide/pci/sis5513.c +1 -0
@@ -801,6 +801,7 @@ struct sis_laptop {static const struct sis_laptop sis_laptop[] = {/* devid, subvendor, subdev */ {0x5513 ,0x1043 ,0x1107 },/* ASUS A6K */ + {0x5513 ,0x1734 ,0x105f },/* FSC Amilo A1630 */ /* end marker */ {0 , } };
drivers/ide/pci/slc90e66.c +7 -8
@@ -1,5 +1,5 @@/* -* linux/drivers/ide/pci/slc90e66.c Version 0.14 February 8, 2007 +* linux/drivers/ide/pci/slc90e66.c Version 0.15 Jul 6, 2007 * * Copyright (C) 2000-2002 Andre Hedrick <[email protected]> * Copyright (C) 2006-2007 MontaVista Software, Inc. <[email protected]>
@@ -29,20 +29,14 @@ static u8 slc90e66_dma_2_pio (u8 xfer_rate) {case XFER_UDMA_1 :case XFER_UDMA_0 :case XFER_MW_DMA_2 : -case XFER_PIO_4 :return 4 ;case XFER_MW_DMA_1 : -case XFER_PIO_3 :return 3 ;case XFER_SW_DMA_2 : -case XFER_PIO_2 :return 2 ;case XFER_MW_DMA_0 :case XFER_SW_DMA_1 :case XFER_SW_DMA_0 : -case XFER_PIO_1 : -case XFER_PIO_0 : -case XFER_PIO_SLOW :default :return 0 ; }
@@ -136,6 +130,7 @@ static int slc90e66_tune_chipset (ide_drive_t *drive, u8 xferspeed)case XFER_PIO_4 :case XFER_PIO_3 :case XFER_PIO_2 : +case XFER_PIO_1 :case XFER_PIO_0 :break ;default :return -1 ; }
@@ -156,7 +151,11 @@ static int slc90e66_tune_chipset (ide_drive_t *drive, u8 xferspeed)pci_write_config_word (dev,0x4a , reg4a & ~a_speed); } -slc90e66_tune_pio (drive,slc90e66_dma_2_pio (speed)); +if (speed >XFER_PIO_4 ) +slc90e66_tune_pio (drive,slc90e66_dma_2_pio (speed)); +else +slc90e66_tune_pio (drive, speed -XFER_PIO_0 ); +return ide_config_drive_speed (drive, speed); }
drivers/scsi/ide-scsi.c +4 -6
@@ -328,17 +328,15 @@ static int idescsi_check_condition(ide_drive_t *drive, struct request *failed_cou8 *buf;/* stuff a sense request in front of our current request */ - pc =kmalloc (sizeof (idescsi_pc_t),GFP_ATOMIC ); - rq =kmalloc (sizeof (struct request ),GFP_ATOMIC ); - buf =kmalloc (SCSI_SENSE_BUFFERSIZE ,GFP_ATOMIC ); -if (pc ==NULL || rq ==NULL || buf ==NULL ) { + pc =kzalloc (sizeof (idescsi_pc_t),GFP_ATOMIC ); + rq =kmalloc (sizeof (struct request ),GFP_ATOMIC ); + buf =kzalloc (SCSI_SENSE_BUFFERSIZE ,GFP_ATOMIC ); +if (!pc || !rq || !buf) {kfree (buf);kfree (rq);kfree (pc);return -ENOMEM ; } -memset (pc,0 ,sizeof (idescsi_pc_t)); -memset (buf,0 ,SCSI_SENSE_BUFFERSIZE );ide_init_drive_cmd (rq); rq->special = (char *) pc; pc->rq = rq;