[git patches] IDE fixes
Hi, This update fixes all known/open 2.6.25 IDE regressions + few other things: - fix ide-cd cd/dvd burning regression (Kiyoshi Ueda) - fix falconide/macide regressions (Geert Uytterhoeven) - another device needs HPA workaround (Mikko Rapeli) - ht6560b bugfixes (Jan Evert van Grootheest) - new PCI id (used by Everex Cloudbook) for via82cxxx (Andrew Smith) Linus, please pull from: master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git/ to receive the following updates: MAINTAINERS|2 +- drivers/ata/libata-core.c |1 + drivers/ide/ide-cd.c |6 +- drivers/ide/ide-disk.c |1 + drivers/ide/ide-generic.c |6 -- drivers/ide/legacy/falconide.c |4 +++- drivers/ide/legacy/ht6560b.c | 25 + drivers/ide/legacy/macide.c|2 +- drivers/ide/pci/via82cxxx.c|1 + include/linux/Kbuild |2 +- include/linux/hdsmart.h|4 ++-- include/linux/pci_ids.h|1 + 12 files changed, 34 insertions(+), 21 deletions(-) Andrew Smith (1): via82cxxx: add new PCI id for cx700 Bartlomiej Zolnierkiewicz (2): falconide: locking bugfix linux/hdsmart.h: fix goofups (take 2) Borislav Petkov (1): MAINTAINERS: update ide-cd maintainer's email address Geert Uytterhoeven (1): ide: Add missing base addresses for falconide and macide Jan Evert van Grootheest (2): ht6560b can only do up to PIO mode 4 ht6560b: force prefetch for some devices Kiyoshi Ueda (1): ide-cd: fix missing residual count setting in DMA mode Mikko Rapeli (1): ide/libata: ST310211A has buggy HPA too diff --git a/MAINTAINERS b/MAINTAINERS index 1d2edb4..082d1ee 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1924,7 +1924,7 @@ S:Maintained IDE/ATAPI CDROM DRIVER P: Borislav Petkov -M: [EMAIL PROTECTED] +M: [EMAIL PROTECTED] L: linux-ide@vger.kernel.org S: Maintained diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index beaa3a9..f46eb6f 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -4190,6 +4190,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { /* Devices which report 1 sector over size HPA */ { ST340823A, NULL, ATA_HORKAGE_HPA_SIZE, }, { ST320413A, NULL, ATA_HORKAGE_HPA_SIZE, }, + { ST310211A, NULL, ATA_HORKAGE_HPA_SIZE, }, /* Devices which get the IVB wrong */ { QUANTUM FIREBALLlct10 05, A03.0900, ATA_HORKAGE_IVB, }, diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 354c91d..310e497 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -1207,9 +1207,13 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) end_request: if (blk_pc_request(rq)) { unsigned long flags; + unsigned int dlen = rq-data_len; + + if (dma) + rq-data_len = 0; spin_lock_irqsave(ide_lock, flags); - if (__blk_end_request(rq, 0, rq-data_len)) + if (__blk_end_request(rq, 0, dlen)) BUG(); HWGROUP(drive)-rq = NULL; spin_unlock_irqrestore(ide_lock, flags); diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index aed8b31..8f5bed4 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c @@ -397,6 +397,7 @@ static inline int idedisk_supports_lba48(const struct hd_driveid *id) static const struct drive_list_entry hpa_list[] = { { ST340823A, NULL }, { ST320413A, NULL }, + { ST310211A, NULL }, { NULL, NULL } }; diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c index 709b9e4..9ebec08 100644 --- a/drivers/ide/ide-generic.c +++ b/drivers/ide/ide-generic.c @@ -17,9 +17,6 @@ static int __init ide_generic_init(void) u8 idx[MAX_HWIFS]; int i; - if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET]) - ide_get_lock(NULL, NULL); /* for atari only */ - for (i = 0; i MAX_HWIFS; i++) { ide_hwif_t *hwif = ide_hwifs[i]; @@ -31,9 +28,6 @@ static int __init ide_generic_init(void) ide_device_add_all(idx, NULL); - if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET]) - ide_release_lock(); /* for atari only */ - return 0; } diff --git a/drivers/ide/legacy/falconide.c b/drivers/ide/legacy/falconide.c index f044048..8949ce7 100644 --- a/drivers/ide/legacy/falconide.c +++ b/drivers/ide/legacy/falconide.c @@ -54,7 +54,7 @@ static void __init falconide_setup_ports(hw_regs_t *hw) for (i = 1; i 8; i++) hw-io_ports[i] = ATA_HD_BASE + 1 + i * 4; - hw-io_ports[IDE_CONTROL_OFFSET] = ATA_HD_CONTROL; + hw-io_ports[IDE_CONTROL_OFFSET] = ATA_HD_BASE + ATA_HD_CONTROL; hw-irq = IRQ_MFP_IDE;
[git patches] IDE fixes
Hi, We merged _a_lot_ of IDE patches for 2.6.25 so no wonder that a few bugs showed up (yes, mostly brown paper ones of mine :). This update should put it under control again (there are two more open regression bugreports left and they are going to be addressed as soon as we have more data). - fix nasty bug in handling of flush requests (extra thanks to Sebastian Siewior / James Bottomley / Christoph Hellwig for help with fixing it) - fix ide_port_init() regression (spotted by Atsushi Nemoto) - fix build of bast-ide of gayle host drivers (Adrian Bunk) - fixes for Palm BK3710 support (Sergei Shtylyov and me) - fix another possible ide-cd panic (Kiyoshi Ueda) - other minor fixes Please pull from: master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git/ to receive the following updates: drivers/ide/Kconfig| 26 -- drivers/ide/arm/bast-ide.c | 12 ++ drivers/ide/arm/palm_bk3710.c | 74 --- drivers/ide/ide-cd.c |2 +- drivers/ide/ide-disk.c | 18 ++ drivers/ide/ide-dma.c | 14 drivers/ide/ide-io.c | 19 ++ drivers/ide/ide-iops.c | 10 + drivers/ide/ide-lib.c |9 - drivers/ide/ide-probe.c|4 +- drivers/ide/ide-tape.c | 34 -- drivers/ide/ide.c |4 +-- drivers/ide/legacy/gayle.c |2 +- drivers/ide/pci/cs5520.c |5 --- drivers/ide/pci/pdc202xx_old.c | 22 include/linux/ide.h| 11 +++--- 16 files changed, 107 insertions(+), 159 deletions(-) Adrian Bunk (1): ide: fix ide/legacy/gayle.c compilation Bartlomiej Zolnierkiewicz (12): palm_bk3710: ide_register_hw() - ide_device_add() palm_bk3710: fix ide_unregister() usage palm_bk3710: port initialization/probing bugfix palm_bk3710: use struct ide_port_info pdc202xx_old: always enable burst mode ide: remove stale version number ide-tape: remove never executed code bast-ide: build fix ide-disk: fix flush requests (take 2) ide: ide_init_port() bugfix ide: fix comment in init_irq() ide: remove stale comment from ide-lib.c Benjamin Herrenschmidt (1): cs5520: remove stale comment Borislav Petkov (1): ide-cd: replace ntohs with generic byteorder macro be16_to_cpu Kiyoshi Ueda (1): ide: another possible ide panic fix for blk-end-request Sergei Shtylyov (2): ide: insert BUG_ON() into __ide_set_handler() (take 2) ide: introduce CONFIG_BLK_DEV_IDEDMA_SFF option diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 043c34a..df752e6 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig @@ -378,6 +378,9 @@ config BLK_DEV_IDEPNP would like the kernel to automatically detect and activate it, say Y here. +config BLK_DEV_IDEDMA_SFF + bool + if PCI comment PCI IDE chipsets support @@ -459,6 +462,7 @@ config BLK_DEV_RZ1000 config BLK_DEV_IDEDMA_PCI bool select BLK_DEV_IDEPCI + select BLK_DEV_IDEDMA_SFF config BLK_DEV_AEC62XX tristate AEC62XX chipset support @@ -688,23 +692,6 @@ config BLK_DEV_PDC202XX_OLD If unsure, say N. -config PDC202XX_BURST - bool Special UDMA Feature - depends on BLK_DEV_PDC202XX_OLD - help - This option causes the pdc202xx driver to enable UDMA modes on the - PDC202xx even when the PDC202xx BIOS has not done so. - - It was originally designed for the PDC20246/Ultra33, whose BIOS will - only setup UDMA on the first two PDC20246 cards. It has also been - used successfully on a PDC20265/Ultra100, allowing use of UDMA modes - when the PDC20265 BIOS has been disabled (for faster boot up). - - Please read the comments at the top of - file:drivers/ide/pci/pdc202xx_old.c. - - If unsure, say N. - config BLK_DEV_PDC202XX_NEW tristate PROMISE PDC202{68|69|70|71|75|76|77} support select BLK_DEV_IDEDMA_PCI @@ -1016,7 +1003,7 @@ config BLK_DEV_Q40IDE config BLK_DEV_PALMCHIP_BK3710 tristate Palmchip bk3710 IDE controller support depends on ARCH_DAVINCI - select BLK_DEV_IDEDMA_PCI + select BLK_DEV_IDEDMA_SFF help Say Y here if you want to support the onchip IDE controller on the TI DaVinci SoC @@ -1124,7 +,8 @@ config BLK_DEV_UMC8672 endif config BLK_DEV_IDEDMA - def_bool BLK_DEV_IDEDMA_PCI || BLK_DEV_IDEDMA_PMAC || BLK_DEV_IDEDMA_ICS || BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA + def_bool BLK_DEV_IDEDMA_SFF || BLK_DEV_IDEDMA_PMAC || \ +BLK_DEV_IDEDMA_ICS || BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA config IDE_ARCH_OBSOLETE_INIT def_bool ALPHA || (ARM !ARCH_L7200) || BLACKFIN || X86 || IA64 || M32R || MIPS || PARISC || PPC || (SUPERH64 BLK_DEV_IDEPCI) || SPARC diff --git
[git patches] IDE fixes
cmd64x regression bugfix, few obvious ide-cd fixes from the redux patch peries and ide-cd MAINTAINERS entry update (Borislav, welcome on board!). Oh yes, I would forget... Merry Christmas! Linus, please pull from: master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git/ to receive the following updates: MAINTAINERS |4 ++- drivers/ide/ide-cd.c | 66 +++-- drivers/ide/ide-cd.h |3 +- drivers/ide/pci/cmd64x.c |4 +- drivers/ide/pci/cs5535.c |2 +- 5 files changed, 42 insertions(+), 37 deletions(-) Bartlomiej Zolnierkiewicz (10): ide-cd: fix SAMSUNG CD-ROM SCR-3231 quirk ide-cd: fix ACER/AOpen 24X CDROM speed reporting on big-endian machines ide-cd: use ide_cd_release() in ide_cd_probe() ide-cd: fix error messages in cdrom_{read,write}_check_ireason() ide-cd: add missing 'ireason' masking to cdrom_write_intr() ide-cd: fix error messages in cdrom_write_intr() ide-cd: add error message for DMA error to cdrom_read_intr() ide-cd: fix error message in cdrom_pc_intr() ide-cd: fix 'ireason' reporting in cdrom_pc_intr() cmd64x: fix hwif-chipset setup Borislav Petkov (1): MAINTAINERS: update ide-cd entry Joe Perches (1): drivers/ide/: Spelling fixes diff --git a/MAINTAINERS b/MAINTAINERS index 3d567fd..79c711e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1870,8 +1870,10 @@ T: quilt kernel.org/pub/linux/kernel/people/bart/pata-2.6/ S: Maintained IDE/ATAPI CDROM DRIVER +P: Borislav Petkov +M: [EMAIL PROTECTED] L: linux-ide@vger.kernel.org -S: Unmaintained +S: Maintained IDE/ATAPI FLOPPY DRIVERS P: Paul Bristow diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 92ac658..c7d77f0 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -1068,8 +1068,8 @@ int cdrom_read_check_ireason (ide_drive_t *drive, int len, int ireason) return 0; else if (ireason == 0) { /* Whoops... The drive is expecting to receive data from us! */ - printk(KERN_ERR %s: read_intr: Drive wants to transfer data the - wrong way!\n, drive-name); + printk(KERN_ERR %s: %s: wrong transfer direction!\n, + drive-name, __FUNCTION__); /* Throw some data at the drive so it doesn't hang and quit this request. */ @@ -1086,8 +1086,8 @@ int cdrom_read_check_ireason (ide_drive_t *drive, int len, int ireason) return 0; } else { /* Drive wants a command packet, or invalid ireason... */ - printk(KERN_ERR %s: read_intr: bad interrupt reason %x\n, drive-name, - ireason); + printk(KERN_ERR %s: %s: bad interrupt reason 0x%02x\n, + drive-name, __FUNCTION__, ireason); } cdrom_end_request(drive, 0); @@ -1112,8 +1112,11 @@ static ide_startstop_t cdrom_read_intr (ide_drive_t *drive) */ if (dma) { info-dma = 0; - if ((dma_error = HWIF(drive)-ide_dma_end(drive))) + dma_error = HWIF(drive)-ide_dma_end(drive); + if (dma_error) { + printk(KERN_ERR %s: DMA read error\n, drive-name); ide_dma_off(drive); + } } if (cdrom_decode_status(drive, 0, stat)) @@ -1443,7 +1446,7 @@ static ide_startstop_t cdrom_pc_intr (ide_drive_t *drive) return ide_stopped; /* Read the interrupt reason and the transfer length. */ - ireason = HWIF(drive)-INB(IDE_IREASON_REG); + ireason = HWIF(drive)-INB(IDE_IREASON_REG) 0x3; lowcyl = HWIF(drive)-INB(IDE_BCOUNTL_REG); highcyl = HWIF(drive)-INB(IDE_BCOUNTH_REG); @@ -1484,7 +1487,7 @@ static ide_startstop_t cdrom_pc_intr (ide_drive_t *drive) if (thislen len) thislen = len; /* The drive wants to be written to. */ - if ((ireason 3) == 0) { + if (ireason == 0) { if (!rq-data) { blk_dump_rq_flags(rq, cdrom_pc_intr, write); goto confused; @@ -1506,9 +1509,9 @@ static ide_startstop_t cdrom_pc_intr (ide_drive_t *drive) } /* Same drill for reading. */ - else if ((ireason 3) == 2) { + else if (ireason == 2) { if (!rq-data) { - blk_dump_rq_flags(rq, cdrom_pc_intr, write); + blk_dump_rq_flags(rq, cdrom_pc_intr, read); goto confused; } /* Transfer the data. */ @@ -1632,8 +1635,8 @@ static int cdrom_write_check_ireason(ide_drive_t *drive, int len, int ireason) return 0; else if (ireason == 2) { /*
Re: [git patches] IDE fixes
[ added Linus to Cc: ] On Monday 24 December 2007, Bartlomiej Zolnierkiewicz wrote: cmd64x regression bugfix, few obvious ide-cd fixes from the redux patch peries and ide-cd MAINTAINERS entry update (Borislav, welcome on board!). Oh yes, I would forget... Merry Christmas! Well, I forgot to send this to Linus instead... :-) Linus, please pull from: master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git/ to receive the following updates: MAINTAINERS |4 ++- drivers/ide/ide-cd.c | 66 +++-- drivers/ide/ide-cd.h |3 +- drivers/ide/pci/cmd64x.c |4 +- drivers/ide/pci/cs5535.c |2 +- 5 files changed, 42 insertions(+), 37 deletions(-) Bartlomiej Zolnierkiewicz (10): ide-cd: fix SAMSUNG CD-ROM SCR-3231 quirk ide-cd: fix ACER/AOpen 24X CDROM speed reporting on big-endian machines ide-cd: use ide_cd_release() in ide_cd_probe() ide-cd: fix error messages in cdrom_{read,write}_check_ireason() ide-cd: add missing 'ireason' masking to cdrom_write_intr() ide-cd: fix error messages in cdrom_write_intr() ide-cd: add error message for DMA error to cdrom_read_intr() ide-cd: fix error message in cdrom_pc_intr() ide-cd: fix 'ireason' reporting in cdrom_pc_intr() cmd64x: fix hwif-chipset setup Borislav Petkov (1): MAINTAINERS: update ide-cd entry Joe Perches (1): drivers/ide/: Spelling fixes diff --git a/MAINTAINERS b/MAINTAINERS index 3d567fd..79c711e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1870,8 +1870,10 @@ T: quilt kernel.org/pub/linux/kernel/people/bart/pata-2.6/ S: Maintained IDE/ATAPI CDROM DRIVER +P: Borislav Petkov +M: [EMAIL PROTECTED] L: linux-ide@vger.kernel.org -S: Unmaintained +S: Maintained IDE/ATAPI FLOPPY DRIVERS P: Paul Bristow diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 92ac658..c7d77f0 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -1068,8 +1068,8 @@ int cdrom_read_check_ireason (ide_drive_t *drive, int len, int ireason) return 0; else if (ireason == 0) { /* Whoops... The drive is expecting to receive data from us! */ - printk(KERN_ERR %s: read_intr: Drive wants to transfer data the - wrong way!\n, drive-name); + printk(KERN_ERR %s: %s: wrong transfer direction!\n, + drive-name, __FUNCTION__); /* Throw some data at the drive so it doesn't hang and quit this request. */ @@ -1086,8 +1086,8 @@ int cdrom_read_check_ireason (ide_drive_t *drive, int len, int ireason) return 0; } else { /* Drive wants a command packet, or invalid ireason... */ - printk(KERN_ERR %s: read_intr: bad interrupt reason %x\n, drive-name, - ireason); + printk(KERN_ERR %s: %s: bad interrupt reason 0x%02x\n, + drive-name, __FUNCTION__, ireason); } cdrom_end_request(drive, 0); @@ -1112,8 +1112,11 @@ static ide_startstop_t cdrom_read_intr (ide_drive_t *drive) */ if (dma) { info-dma = 0; - if ((dma_error = HWIF(drive)-ide_dma_end(drive))) + dma_error = HWIF(drive)-ide_dma_end(drive); + if (dma_error) { + printk(KERN_ERR %s: DMA read error\n, drive-name); ide_dma_off(drive); + } } if (cdrom_decode_status(drive, 0, stat)) @@ -1443,7 +1446,7 @@ static ide_startstop_t cdrom_pc_intr (ide_drive_t *drive) return ide_stopped; /* Read the interrupt reason and the transfer length. */ - ireason = HWIF(drive)-INB(IDE_IREASON_REG); + ireason = HWIF(drive)-INB(IDE_IREASON_REG) 0x3; lowcyl = HWIF(drive)-INB(IDE_BCOUNTL_REG); highcyl = HWIF(drive)-INB(IDE_BCOUNTH_REG); @@ -1484,7 +1487,7 @@ static ide_startstop_t cdrom_pc_intr (ide_drive_t *drive) if (thislen len) thislen = len; /* The drive wants to be written to. */ - if ((ireason 3) == 0) { + if (ireason == 0) { if (!rq-data) { blk_dump_rq_flags(rq, cdrom_pc_intr, write); goto confused; @@ -1506,9 +1509,9 @@ static ide_startstop_t cdrom_pc_intr (ide_drive_t *drive) } /* Same drill for reading. */ - else if ((ireason 3) == 2) { + else if (ireason == 2) { if (!rq-data) { - blk_dump_rq_flags(rq, cdrom_pc_intr, write); + blk_dump_rq_flags(rq, cdrom_pc_intr, read); goto confused; } /* Transfer the data. */ @@ -1632,8 +1635,8 @@
[git patches] IDE fixes
Hi Linus, This update contains: HPT37x PIO mode timings fixes (from Sergei Shtylyov), Promise TX4 support bugfix, DMA modes reporting and validity checking fixes, -io32_bit setting race fix, addition of device model/firmware/serial entries to sysfs, some minor fixups and a few trivial patches like coding style fixes dead code removal etc. (just to keep IDE tree patchcount + me sane)... Bart Please pull from: master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git/ to receive the following updates: drivers/ide/Kconfig|6 +++- drivers/ide/ide-cd.c | 35 +--- drivers/ide/ide-disk.c | 33 +- drivers/ide/ide-dma.c | 66 drivers/ide/ide-io.c |3 +- drivers/ide/ide-iops.c |3 ++ drivers/ide/ide-lib.c | 55 -- drivers/ide/ide-probe.c| 21 ++- drivers/ide/ide.c | 30 + drivers/ide/pci/hpt366.c | 71 +++- drivers/ide/pci/pdc202xx_new.c |3 +- drivers/ide/setup-pci.c| 31 + drivers/scsi/ide-scsi.c| 17 + include/linux/ide.h|6 ++-- 14 files changed, 191 insertions(+), 189 deletions(-) Bartlomiej Zolnierkiewicz (13): ide-scsi: add ide_scsi_hex_dump() helper ide: add missing checks for control register existence ide: deprecate CONFIG_BLK_DEV_OFFBOARD ide: fix ide_scan_pcibus() error message ide: coding style fixes for drivers/ide/setup-pci.c ide: add /sys/bus/ide/devices/*/{model,firmware,serial} sysfs entries ide: DMA reporting and validity checking fixes (take 3) ide-cd: remove dead post_transform_command() pdc202xx_new: fix Promise TX4 support ide: remove dead code from __ide_dma_test_irq() ide: remove stale changelog from ide-disk.c ide: remove stale changelog from ide-probe.c ide: fix -io_32bit race in set_io_32bit() Sergei Shtylyov (1): hpt366: fix HPT37x PIO mode timings (take 2) diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 45b2228..fb06555 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig @@ -390,7 +390,7 @@ config IDEPCI_PCIBUS_ORDER # TODO: split it on per host driver config options (or module parameters) config BLK_DEV_OFFBOARD - bool Boot off-board chipsets first support + bool Boot off-board chipsets first support (DEPRECATED) depends on BLK_DEV_IDEPCI (BLK_DEV_AEC62XX || BLK_DEV_GENERIC || BLK_DEV_HPT34X || BLK_DEV_HPT366 || BLK_DEV_PDC202XX_NEW || BLK_DEV_PDC202XX_OLD || BLK_DEV_TC86C001) help Normally, IDE controllers built into the motherboard (on-board @@ -410,6 +410,10 @@ config BLK_DEV_OFFBOARD Note that, if you do this, the order of the hd* devices will be rearranged which may require modification of fstab and other files. + Please also note that this method of assuring stable naming of + IDE devices is unreliable and use other means for achieving it + (i.e. udev). + If in doubt, say N. config BLK_DEV_GENERIC diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 57a5f63..92ac658 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -1650,31 +1650,6 @@ static int cdrom_write_check_ireason(ide_drive_t *drive, int len, int ireason) return 1; } -static void post_transform_command(struct request *req) -{ - u8 *c = req-cmd; - char *ibuf; - - if (!blk_pc_request(req)) - return; - - if (req-bio) - ibuf = bio_data(req-bio); - else - ibuf = req-data; - - if (!ibuf) - return; - - /* -* set ansi-revision and response data as atapi -*/ - if (c[0] == GPCMD_INQUIRY) { - ibuf[2] |= 2; - ibuf[3] = (ibuf[3] 0xf0) | 2; - } -} - typedef void (xfer_func_t)(ide_drive_t *, void *, u32); /* @@ -1810,9 +1785,6 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) return ide_started; end_request: - if (!rq-data_len) - post_transform_command(rq); - spin_lock_irqsave(ide_lock, flags); blkdev_dequeue_request(rq); end_that_request_last(rq, 1); @@ -3049,12 +3021,7 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive) else printk( drive); - printk(, %dkB Cache, be16_to_cpu(cap.buffer_size)); - - if (drive-using_dma) - ide_dma_verbose(drive); - - printk(\n); + printk(KERN_CONT , %dkB Cache\n, be16_to_cpu(cap.buffer_size)); return nslots; } diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 00123d9..b178190 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c @@ -13,32 +13,6 @@ *and Andre
[git patches] IDE fixes
Please pull from: master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git/ to receive the following updates: arch/cris/arch-v10/drivers/Kconfig | 39 - arch/cris/arch-v32/drivers/Kconfig | 12 - drivers/ide/Kconfig| 47 ++- drivers/ide/Makefile |2 +- drivers/ide/cris/ide-cris.c|7 +++-- drivers/ide/ide-dma.c |1 + drivers/ide/ide-iops.c | 13 +++--- drivers/ide/ide-probe.c| 32 ++-- drivers/ide/legacy/ali14xx.c |7 +++-- drivers/ide/legacy/macide.c|2 +- drivers/ide/legacy/q40ide.c|2 +- drivers/ide/pci/aec62xx.c | 11 +++- drivers/ide/pci/alim15x3.c |5 drivers/ide/pci/piix.c |1 + drivers/ide/pci/siimage.c | 45 +- drivers/ide/pci/sis5513.c |1 + drivers/ide/pci/trm290.c |3 -- drivers/ide/ppc/pmac.c |2 +- drivers/scsi/ide-scsi.c| 22 ++-- 19 files changed, 112 insertions(+), 142 deletions(-) Aleksandar Radovanovic (1): aec62xx: Fix kernel oops in driver's probe function Andrew Morton (1): amd74xx: arm hack Bartlomiej Zolnierkiewicz (11): macide/q40ide: add missing __init tag to {macide,q40ide}_init() ide/Kconfig: fix mpc8xx host driver dependencies ide: add CONFIG_IDE_H8300 config option ide: move CONFIG_IDE_ETRAX to drivers/ide/Kconfig ide-cris: don't override ide_register_hw() result ide: add TORiSAN model: CD-ROM CDR_U200 fw: 1.09 to DMA blacklist alim15x3: add Mitac 8317 and derivatives to ali_cable_override() piix: add HP compaq laptop to short cable list trm290: remove bogus init_hwif_trm290() comment ide: remove bogus ide_fix_driveid() comment ali14xx: constify __initdata Denis Cheng (1): ide-scsi: use print_hex_dump from linux/kernel.h Gabriel Craciunescu (1): sis5513.c: Add Packard Bell EasyNote K5305 to laptops Joe Perches (1): drivers/ide: Add missing space Jonas Stare (1): ide: skip ide_wait_not_busy() on noprobe-disks Peter Missel (1): ide: More TSST drives with broken cable detection Sergei Shtylyov (2): ide: don't set PIO mode on pre-EIDE drives siimage: remove resetproc() method diff --git a/arch/cris/arch-v10/drivers/Kconfig b/arch/cris/arch-v10/drivers/Kconfig index faf8b4d..e3c0f29 100644 --- a/arch/cris/arch-v10/drivers/Kconfig +++ b/arch/cris/arch-v10/drivers/Kconfig @@ -542,45 +542,6 @@ config ETRAX_RS485_DISABLE_RECEIVER loopback. Not all products are able to do this in software only. Axis 2400/2401 must disable receiver. -config ETRAX_IDE - bool ATA/IDE support - select IDE - select BLK_DEV_IDE - select BLK_DEV_IDEDISK - select BLK_DEV_IDECD - select BLK_DEV_IDEDMA - select IDE_GENERIC - help - Enable this to get support for ATA/IDE. - You can't use parallel ports or SCSI ports - at the same time. - - -config ETRAX_IDE_DELAY - int Delay for drives to regain consciousness - depends on ETRAX_IDE - default 15 - help - Number of seconds to wait for IDE drives to spin up after an IDE - reset. -choice - prompt IDE reset pin - depends on ETRAX_IDE - default ETRAX_IDE_PB7_RESET - -config ETRAX_IDE_PB7_RESET - bool Port_PB_Bit_7 - help - IDE reset on pin 7 on port B - -config ETRAX_IDE_G27_RESET - bool Port_G_Bit_27 - help - IDE reset on pin 27 on port G - -endchoice - - config ETRAX_USB_HOST bool USB host select USB diff --git a/arch/cris/arch-v32/drivers/Kconfig b/arch/cris/arch-v32/drivers/Kconfig index 7f72d7c..9bccb5e 100644 --- a/arch/cris/arch-v32/drivers/Kconfig +++ b/arch/cris/arch-v32/drivers/Kconfig @@ -582,18 +582,6 @@ config ETRAX_PE_CHANGEABLE_BITS that a user can change the value on using ioctl's. Bit set = changeable. -config ETRAX_IDE - bool ATA/IDE support - depends on ETRAX_ARCH_V32 - select IDE - select BLK_DEV_IDE - select BLK_DEV_IDEDISK - select BLK_DEV_IDECD - select BLK_DEV_IDEDMA - select IDE_GENERIC - help - Enables the ETRAX IDE driver. - config ETRAX_CARDBUS bool Cardbus support depends on ETRAX_ARCH_V32 diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index e445fe6..45b2228 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig @@ -313,7 +313,6 @@ comment IDE chipset support/bugfixes config IDE_GENERIC tristate generic/default IDE chipset support - default H8300 help If unsure, say N. @@ -484,6 +483,7 @@ config WDC_ALI15X3 config BLK_DEV_AMD74XX tristate AMD and nVidia IDE
[git patches] IDE fixes
Contains cmd64x regression fix from Sergei + some minor fixes. Please pull from: master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git/ to receive the following updates: drivers/ide/Kconfig |4 drivers/ide/cris/ide-cris.c |3 +-- drivers/ide/ide-io.c|6 +- drivers/ide/ide-lib.c |1 + drivers/ide/pci/cmd64x.c|5 +++-- drivers/ide/pci/cs5530.c|3 +-- drivers/ide/pci/it821x.c|3 +-- drivers/ide/pci/jmicron.c |3 +-- drivers/ide/pci/sc1200.c|3 +-- drivers/ide/pci/sis5513.c |1 - drivers/ide/ppc/pmac.c |1 + drivers/ide/setup-pci.c |5 - 12 files changed, 11 insertions(+), 27 deletions(-) Adrian Bunk (1): ide: BLK_DEV_IDECD help: remove outdated note Bartlomiej Zolnierkiewicz (6): ide-pmac: skip conservative PIO downgrade ide: add missing HOB bit clearing to ide_dump_ata_status() ide: use drive-select.all for REQ_TYPE_ATA_TASK in execute_drive_cmd() ide: don't BUG() on unsupported transfer modes it821x/jmicron: fix return value of {it821x,jmicron}_init_one() ide: remove stale/incorrect comment from setup-pci.c Sergei Shtylyov (1): cmd64x: don't clear the other channel's interrupt diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index d1e8df1..e445fe6 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig @@ -203,10 +203,6 @@ config BLK_DEV_IDECD CD-ROM drive, you can say N to all other CD-ROM options, but be sure to say Y or M to ISO 9660 CD-ROM file system support. - Note that older versions of LILO (LInux LOader) cannot properly deal - with IDE/ATAPI CD-ROMs, so install LILO 16 or higher, available from - http://lilo.go.dyndns.org/. - To compile this driver as a module, choose M here: the module will be called ide-cd. diff --git a/drivers/ide/cris/ide-cris.c b/drivers/ide/cris/ide-cris.c index e196aef..7f5bc2e 100644 --- a/drivers/ide/cris/ide-cris.c +++ b/drivers/ide/cris/ide-cris.c @@ -748,8 +748,7 @@ static void cris_set_dma_mode(ide_drive_t *drive, const u8 speed) hold = ATA_DMA2_HOLD; break; default: - BUG(); - break; + return; } if (speed = XFER_UDMA_0) diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 7550118..db22d1f 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c @@ -885,7 +885,6 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive, return do_rw_taskfile(drive, args); } else if (rq-cmd_type == REQ_TYPE_ATA_TASK) { u8 *args = rq-buffer; - u8 sel; if (!args) goto done; @@ -903,10 +902,7 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive, hwif-OUTB(args[3], IDE_SECTOR_REG); hwif-OUTB(args[4], IDE_LCYL_REG); hwif-OUTB(args[5], IDE_HCYL_REG); - sel = (args[6] ~0x10); - if (drive-select.b.unit) - sel |= 0x10; - hwif-OUTB(sel, IDE_SELECT_REG); + hwif-OUTB((args[6] 0xEF)|drive-select.all, IDE_SELECT_REG); ide_cmd(drive, args[0], args[2], drive_cmd_intr); return ide_started; } else if (rq-cmd_type == REQ_TYPE_ATA_CMD) { diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c index af86433..1609b86 100644 --- a/drivers/ide/ide-lib.c +++ b/drivers/ide/ide-lib.c @@ -514,6 +514,7 @@ static u8 ide_dump_ata_status(ide_drive_t *drive, const char *msg, u8 stat) if (drive-addressing == 1) { __u64 sectors = 0; u32 low = 0, high = 0; + hwif-OUTB(drive-ctl~0x80, IDE_CONTROL_REG); low = ide_read_24(drive); hwif-OUTB(drive-ctl|0x80, IDE_CONTROL_REG); high = ide_read_24(drive); diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c index ea0143e..51fca44 100644 --- a/drivers/ide/pci/cmd64x.c +++ b/drivers/ide/pci/cmd64x.c @@ -1,5 +1,5 @@ /* - * linux/drivers/ide/pci/cmd64x.c Version 1.50May 10, 2007 + * linux/drivers/ide/pci/cmd64x.c Version 1.51Nov 8, 2007 * * cmd64x.c: Enable interrupts at initialization time on Ultra/PCI machines. * Due to massive hardware bugs, UltraDMA is only supported @@ -339,7 +339,8 @@ static int cmd648_ide_dma_end (ide_drive_t *drive) u8 mrdmode = inb(hwif-dma_master + 0x01); /* clear the interrupt bit */ - outb(mrdmode | irq_mask, hwif-dma_master + 0x01); + outb((mrdmode ~(MRDMODE_INTR_CH0 | MRDMODE_INTR_CH1)) | irq_mask, +hwif-dma_master + 0x01);
[git patches] 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/Kconfig| 22 ++ drivers/ide/ide-dma.c |5 +++-- drivers/ide/ide-io.c |5 - drivers/ide/ide-iops.c |8 ++-- drivers/ide/ide-probe.c|5 +++-- drivers/ide/ide-taskfile.c |3 +++ drivers/ide/pci/piix.c |1 + include/linux/ide.h|9 + 8 files changed, 39 insertions(+), 19 deletions(-) Adrian Bunk (1): ide: unexport ide_fix_driveid Bartlomiej Zolnierkiewicz (8): ide/Kconfig: fix BLK_DEV_OFFBOARD dependencies ide: check rq-cmd_type in drive_cmd_intr() ide: clear HOB bit for REQ_TYPE_ATA_TASK requests in ide_end_drive_cmd() ide: add missing rq.ref_count initialization to ide_diag_taskfile() ide: fix ide_find_dma_mode() to print human-readable info ide: add missing #ifdef/#endif CONFIG_IDE_TASK_IOCTL ide: move ide_fixstring() documentation to ide-iops.c from ide.h ide: fix IDE_HFLAG_NO_ATAPI_DMA handling in config_drive_for_dma() Matti Linnanvuori (1): ide/Kconfig: add IDEDISK_MULTI_MODE text adapted from hdparm manual page Tejun Heo (1): ide: do_identify() string termination fix [EMAIL PROTECTED] (1): piix: add support for ICH7 on Acer 5602aWLMi diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 6eaece9..d1e8df1 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig @@ -152,9 +152,22 @@ config BLK_DEV_IDEDISK If unsure, say Y. config IDEDISK_MULTI_MODE - bool Use multi-mode by default - help - If you get this error, try to say Y here: + bool Use multiple sector mode for Programmed Input/Output by default + help + This setting is irrelevant for most IDE disks, with direct memory + access, to which multiple sector mode does not apply. Multiple sector + mode is a feature of most modern IDE hard drives, permitting the + transfer of multiple sectors per Programmed Input/Output interrupt, + rather than the usual one sector per interrupt. When this feature is + enabled, it can reduce operating system overhead for disk Programmed + Input/Output. On some systems, it also can increase the data + throughput of Programmed Input/Output. Some drives, however, seemed + to run slower with multiple sector mode enabled. Some drives claimed + to support multiple sector mode, but lost data at some settings. + Under rare circumstances, such failures could result in massive + filesystem corruption. + + If you get the following error, try to say Y here: hda: set_multmode: status=0x51 { DriveReady SeekComplete Error } hda: set_multmode: error=0x04 { DriveStatusError } @@ -380,9 +393,10 @@ config IDEPCI_SHARE_IRQ config IDEPCI_PCIBUS_ORDER def_bool BLK_DEV_IDE=y BLK_DEV_IDEPCI +# TODO: split it on per host driver config options (or module parameters) config BLK_DEV_OFFBOARD bool Boot off-board chipsets first support - depends on BLK_DEV_IDEPCI + depends on BLK_DEV_IDEPCI (BLK_DEV_AEC62XX || BLK_DEV_GENERIC || BLK_DEV_HPT34X || BLK_DEV_HPT366 || BLK_DEV_PDC202XX_NEW || BLK_DEV_PDC202XX_OLD || BLK_DEV_TC86C001) help Normally, IDE controllers built into the motherboard (on-board controllers) are assigned to ide0 and ide1 while those on add-in PCI diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 428f7a8..e3add70 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c @@ -340,7 +340,7 @@ static int config_drive_for_dma (ide_drive_t *drive) if (drive-media != ide_disk) { if (hwif-host_flags IDE_HFLAG_NO_ATAPI_DMA) - return -1; + return 0; } /* @@ -752,7 +752,8 @@ u8 ide_find_dma_mode(ide_drive_t *drive, u8 req_mode) mode = XFER_MW_DMA_1; } - printk(KERN_DEBUG %s: selected mode 0x%x\n, drive-name, mode); + printk(KERN_DEBUG %s: %s mode selected\n, drive-name, + mode ? ide_xfer_verbose(mode) : no DMA); return min(mode, req_mode); } diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index c89f0d3..7550118 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c @@ -340,6 +340,8 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err) if (args) { args[0] = stat; args[1] = err; + /* be sure we're looking at the low order bits */ + hwif-OUTB(drive-ctl ~0x80, IDE_CONTROL_REG); args[2] = hwif-INB(IDE_NSECTOR_REG); args[3] = hwif-INB(IDE_SECTOR_REG); args[4] = hwif-INB(IDE_LCYL_REG); @@ -654,7 +656,8 @@ static
[git patches] 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/ide-iops.c |3 +++ drivers/ide/pci/cy82c693.c |6 +++--- drivers/ide/pci/generic.c |2 +- drivers/ide/pci/hpt366.c | 32 drivers/ide/pci/sc1200.c |9 + 5 files changed, 28 insertions(+), 24 deletions(-) Bartlomiej Zolnierkiewicz (4): cy82c693: fix build for CONFIG_HOTPLUG=n hpt366: fix build for CONFIG_HOTPLUG=n drivers/ide/pci/generic: fix build for CONFIG_HOTPLUG=n ide: add SH-S202J to ivb_list[] Jeff Garzik (1): drivers/ide/pci/sc1200.c: fix suspend/resume buglets and warnings diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index 9516883..dcda0f1 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c @@ -582,9 +582,12 @@ EXPORT_SYMBOL_GPL(ide_in_drive_list); /* * Early UDMA66 devices don't set bit14 to 1, only bit13 is valid. * We list them here and depend on the device side cable detection for them. + * + * Some optical devices with the buggy firmwares have the same problem. */ static const struct drive_list_entry ivb_list[] = { { QUANTUM FIREBALLlct10 05, A03.0900}, + { TSSTcorp CDDVDW SH-S202J, SB00}, { NULL , NULL } }; diff --git a/drivers/ide/pci/cy82c693.c b/drivers/ide/pci/cy82c693.c index 3ef4fc1..1cd4e9c 100644 --- a/drivers/ide/pci/cy82c693.c +++ b/drivers/ide/pci/cy82c693.c @@ -1,5 +1,5 @@ /* - * linux/drivers/ide/pci/cy82c693.cVersion 0.41Aug 27, 2007 + * linux/drivers/ide/pci/cy82c693.cVersion 0.42Oct 23, 2007 * * Copyright (C) 1998-2000 Andreas S. Krebs ([EMAIL PROTECTED]), Maintainer * Copyright (C) 1998-2002 Andre Hedrick [EMAIL PROTECTED], Integrator @@ -436,10 +436,10 @@ static void __devinit init_hwif_cy82c693(ide_hwif_t *hwif) hwif-ide_dma_on = cy82c693_ide_dma_on; } -static __devinitdata ide_hwif_t *primary; - static void __devinit init_iops_cy82c693(ide_hwif_t *hwif) { + static ide_hwif_t *primary; + if (PCI_FUNC(hwif-pci_dev-devfn) == 1) primary = hwif; else { diff --git a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c index f44d708..0688569 100644 --- a/drivers/ide/pci/generic.c +++ b/drivers/ide/pci/generic.c @@ -49,7 +49,7 @@ static int __init ide_generic_all_on(char *unused) printk(KERN_INFO IDE generic will claim all unknown PCI IDE storage controllers.\n); return 1; } -__setup(all-generic-ide, ide_generic_all_on); +const __setup(all-generic-ide, ide_generic_all_on); #endif module_param_named(all_generic_ide, ide_generic_all, bool, 0444); MODULE_PARM_DESC(all_generic_ide, IDE generic will claim all unknown PCI IDE storage controllers.); diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 612b795..5682895 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c @@ -1,5 +1,5 @@ /* - * linux/drivers/ide/pci/hpt366.c Version 1.20Oct 1, 2007 + * linux/drivers/ide/pci/hpt366.c Version 1.21Oct 23, 2007 * * Copyright (C) 1999-2003 Andre Hedrick [EMAIL PROTECTED] * Portions Copyright (C) 2001 Sun Microsystems, Inc. @@ -433,7 +433,7 @@ static u32 *hpt37x_settings[NUM_ATA_CLOCKS] = { sixty_six_base_hpt37x }; -static struct hpt_info hpt36x __devinitdata = { +static const struct hpt_info hpt36x __devinitdata = { .chip_name = HPT36x, .chip_type = HPT36x, .udma_mask = HPT366_ALLOW_ATA66_3 ? (HPT366_ALLOW_ATA66_4 ? ATA_UDMA4 : ATA_UDMA3) : ATA_UDMA2, @@ -441,7 +441,7 @@ static struct hpt_info hpt36x __devinitdata = { .settings = hpt36x_settings }; -static struct hpt_info hpt370 __devinitdata = { +static const struct hpt_info hpt370 __devinitdata = { .chip_name = HPT370, .chip_type = HPT370, .udma_mask = HPT370_ALLOW_ATA100_5 ? ATA_UDMA5 : ATA_UDMA4, @@ -449,7 +449,7 @@ static struct hpt_info hpt370 __devinitdata = { .settings = hpt37x_settings }; -static struct hpt_info hpt370a __devinitdata = { +static const struct hpt_info hpt370a __devinitdata = { .chip_name = HPT370A, .chip_type = HPT370A, .udma_mask = HPT370_ALLOW_ATA100_5 ? ATA_UDMA5 : ATA_UDMA4, @@ -457,7 +457,7 @@ static struct hpt_info hpt370a __devinitdata = { .settings = hpt37x_settings }; -static struct hpt_info hpt374 __devinitdata = { +static const struct hpt_info hpt374 __devinitdata = { .chip_name = HPT374, .chip_type = HPT374, .udma_mask = ATA_UDMA5, @@ -465,7 +465,7 @@ static struct hpt_info hpt374 __devinitdata = { .settings = hpt37x_settings }; -static struct hpt_info hpt372 __devinitdata = { +static const struct hpt_info hpt372 __devinitdata
[git patches] 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/ide-disk.c |1 + drivers/ide/ppc/pmac.c |2 -- 2 files changed, 1 insertions(+), 2 deletions(-) Jorge Juan Chico (1): ide: ST320413A has the same problem as ST340823A Stephen Rothwell (1): ide: remove unused variables from drivers/ide/ppc/pmac.c diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index eba1adb..4754769 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c @@ -487,6 +487,7 @@ static inline int idedisk_supports_lba48(const struct hd_driveid *id) */ static const struct drive_list_entry hpa_list[] = { { ST340823A, NULL }, + { ST320413A, NULL }, { NULL, NULL } }; diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index 4b13cd9..f19eb6d 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c @@ -1802,9 +1802,7 @@ pmac_ide_dma_check(ide_drive_t *drive) { struct hd_driveid *id = drive-id; ide_hwif_t *hwif = HWIF(drive); - pmac_ide_hwif_t* pmif = (pmac_ide_hwif_t *)hwif-hwif_data; int enable = 1; - int map; drive-using_dma = 0; if (drive-media == ide_floppy) - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[git patches] IDE fixes for 2.6.23-rc6
Please pull from: master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git/ to receive the following updates: drivers/ata/pata_ali.c |7 ++ drivers/ide/Kconfig|4 +- drivers/ide/ide-iops.c |3 +- drivers/ide/pci/alim15x3.c |7 ++ drivers/ide/pci/hpt366.c | 138 +++- drivers/ide/pci/pdc202xx_new.c |9 ++- drivers/ide/pci/via82cxxx.c| 15 +++- drivers/ide/ppc/mpc8xx.c |1 - drivers/ide/setup-pci.c| 41 +--- include/linux/ide.h| 13 10 files changed, 141 insertions(+), 97 deletions(-) Bartlomiej Zolnierkiewicz (1): via82cxxx: add Arima W730-K8 and other rebadgings to short cables list Daniel Exner (1): pata_ali/alim15x3: override 80-wire cable detection for Toshiba S1800-814 Kumar Gala (1): mpc8xx: Only build mpc8xx on arch/ppc Mikael Pettersson (1): pdc202xx_new: PLL detection fix Sergei Shtylyov (5): ide: fix PCI refcounting pdc202xx_new: fix PCI refcounting hpt366: fix PCI clock detection for HPT374 (take 4) ide: add ide_dev_is_sata() helper (take 2) hpt366: UltraDMA filter for SATA cards (take 2) Tony Breeds (1): pmac: build fix diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c index 94e5edc..71bdc3b 100644 --- a/drivers/ata/pata_ali.c +++ b/drivers/ata/pata_ali.c @@ -48,6 +48,13 @@ static struct dmi_system_id cable_dmi_table[] = { DMI_MATCH(DMI_BOARD_VERSION, OmniBook N32N-736), }, }, + { + .ident = Toshiba Satelite S1800-814, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, TOSHIBA), + DMI_MATCH(DMI_PRODUCT_NAME, S1800-814), + }, + }, { } }; diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 7adb61b..4200251 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig @@ -781,7 +781,7 @@ endif config BLK_DEV_IDE_PMAC bool Builtin PowerMac IDE support - depends on PPC_PMAC IDE=y + depends on PPC_PMAC IDE=y BLK_DEV_IDE=y help This driver provides support for the built-in IDE controller on most of the recent Apple Power Macintoshes and PowerBooks. @@ -946,7 +946,7 @@ config BLK_DEV_Q40IDE config BLK_DEV_MPC8xx_IDE bool MPC8xx IDE support - depends on 8xx IDE=y BLK_DEV_IDE=y + depends on 8xx IDE=y BLK_DEV_IDE=y !PPC_MERGE select IDE_GENERIC help This option provides support for IDE on Motorola MPC8xx Systems. diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index f4cd270..646a54e 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c @@ -615,8 +615,7 @@ u8 eighty_ninty_three (ide_drive_t *drive) if (hwif-cbl != ATA_CBL_PATA80 !ivb) goto no_80w; - /* Check for SATA but only if we are ATA5 or higher */ - if (id-hw_config == 0 (id-major_rev_num 0x7FE0)) + if (ide_dev_is_sata(id)) return 1; /* diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index 025689d..11ecb61 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c @@ -596,6 +596,13 @@ static struct dmi_system_id cable_dmi_table[] = { DMI_MATCH(DMI_BOARD_VERSION, OmniBook N32N-736), }, }, + { + .ident = Toshiba Satellite S1800-814, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, TOSHIBA), + DMI_MATCH(DMI_PRODUCT_NAME, S1800-814), + }, + }, { } }; diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 2cd74c3..39f1c89 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c @@ -1,5 +1,5 @@ /* - * linux/drivers/ide/pci/hpt366.c Version 1.10Jun 29, 2007 + * linux/drivers/ide/pci/hpt366.c Version 1.12Aug 19, 2007 * * Copyright (C) 1999-2003 Andre Hedrick [EMAIL PROTECTED] * Portions Copyright (C) 2001 Sun Microsystems, Inc. @@ -68,7 +68,8 @@ * HPT37x chip family; save space by introducing the separate transfer mode * table in which the mode lookup is done * - use f_CNT value saved by the HighPoint BIOS as reading it directly gives - * the wrong PCI frequency since DPLL has already been calibrated by BIOS + * the wrong PCI frequency since DPLL has already been calibrated by BIOS; + * read it only from the function 0 of HPT374 chips * - fix the hotswap code: it caused RESET- to glitch when tristating the bus, * and for HPT36x the obsolete HDIO_TRISTATE_HWIF handler was called instead * - pass to init_chipset() handlers a copy of the IDE PCI device structure as @@ -113,6 +114,7 @@ * unify HPT36x/37x timing setup code and the speedproc handlers by joining * the register
Re: [git patches] IDE fixes for 2.6.23-rc6
Bartlomiej Zolnierkiewicz wrote: Please pull from: master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git/ to receive the following updates: drivers/ata/pata_ali.c |7 ++ drivers/ide/Kconfig|4 +- drivers/ide/ide-iops.c |3 +- drivers/ide/pci/alim15x3.c |7 ++ drivers/ide/pci/hpt366.c | 138 +++- drivers/ide/pci/pdc202xx_new.c |9 ++- drivers/ide/pci/via82cxxx.c| 15 +++- drivers/ide/ppc/mpc8xx.c |1 - drivers/ide/setup-pci.c| 41 +--- include/linux/ide.h| 13 10 files changed, 141 insertions(+), 97 deletions(-) Bartlomiej Zolnierkiewicz (1): via82cxxx: add Arima W730-K8 and other rebadgings to short cables list Daniel Exner (1): pata_ali/alim15x3: override 80-wire cable detection for Toshiba S1800-814 Kumar Gala (1): mpc8xx: Only build mpc8xx on arch/ppc Mikael Pettersson (1): pdc202xx_new: PLL detection fix Sergei Shtylyov (5): ide: fix PCI refcounting pdc202xx_new: fix PCI refcounting hpt366: fix PCI clock detection for HPT374 (take 4) ide: add ide_dev_is_sata() helper (take 2) hpt366: UltraDMA filter for SATA cards (take 2) Tony Breeds (1): pmac: build fix diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c index 94e5edc..71bdc3b 100644 --- a/drivers/ata/pata_ali.c +++ b/drivers/ata/pata_ali.c @@ -48,6 +48,13 @@ static struct dmi_system_id cable_dmi_table[] = { DMI_MATCH(DMI_BOARD_VERSION, OmniBook N32N-736), }, }, + { + .ident = Toshiba Satelite S1800-814, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, TOSHIBA), + DMI_MATCH(DMI_PRODUCT_NAME, S1800-814), + }, + }, { } }; ACK - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[git patches] IDE fixes
Please pull from: master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git/ to receive the following updates: arch/cris/arch-v10/drivers/Kconfig |1 + arch/cris/arch-v32/drivers/Kconfig |1 + drivers/ide/Kconfig| 12 - drivers/ide/cris/ide-cris.c|2 + drivers/ide/ide-disk.c | 18 ++ drivers/ide/ide-dma.c | 45 drivers/ide/ide-iops.c | 45 drivers/ide/pci/cs5530.c |8 +- drivers/ide/pci/hpt34x.c |6 +--- drivers/ide/pci/ns87415.c |9 --- drivers/ide/pci/pdc202xx_new.c | 10 ++- drivers/ide/pci/pdc202xx_old.c |9 -- drivers/ide/pci/triflex.c |3 ++ drivers/ide/ppc/pmac.c | 14 ++ include/linux/ide.h|4 +- 15 files changed, 113 insertions(+), 74 deletions(-) Bartlomiej Zolnierkiewicz (12): ide: fix hidden dependencies on CONFIG_IDE_GENERIC ide-cris: fix -set_pio_mode method to set transfer mode on the device ide: config_drive_for_dma() fixes ide-pmac: fix drive-init_speed reporting ide: add cable detection for early UDMA66 devices (take 3) ide: ide_config_drive_speed() bugfixes cs5530: add missing -dma_base check pdc202xx_new: add missing -dma_base check pdc202xx_old: add missing -dma_base check triflex: add missing -dma_base check hpt34x: fix CONFIG_HPT34X_AUTODMA=n handling ide-disk: workaround for buggy HPA support on ST340823A (take 3) Tejun Heo (1): ide: make CONFIG_IDE_GENERIC default to N diff --git a/arch/cris/arch-v10/drivers/Kconfig b/arch/cris/arch-v10/drivers/Kconfig index e7e724b..03e2e68 100644 --- a/arch/cris/arch-v10/drivers/Kconfig +++ b/arch/cris/arch-v10/drivers/Kconfig @@ -548,6 +548,7 @@ config ETRAX_IDE select BLK_DEV_IDEDISK select BLK_DEV_IDECD select BLK_DEV_IDEDMA + select IDE_GENERIC help Enable this to get support for ATA/IDE. You can't use parallel ports or SCSI ports diff --git a/arch/cris/arch-v32/drivers/Kconfig b/arch/cris/arch-v32/drivers/Kconfig index 1d859c1..cc6ba54 100644 --- a/arch/cris/arch-v32/drivers/Kconfig +++ b/arch/cris/arch-v32/drivers/Kconfig @@ -592,6 +592,7 @@ config ETRAX_IDE select BLK_DEV_IDEDISK select BLK_DEV_IDECD select BLK_DEV_IDEDMA + select IDE_GENERIC help Enables the ETRAX IDE driver. diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index e049f65..7adb61b 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig @@ -304,9 +304,9 @@ comment IDE chipset support/bugfixes config IDE_GENERIC tristate generic/default IDE chipset support - default y + default H8300 help - If unsure, say Y. + If unsure, say N. config BLK_DEV_CMD640 bool CMD640 chipset bugfix/support @@ -345,6 +345,7 @@ config BLK_DEV_CMD640_ENHANCED config BLK_DEV_IDEPNP bool PNP EIDE support depends on PNP + select IDE_GENERIC help If you have a PnP (Plug and Play) compatible EIDE card and would like the kernel to automatically detect and activate @@ -834,6 +835,7 @@ config BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ config IDE_ARM def_bool ARM (ARCH_CLPS7500 || ARCH_RPC || ARCH_SHARK) + select IDE_GENERIC config BLK_DEV_IDE_ICSIDE tristate ICS IDE interface support @@ -867,6 +869,7 @@ config BLK_DEV_IDE_BAST config BLK_DEV_GAYLE bool Amiga Gayle IDE interface support depends on AMIGA + select IDE_GENERIC help This is the IDE driver for the Amiga Gayle IDE interface. It supports both the `A1200 style' and `A4000 style' of the Gayle IDE interface, @@ -898,6 +901,7 @@ config BLK_DEV_IDEDOUBLER config BLK_DEV_BUDDHA bool Buddha/Catweasel/X-Surf IDE interface support (EXPERIMENTAL) depends on ZORRO EXPERIMENTAL + select IDE_GENERIC help This is the IDE driver for the IDE interfaces on the Buddha, Catweasel and X-Surf expansion boards. It supports up to two interfaces @@ -910,6 +914,7 @@ config BLK_DEV_BUDDHA config BLK_DEV_FALCON_IDE bool Falcon IDE interface support depends on ATARI + select IDE_GENERIC help This is the IDE driver for the builtin IDE interface on the Atari Falcon. Say Y if you have a Falcon and want to use IDE devices (hard @@ -919,6 +924,7 @@ config BLK_DEV_FALCON_IDE config BLK_DEV_MAC_IDE bool Macintosh Quadra/Powerbook IDE interface support depends on MAC + select IDE_GENERIC help This is the IDE driver for the builtin IDE interface on some m68k Macintosh models. It supports both the `Quadra style' (used in @@ -932,6 +938,7 @@ config
[git patches] 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 fixes David 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 diff --git a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c index c89b5f4..8a9b98f 100644 --- a/drivers/ide/arm/icside.c +++ b/drivers/ide/arm/icside.c @@ -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; diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index e82bfa5..1fa5794 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -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; diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index 5511c86..025689d 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c @@ -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), }, }, { } diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c index 19633c5..0e3b5de 100644 --- a/drivers/ide/pci/cmd64x.c +++ b/drivers/ide/pci/cmd64x.c @@ -475,11 +475,11 @@ static unsigned int __devinit init_chipset_cmd64x(struct pci_dev *dev, const cha switch (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, diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c index bccedf9..b89e816 100644 --- a/drivers/ide/pci/cs5520.c +++ b/drivers/ide/pci/cs5520.c @@ -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; diff --git a/drivers/ide/pci/cs5535.c b/drivers/ide/pci/cs5535.c index ce44e38..082ca7d 100644 --- a/drivers/ide/pci/cs5535.c +++ b/drivers/ide/pci/cs5535.c @@ -2,6 +2,7 @@ * linux/drivers/ide/pci/cs5535.c * * Copyright (C) 2004-2005 Advanced Micro Devices, Inc. + * Copyright (C) 2007 Bartlomiej Zolnierkiewicz * * History: * 09/20/2005 - Jaya Kumar [EMAIL PROTECTED] @@ -83,14 +84,17 @@ static void cs5535_set_speed(ide_drive_t *drive, u8 speed) /* Set the PIO timings */ if ((speed XFER_MODE) ==
[git patches] 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/ide-probe.c|4 ++-- drivers/ide/ide-taskfile.c | 12 drivers/ide/pci/amd74xx.c |8 +++- drivers/ide/pci/hpt366.c | 21 - drivers/ide/pci/it821x.c |3 +-- drivers/ide/pci/pdc202xx_new.c | 10 -- drivers/ide/setup-pci.c| 10 +++--- 7 files changed, 45 insertions(+), 23 deletions(-) Alan Cox (1): ide: Fix a theoretical Ooops case Albert Lee (1): ide: pdc202xx_new PLL input clock fix Andrew Morton (1): ide: ide_scan_pcibus(): check __pci_register_driver return value Bartlomiej Zolnierkiewicz (2): amd74xx: resume fix it821x: fix incorrect SWDMA mask Masatake YAMATO (1): ide: never called printk statement in ide-taskfile.c::wait_drive_not_busy Sergei Shtylyov (2): hpt366: blacklist MAXTOR STM3320620A for UltraDMA/66 hpt366: use correct enablebits for HPT36x diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 41bfa4d..f5ce22c 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -574,11 +574,11 @@ static inline u8 probe_for_drive (ide_drive_t *drive) /* look for ATAPI device */ (void) do_probe(drive, WIN_PIDENTIFY); } - if (strstr(drive-id-model, E X A B Y T E N E S T)) - enable_nest(drive); if (!drive-present) /* drive not found */ return 0; + if (strstr(drive-id-model, E X A B Y T E N E S T)) + enable_nest(drive); /* identification failed? */ if (!drive-id_read) { diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index 30175c7..aa06daf 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c @@ -238,7 +238,7 @@ EXPORT_SYMBOL(task_no_data_intr); static u8 wait_drive_not_busy(ide_drive_t *drive) { ide_hwif_t *hwif = HWIF(drive); - int retries = 100; + int retries; u8 stat; /* @@ -246,10 +246,14 @@ static u8 wait_drive_not_busy(ide_drive_t *drive) * This can take up to 10 usec, but we will wait max 1 ms * (drive_cmd_intr() waits that long). */ - while (((stat = hwif-INB(IDE_STATUS_REG)) BUSY_STAT) retries--) - udelay(10); + for (retries = 0; retries 100; retries++) { + if ((stat = hwif-INB(IDE_STATUS_REG)) BUSY_STAT) + udelay(10); + else + break; + } - if (!retries) + if (stat BUSY_STAT) printk(KERN_ERR %s: drive still BUSY!\n, drive-name); return stat; diff --git a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c index 9db1be8..a2be65f 100644 --- a/drivers/ide/pci/amd74xx.c +++ b/drivers/ide/pci/amd74xx.c @@ -1,5 +1,5 @@ /* - * Version 2.15 + * Version 2.16 * * AMD 755/756/766/8111 and nVidia nForce/2/2s/3/3s/CK804/MCP04 * IDE driver for Linux. @@ -244,10 +244,8 @@ static int amd_set_drive(ide_drive_t *drive, u8 speed) struct ide_timing t, p; int T, UT; - if (speed != XFER_PIO_SLOW speed != drive-current_speed) - if (ide_config_drive_speed(drive, speed)) - printk(KERN_WARNING ide%d: Drive %d didn't accept speed setting. Oh, well.\n, - drive-dn 1, drive-dn 1); + if (speed != XFER_PIO_SLOW) + ide_config_drive_speed(drive, speed); T = 10 / amd_clock; UT = T / min_t(int, max_t(int, amd_config-flags AMD_UDMA, 1), 2); diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index ce8a544..c33d0b0 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c @@ -1,5 +1,5 @@ /* - * linux/drivers/ide/pci/hpt366.c Version 1.04Jun 4, 2007 + * linux/drivers/ide/pci/hpt366.c Version 1.06Jun 27, 2007 * * Copyright (C) 1999-2003 Andre Hedrick [EMAIL PROTECTED] * Portions Copyright (C) 2001 Sun Microsystems, Inc. @@ -182,6 +182,7 @@ static const char *bad_ata66_4[] = { IC35L040AVER07-0, IC35L060AVER07-0, WDC AC310200R, + MAXTOR STM3320620A, NULL }; @@ -1513,18 +1514,28 @@ static int __devinit init_setup_hpt366(struct pci_dev *dev, ide_pci_device_t *d) goto init_single; /* -* HPT36x chips are single channel and -* do not seem to have the channel enable bit... +* HPT36x chips have one channel per function and have +* both channel enable bits located differently and visible +* to both functions -- really stupid design decision... :-( +* Bit 4 is for the primary channel, bit 5 for the
[git patches] 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/ide.c |9 ++--- drivers/scsi/ide-scsi.c |2 +- 2 files changed, 7 insertions(+), 4 deletions(-) Bartlomiej Zolnierkiewicz (1): ide-scsi: fix OOPS in idescsi_expiry() Rafael J. Wysocki (1): Resume from RAM on HPC nx6325 broken diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 0af0d16..0cd76bf 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -1010,7 +1010,6 @@ static int generic_ide_resume(struct device *dev) { ide_drive_t *drive = dev-driver_data; ide_hwif_t *hwif = HWIF(drive); - ide_driver_t *drv = to_ide_driver(dev-driver); struct request rq; struct request_pm_state rqpm; ide_task_t args; @@ -1033,8 +1032,12 @@ static int generic_ide_resume(struct device *dev) err = ide_do_drive_cmd(drive, rq, ide_head_wait); - if (err == 0 drv drv-resume) - drv-resume(drive); + if (err == 0 dev-driver) { + ide_driver_t *drv = to_ide_driver(dev-driver); + + if (drv-resume) + drv-resume(drive); + } return err; } diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index 8263f75..bb90df8 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c @@ -463,7 +463,7 @@ static inline unsigned long get_timeout(idescsi_pc_t *pc) static int idescsi_expiry(ide_drive_t *drive) { - idescsi_scsi_t *scsi = drive-driver_data; + idescsi_scsi_t *scsi = drive_to_idescsi(drive); idescsi_pc_t *pc = scsi-pc; #if IDESCSI_DEBUG_LOG - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[git patches] 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/ide-disk.c| 12 + drivers/ide/ide-probe.c | 12 +- drivers/ide/ide.c |9 ++- drivers/ide/pci/amd74xx.c | 12 +++-- drivers/ide/pci/generic.c | 37 ++--- drivers/ide/pci/hpt366.c |8 +++--- drivers/ide/pci/it821x.c | 34 ++- drivers/ide/pci/serverworks.c | 51 +--- include/linux/ide.h |1 + include/linux/pci_ids.h |2 + 10 files changed, 115 insertions(+), 63 deletions(-) Bartlomiej Zolnierkiewicz (3): serverworks: remove crappy code serverworks: fix CSB6 tuning logic it821x: RAID mode fixes Jiri Slaby (1): ide: generic IDE PCI driver, add another device exception Lee Trager (1): ide: HPA detect from resume Peer Chen (2): Add the PATA controller device ID to pci_ids.h for MCP73/MCP77. ide: Add the MCP73/77 support to PATA driver Sergei Shtylyov (1): hpt366: disallow Ultra133 for HPT374 diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 7fff773..dc2175c 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c @@ -1037,6 +1037,17 @@ static void ide_disk_release(struct kref *kref) static int ide_disk_probe(ide_drive_t *drive); +/* + * On HPA drives the capacity needs to be + * reinitilized on resume otherwise the disk + * can not be used and a hard reset is required + */ +static void ide_disk_resume(ide_drive_t *drive) +{ + if (idedisk_supports_hpa(drive-id)) + init_idedisk_capacity(drive); +} + static void ide_device_shutdown(ide_drive_t *drive) { #ifdef CONFIG_ALPHA @@ -1071,6 +1082,7 @@ static ide_driver_t idedisk_driver = { }, .probe = ide_disk_probe, .remove = ide_disk_remove, + .resume = ide_disk_resume, .shutdown = ide_device_shutdown, .version= IDEDISK_VERSION, .media = ide_disk, diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 3cebed7..41bfa4d 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -717,7 +717,7 @@ EXPORT_SYMBOL_GPL(ide_undecoded_slave); * This routine only knows how to look for drive units 0 and 1 * on an interface, so any setting of MAX_DRIVES 2 won't work here. */ -static void probe_hwif(ide_hwif_t *hwif) +static void probe_hwif(ide_hwif_t *hwif, void (*fixup)(ide_hwif_t *hwif)) { unsigned int unit; unsigned long flags; @@ -820,6 +820,9 @@ static void probe_hwif(ide_hwif_t *hwif) return; } + if (fixup) + fixup(hwif); + for (unit = 0; unit MAX_DRIVES; ++unit) { ide_drive_t *drive = hwif-drives[unit]; @@ -874,10 +877,7 @@ static int hwif_init(ide_hwif_t *hwif); int probe_hwif_init_with_fixup(ide_hwif_t *hwif, void (*fixup)(ide_hwif_t *hwif)) { - probe_hwif(hwif); - - if (fixup) - fixup(hwif); + probe_hwif(hwif, fixup); if (!hwif_init(hwif)) { printk(KERN_INFO %s: failed to initialize IDE interface\n, @@ -1404,7 +1404,7 @@ int ideprobe_init (void) for (index = 0; index MAX_HWIFS; ++index) if (probe[index]) - probe_hwif(ide_hwifs[index]); + probe_hwif(ide_hwifs[index], NULL); for (index = 0; index MAX_HWIFS; ++index) if (probe[index]) hwif_init(ide_hwifs[index]); diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 6002713..0af0d16 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -1010,9 +1010,11 @@ static int generic_ide_resume(struct device *dev) { ide_drive_t *drive = dev-driver_data; ide_hwif_t *hwif = HWIF(drive); + ide_driver_t *drv = to_ide_driver(dev-driver); struct request rq; struct request_pm_state rqpm; ide_task_t args; + int err; /* Call ACPI _STM only once */ if (!(drive-dn % 2)) @@ -1029,7 +1031,12 @@ static int generic_ide_resume(struct device *dev) rqpm.pm_step = ide_pm_state_start_resume; rqpm.pm_state = PM_EVENT_ON; - return ide_do_drive_cmd(drive, rq, ide_head_wait); + err = ide_do_drive_cmd(drive, rq, ide_head_wait); + + if (err == 0 drv drv-resume) + drv-resume(drive); + + return err; } int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device *bdev, diff --git a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c index becb1a5..9db1be8 100644 --- a/drivers/ide/pci/amd74xx.c +++ b/drivers/ide/pci/amd74xx.c @@ -1,5 +1,5 @@ /* - * Version 2.13 + * Version 2.15 * * AMD 755/756/766/8111 and nVidia
[git patches] 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/ide-dma.c |4 +++- drivers/ide/ide-proc.c|2 ++ drivers/ide/pci/atiixp.c |1 + drivers/ide/pci/serverworks.c | 14 ++ include/linux/pci_ids.h |1 + 5 files changed, 17 insertions(+), 5 deletions(-) Alan Cox (1): ide/pci/serverworks.c: Fix corruption/timeouts with MegaIDE Andrew Morton (1): ide serverworks warning fixes Henry Su (1): add the IDE device ID for ATI SB700 Junio C Hamano (1): Match DMA blacklist entries between ide-dma.c and libata-core.c Mika Kukkonen (1): Add two missing chipsets to drivers/ide/ide-proc.c diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index b77b7d1..ead141e 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c @@ -119,15 +119,17 @@ static const struct drive_list_entry drive_blacklist [] = { { HITACHI CDR-8335, ALL }, { HITACHI CDR-8435, ALL }, { Toshiba CD-ROM XM-6202B , ALL }, + { TOSHIBA CD-ROM XM-1702BC, ALL }, { CD-532E-A , ALL }, { E-IDE CD-ROM CR-840,ALL }, { CD-ROM Drive/F5A, ALL }, { WPI CDD-820,ALL }, { SAMSUNG CD-ROM SC-148C, ALL }, { SAMSUNG CD-ROM SC, ALL }, - { SanDisk SDP3B-64, ALL }, { ATAPI CD-ROM DRIVE 40X MAXIMUM, ALL }, { _NEC DV5800A, ALL }, + { SAMSUNG CD-ROM SN-124, N001 }, + { Seagate STT2A, ALL }, { NULL , NULL} }; diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c index d50bd99..ea94c9a 100644 --- a/drivers/ide/ide-proc.c +++ b/drivers/ide/ide-proc.c @@ -67,6 +67,8 @@ static int proc_ide_read_imodel case ide_4drives: name = 4drives; break; case ide_pmac: name = mac-io;break; case ide_au1xxx:name = au1xxx;break; + case ide_etrax100: name = etrax100; break; + case ide_acorn: name = acorn; break; default:name = (unknown); break; } len = sprintf(page, %s\n, name); diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c index 0e52ad7..8ab33fa 100644 --- a/drivers/ide/pci/atiixp.c +++ b/drivers/ide/pci/atiixp.c @@ -317,6 +317,7 @@ static struct pci_device_id atiixp_pci_tbl[] = { { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP300_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, + { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, { 0, }, }; MODULE_DEVICE_TABLE(pci, atiixp_pci_tbl); diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c index 6234f80..47bcd91 100644 --- a/drivers/ide/pci/serverworks.c +++ b/drivers/ide/pci/serverworks.c @@ -158,6 +158,12 @@ static int svwks_tune_chipset (ide_drive_t *drive, u8 xferspeed) pci_read_config_word(dev, 0x4A, csb5_pio); pci_read_config_byte(dev, 0x54, ultra_enable); + /* If we are in RAID mode (eg AMI MegaIDE) then we can't it + turns out trust the firmware configuration */ + + if ((dev-class 8) != PCI_CLASS_STORAGE_IDE) + goto oem_setup_failed; + /* Per Specified Design by OEM, and ASIC Architect */ if ((dev-device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE) || (dev-device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2)) { @@ -173,7 +179,7 @@ dma_pio: ((dma_stat(1(5+unit)))==(1(5+unit { u8 dmaspeed = dma_timing; - dma_timing = ~0xFF; + dma_timing = ~0xFFU; if ((dmaspeed 0x20) == 0x20) dmaspeed = XFER_MW_DMA_2; else if ((dmaspeed 0x21) == 0x21) @@ -187,7 +193,7 @@ dma_pio: } else if (pio_timing) { u8 piospeed = pio_timing; - pio_timing = ~0xFF; + pio_timing = ~0xFFU; if ((piospeed 0x20) == 0x20) piospeed = XFER_PIO_4; else if ((piospeed 0x22) == 0x22) @@ -208,8 +214,8 @@ dma_pio: oem_setup_failed: - pio_timing = ~0xFF; - dma_timing = ~0xFF; +
Re: [git patches] IDE fixes
On Thu, 24 May 2007, Bartlomiej Zolnierkiewicz wrote: diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c index 6234f80..47bcd91 100644 --- a/drivers/ide/pci/serverworks.c +++ b/drivers/ide/pci/serverworks.c @@ -173,7 +179,7 @@ dma_pio: ((dma_stat(1(5+unit)))==(1(5+unit { u8 dmaspeed = dma_timing; - dma_timing = ~0xFF; + dma_timing = ~0xFFU; This is just crap. The old code was _also_ crap, but the new code just is worse. What's the point of this, really? dma_timing is a 8-bit value, so the above is just a *really* stupid and bad way of saying dma_timing = 0; and whoever wrote that code is just terminally confused. I pulled, but that driver is CRAP. Please don't add new crap blindly like that. Andrew, that was your change, it appears. Tssk. Please, we do NOT fix compiler warnings without understanding the code! That's a sure way to just introduce _new_ bugs, rather than fix old ones. So please, please, please, realize that the compiler is _stupid_, and fixing warnings without understanding the code is bad. In this case, anybody who actually spends 5 seconds looking at the code should have realized that the warning is just another way of saying that the author of the code was on some bad drugs, and the warnings WERE BETTER OFF REMAINING! Because that code _should_ have warnings. Big fat warnings about incompetence! Linus - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [git patches] IDE fixes
On Wed, 23 May 2007, Linus Torvalds wrote: So please, please, please, realize that the compiler is _stupid_, and fixing warnings without understanding the code is bad. Btw, this is fundamental. If you don't need to understand the code, then the compiler could have just fixed it for you, and there was no need to warn. So compiler warnings have two cases: - the compiler is being a complete a**hole, and the warning should exist. It happens. - it can be fixed, but only by understanding what the code wants to do. In no case is it ok to just shut up the warning. Linus - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[git patches] IDE fixes
Hopefully the last update for 2.6.21. Please pull from: master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git/ to receive the following updates: drivers/ide/Kconfig |1 + drivers/ide/pci/delkin_cb.c |1 + drivers/ide/pci/hpt366.c|5 +++-- 3 files changed, 5 insertions(+), 2 deletions(-) Bartlomiej Zolnierkiewicz (1): ide/Kconfig: add missing range check for IDE_MAX_HWIFS Mark Lord (1): ide/pci/delkin_cb.c: add new PCI ID Sergei Shtylyov (1): hpt366: fix kernel oops with HPT302N diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index ca2e4f8..5bdf64b 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig @@ -57,6 +57,7 @@ if IDE config IDE_MAX_HWIFS int Max IDE interfaces depends on ALPHA || SUPERH || IA64 || EMBEDDED + range 1 10 default 4 help This is the maximum number of IDE hardware interfaces that will diff --git a/drivers/ide/pci/delkin_cb.c b/drivers/ide/pci/delkin_cb.c index d4b753e..dd7ec37 100644 --- a/drivers/ide/pci/delkin_cb.c +++ b/drivers/ide/pci/delkin_cb.c @@ -108,6 +108,7 @@ delkin_cb_remove (struct pci_dev *dev) static struct pci_device_id delkin_cb_pci_tbl[] __devinitdata = { { 0x1145, 0xf021, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + { 0x1145, 0xf024, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, { 0, }, }; MODULE_DEVICE_TABLE(pci, delkin_cb_pci_tbl); diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 60ecdc2..ab6fa27 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c @@ -1,10 +1,10 @@ /* - * linux/drivers/ide/pci/hpt366.c Version 1.01Dec 23, 2006 + * linux/drivers/ide/pci/hpt366.c Version 1.02Apr 18, 2007 * * Copyright (C) 1999-2003 Andre Hedrick [EMAIL PROTECTED] * Portions Copyright (C) 2001 Sun Microsystems, Inc. * Portions Copyright (C) 2003 Red Hat Inc - * Portions Copyright (C) 2005-2006MontaVista Software, Inc. + * Portions Copyright (C) 2005-2007MontaVista Software, Inc. * * Thanks to HighPoint Technologies for their assistance, and hardware. * Special Thanks to Jon Burchmore in SanDiego for the deep pockets, his @@ -494,6 +494,7 @@ static struct hpt_info hpt302n __devinitdata = { .chip_type = HPT302N, .max_mode = HPT302_ALLOW_ATA133_6 ? 4 : 3, .dpll_clk = 77, + .settings = hpt37x_settings }; static struct hpt_info hpt371n __devinitdata = { - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[git patches] 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/ide-cd.c |9 + drivers/ide/ide-io.c |6 +- drivers/ide/ide-iops.c |2 ++ drivers/ide/ide.c |2 ++ include/linux/ide.h|2 ++ 5 files changed, 20 insertions(+), 1 deletions(-) Danny Kukawka (1): ide: add optical to sysfs media attribute Stuart Hayes (1): ide: ugly messages trying to open CD drive with no media present Suleiman Souhlal (1): ide: correctly prevent IDE timer expiry function to run if request was already handled diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 45a928c..638becd 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -735,6 +735,15 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret) cdrom_saw_media_change (drive); /*printk(%s: media changed\n,drive-name);*/ return 0; + } else if ((sense_key == ILLEGAL_REQUEST) + (rq-cmd[0] == GPCMD_START_STOP_UNIT)) { + /* +* Don't print error message for this condition-- +* SFF8090i indicates that 5/24/00 is the correct +* response to a request to close the tray if the +* drive doesn't have that capability. +* cdrom_log_sense() knows this! +*/ } else if (!(rq-cmd_flags REQ_QUIET)) { /* Otherwise, print an error. */ ide_dump_status(drive, packet command error, stat); diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 0e02800..8670112 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c @@ -1226,6 +1226,7 @@ static void ide_do_request (ide_hwgroup_t *hwgroup, int masked_irq) #endif /* so that ide_timer_expiry knows what to do */ hwgroup-sleeping = 1; + hwgroup-req_gen_timer = hwgroup-req_gen; mod_timer(hwgroup-timer, sleep); /* we purposely leave hwgroup-busy==1 * while sleeping */ @@ -1411,7 +1412,8 @@ void ide_timer_expiry (unsigned long data) spin_lock_irqsave(ide_lock, flags); - if ((handler = hwgroup-handler) == NULL) { + if (((handler = hwgroup-handler) == NULL) || + (hwgroup-req_gen != hwgroup-req_gen_timer)) { /* * Either a marginal timeout occurred * (got the interrupt just as timer expired), @@ -1439,6 +1441,7 @@ void ide_timer_expiry (unsigned long data) if ((wait = expiry(drive)) 0) { /* reset timer */ hwgroup-timer.expires = jiffies + wait; + hwgroup-req_gen_timer = hwgroup-req_gen; add_timer(hwgroup-timer); spin_unlock_irqrestore(ide_lock, flags); return; @@ -1653,6 +1656,7 @@ irqreturn_t ide_intr (int irq, void *dev_id) printk(KERN_ERR %s: ide_intr: hwgroup-busy was 0 ??\n, drive-name); } hwgroup-handler = NULL; + hwgroup-req_gen++; del_timer(hwgroup-timer); spin_unlock(ide_lock); diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index 1ee53a5..3caa176 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c @@ -889,6 +889,7 @@ static void __ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, hwgroup-handler= handler; hwgroup-expiry = expiry; hwgroup-timer.expires = jiffies + timeout; + hwgroup-req_gen_timer = hwgroup-req_gen; add_timer(hwgroup-timer); } @@ -929,6 +930,7 @@ void ide_execute_command(ide_drive_t *drive, task_ioreg_t cmd, ide_handler_t *ha hwgroup-handler= handler; hwgroup-expiry = expiry; hwgroup-timer.expires = jiffies + timeout; + hwgroup-req_gen_timer = hwgroup-req_gen; add_timer(hwgroup-timer); hwif-OUTBSYNC(drive, cmd, IDE_COMMAND_REG); /* Drive takes 400nS to respond, we must avoid the IRQ being diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index a6f098f..ae5bf2b 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -1962,6 +1962,8 @@ static char *media_string(ide_drive_t *drive) return tape; case ide_floppy: return floppy; + case ide_optical: + return optical; default: return UNKNOWN; } diff --git a/include/linux/ide.h b/include/linux/ide.h index
[git patches] IDE fixes for 2.6.21-rc5
Please pull from: master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git/ to receive the following updates: drivers/ide/Kconfig|6 -- drivers/ide/ide-io.c | 32 +--- drivers/ide/ide-iops.c | 11 +-- drivers/ide/ide.c | 37 ++--- drivers/ide/pci/pdc202xx_new.c |3 ++- include/linux/ide.h|1 + 6 files changed, 67 insertions(+), 23 deletions(-) Albert Lee (1): pdc202xx_new: Enable ATAPI DMA Bartlomiej Zolnierkiewicz (2): ide: revert ide: fix drive side 80c cable check, take 2 for now ide: fix locking for manual DMA enable/disable (hdparm -d) Patrick Ringl (1): ide: cosmetic adaption of drivers/ide/Kconfig concerning SATA Suleiman Souhlal (1): ide: use correct IDE error recovery diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 8f1fd01..ca2e4f8 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig @@ -103,8 +103,10 @@ config BLK_DEV_IDE_SATA ---help--- There are two drivers for Serial ATA controllers. - The main driver, libata, exists inside the SCSI subsystem - and supports most modern SATA controllers. + The main driver, libata, uses the SCSI subsystem + and supports most modern SATA controllers. In order to use it + you may take a look at Serial ATA (prod) and Parallel ATA + (experimental) drivers. The IDE driver (which you are currently configuring) supports a few first-generation SATA controllers. diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index c193553..0e02800 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c @@ -519,21 +519,24 @@ static ide_startstop_t ide_ata_error(ide_drive_t *drive, struct request *rq, u8 if ((stat DRQ_STAT) rq_data_dir(rq) == READ hwif-err_stops_fifo == 0) try_to_flush_leftover_data(drive); + if (rq-errors = ERROR_MAX || blk_noretry_request(rq)) { + ide_kill_rq(drive, rq); + return ide_stopped; + } + if (hwif-INB(IDE_STATUS_REG) (BUSY_STAT|DRQ_STAT)) - /* force an abort */ - hwif-OUTB(WIN_IDLEIMMEDIATE, IDE_COMMAND_REG); + rq-errors |= ERROR_RESET; - if (rq-errors = ERROR_MAX || blk_noretry_request(rq)) - ide_kill_rq(drive, rq); - else { - if ((rq-errors ERROR_RESET) == ERROR_RESET) { - ++rq-errors; - return ide_do_reset(drive); - } - if ((rq-errors ERROR_RECAL) == ERROR_RECAL) - drive-special.b.recalibrate = 1; + if ((rq-errors ERROR_RESET) == ERROR_RESET) { ++rq-errors; + return ide_do_reset(drive); } + + if ((rq-errors ERROR_RECAL) == ERROR_RECAL) + drive-special.b.recalibrate = 1; + + ++rq-errors; + return ide_stopped; } @@ -1025,6 +1028,13 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq) if (!drive-special.all) { ide_driver_t *drv; + /* +* We reset the drive so we need to issue a SETFEATURES. +* Do it _after_ do_special() restored device parameters. +*/ + if (drive-current_speed == 0xff) + ide_config_drive_speed(drive, drive-desired_speed); + if (rq-cmd_type == REQ_TYPE_ATA_CMD || rq-cmd_type == REQ_TYPE_ATA_TASK || rq-cmd_type == REQ_TYPE_ATA_TASKFILE) diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index bd513f5..1ee53a5 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c @@ -583,8 +583,12 @@ u8 eighty_ninty_three (ide_drive_t *drive) if(!(drive-id-hw_config 0x4000)) return 0; #endif /* CONFIG_IDEDMA_IVB */ - if (!(drive-id-hw_config 0x2000)) - return 0; + /* +* FIXME: +* - change master/slave IDENTIFY order +* - force bit13 (80c cable present) check +* (unless the slave device is pre-ATA3) +*/ return 1; } @@ -1090,6 +1094,9 @@ static void pre_reset(ide_drive_t *drive) if (HWIF(drive)-pre_reset != NULL) HWIF(drive)-pre_reset(drive); + if (drive-current_speed != 0xff) + drive-desired_speed = drive-current_speed; + drive-current_speed = 0xff; } /* diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 695610f..a6f098f 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -1124,17 +1124,40 @@ static int set_io_32bit(ide_drive_t *drive, int arg) static int set_using_dma (ide_drive_t *drive, int arg) { #ifdef CONFIG_BLK_DEV_IDEDMA + ide_hwif_t *hwif = drive-hwif; + int err = -EPERM; + if (!drive-id ||
Re: [git patches] IDE fixes
On Sat, 17 Mar 2007, Bartlomiej Zolnierkiewicz wrote: to receive the following updates: b/drivers/ide/Kconfig | 48 - b/drivers/ide/Makefile |1 b/drivers/ide/arm/icside.c | 13 b/drivers/ide/ide-dma.c |2 b/drivers/ide/ide.c |4 b/drivers/ide/mips/au1xxx-ide.c |3 b/drivers/ide/pci/Makefile |1 b/drivers/ide/pci/cmd64x.c | 45 - b/drivers/ide/pci/jmicron.c | 29 b/drivers/ide/pci/scc_pata.c| 858 b/drivers/ide/setup-pci.c |5 b/include/asm-mips/mach-au1x00/au1xxx_ide.h | 34 - drivers/ide/ppc/scc_pata.c | 858 13 files changed, 915 insertions(+), 986 deletions(-) Please use git diff -M --stat --summary to generate the diffstat (where the -M is the important part). Your scc_pata.c change was a pure rename, but because you didn't ask for rename detection, it got shown as a file create/delete pair. It *should* have looked like this: drivers/ide/Kconfig | 48 + drivers/ide/Makefile |1 - drivers/ide/arm/icside.c | 13 +--- drivers/ide/ide-dma.c |2 +- drivers/ide/ide.c |4 -- drivers/ide/mips/au1xxx-ide.c |3 +- drivers/ide/pci/Makefile |1 + drivers/ide/pci/cmd64x.c | 45 --- drivers/ide/pci/jmicron.c | 29 ++--- drivers/ide/{ppc = pci}/scc_pata.c |0 drivers/ide/setup-pci.c |5 --- include/asm-mips/mach-au1x00/au1xxx_ide.h | 34 12 files changed, 57 insertions(+), 128 deletions(-) rename drivers/ide/{ppc = pci}/scc_pata.c (100%) which is a lot more accurate than what you get by feeding a diff through diffstat that has no clue about renames (look at the summary for number of lines changed ;) Linus - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [git patches] IDE fixes
On Sunday 18 March 2007, Linus Torvalds wrote: On Sat, 17 Mar 2007, Bartlomiej Zolnierkiewicz wrote: to receive the following updates: b/drivers/ide/Kconfig | 48 - b/drivers/ide/Makefile |1 b/drivers/ide/arm/icside.c | 13 b/drivers/ide/ide-dma.c |2 b/drivers/ide/ide.c |4 b/drivers/ide/mips/au1xxx-ide.c |3 b/drivers/ide/pci/Makefile |1 b/drivers/ide/pci/cmd64x.c | 45 - b/drivers/ide/pci/jmicron.c | 29 b/drivers/ide/pci/scc_pata.c| 858 b/drivers/ide/setup-pci.c |5 b/include/asm-mips/mach-au1x00/au1xxx_ide.h | 34 - drivers/ide/ppc/scc_pata.c | 858 13 files changed, 915 insertions(+), 986 deletions(-) Please use git diff -M --stat --summary to generate the diffstat (where the -M is the important part). Your scc_pata.c change was a pure rename, but because you didn't ask for rename detection, it got shown as a file create/delete pair. It *should* have looked like this: drivers/ide/Kconfig | 48 + drivers/ide/Makefile |1 - drivers/ide/arm/icside.c | 13 +--- drivers/ide/ide-dma.c |2 +- drivers/ide/ide.c |4 -- drivers/ide/mips/au1xxx-ide.c |3 +- drivers/ide/pci/Makefile |1 + drivers/ide/pci/cmd64x.c | 45 --- drivers/ide/pci/jmicron.c | 29 ++--- drivers/ide/{ppc = pci}/scc_pata.c |0 drivers/ide/setup-pci.c |5 --- include/asm-mips/mach-au1x00/au1xxx_ide.h | 34 12 files changed, 57 insertions(+), 128 deletions(-) rename drivers/ide/{ppc = pci}/scc_pata.c (100%) which is a lot more accurate than what you get by feeding a diff through diffstat that has no clue about renames (look at the summary for number of lines changed ;) Thanks, I updated my scripts and also a git version installed while at it. [ I was feeling that I was missing something but these options were undocumented in git-1.4.4.2, no longer a case in git-1.5.0.3. :-) ] Bart - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[git patches] IDE fixes for 2.6.20-rc6
Hi, The resend of the 2.6.20-rc6 fixes that I've sent you as patches. This time in the git form for easier merging and with proper cc:. Please pull from: master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git/ to receive the following updates: MAINTAINERS|7 ++ drivers/ata/pata_via.c |1 drivers/ide/ide-pnp.c |5 drivers/ide/ide.c |5 drivers/ide/pci/aec62xx.c |2 - drivers/ide/pci/alim15x3.c |2 - drivers/ide/pci/amd74xx.c |2 - drivers/ide/pci/atiixp.c | 42 ++--- drivers/ide/pci/cmd64x.c |2 - drivers/ide/pci/cs5520.c |2 - drivers/ide/pci/cs5530.c |2 - drivers/ide/pci/cy82c693.c |2 - drivers/ide/pci/generic.c | 37 drivers/ide/pci/hpt34x.c |2 - drivers/ide/pci/hpt366.c |2 - drivers/ide/pci/jmicron.c |3 +- drivers/ide/pci/ns87415.c |2 - drivers/ide/pci/opti621.c |2 - drivers/ide/pci/pdc202xx_new.c |2 - drivers/ide/pci/pdc202xx_old.c |2 - drivers/ide/pci/rz1000.c |2 - drivers/ide/pci/sc1200.c |2 - drivers/ide/pci/serverworks.c |2 - drivers/ide/pci/sgiioc4.c |3 -- drivers/ide/pci/siimage.c |2 - drivers/ide/pci/sis5513.c |2 - drivers/ide/pci/sl82c105.c |2 - drivers/ide/pci/slc90e66.c |2 - drivers/ide/pci/triflex.c |2 - drivers/ide/pci/trm290.c |2 - drivers/ide/pci/via82cxxx.c|5 +++- include/asm-ia64/pci.h |6 + include/linux/pci_ids.h|3 +- 33 files changed, 71 insertions(+), 90 deletions(-) Alan Cox (1): ide/generic: Jmicron has its own drivers now Andrew Morton (1): jmicron: fix warning Bartlomiej Zolnierkiewicz (3): ide: update MAINTAINERS entry ia64: add pci_get_legacy_ide_irq() ide: add missing __init tags to IDE PCI host drivers Conke Hu (3): atiixp.c: remove unused code atiixp.c: sb600 ide only has one channel atiixp.c: add cable detection support for ATI IDE Josepch Chan (1): via82cxxx/pata_via: correct PCI_DEVICE_ID_VIA_SATA_EIDE ID and add support for CX700 and 8237S Tejun Heo (1): ide: unregister idepnp driver on unload diff --git a/MAINTAINERS b/MAINTAINERS index f0596e4..1446cc4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1598,12 +1598,11 @@ M: [EMAIL PROTECTED] W: http://www.developer.ibm.com/welcome/netfinity/serveraid.html S: Supported -IDE DRIVER [GENERAL] +IDE SUBSYSTEM P: Bartlomiej Zolnierkiewicz -M: [EMAIL PROTECTED] -L: linux-kernel@vger.kernel.org +M: [EMAIL PROTECTED] L: linux-ide@vger.kernel.org -T: git kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git +T: quilt kernel.org/pub/linux/kernel/people/bart/pata-2.6/ S: Maintained IDE/ATAPI CDROM DRIVER diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index f0d4f7e..0219419 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c @@ -95,6 +95,7 @@ static const struct via_isa_bridge { u8 rev_max; u16 flags; } via_isa_bridges[] = { + { vt8237s,PCI_DEVICE_ID_VIA_8237S,0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, { vt8251, PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, { cx700, PCI_DEVICE_ID_VIA_CX700,0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, { vt6410, PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_NO_ENABLES}, diff --git a/drivers/ide/ide-pnp.c b/drivers/ide/ide-pnp.c index df7d150..98410ca 100644 --- a/drivers/ide/ide-pnp.c +++ b/drivers/ide/ide-pnp.c @@ -73,3 +73,8 @@ void __init pnpide_init(void) { pnp_register_driver(idepnp_driver); } + +void __exit pnpide_exit(void) +{ + pnp_unregister_driver(idepnp_driver); +} diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 1689076..3b334af 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -1782,6 +1782,7 @@ done: } extern void pnpide_init(void); +extern void pnpide_exit(void); extern void h8300_ide_init(void); /* @@ -2094,6 +2095,10 @@ void cleanup_module (void) for (index = 0; index MAX_HWIFS; ++index) ide_unregister(index); +#ifdef CONFIG_BLK_DEV_IDEPNP + pnpide_exit(); +#endif + #ifdef CONFIG_PROC_FS proc_ide_destroy(); #endif diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c index f286079..d261bfb 100644 --- a/drivers/ide/pci/aec62xx.c +++ b/drivers/ide/pci/aec62xx.c @@ -441,7 +441,7 @@ static struct pci_driver driver = { .probe = aec62xx_init_one, }; -static int aec62xx_ide_init(void) +static int __init aec62xx_ide_init(void) { return ide_pci_register_driver(driver); } diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index 89109be..68df77e