IDE updates part #1
Subsystems (4)
PATCH 1/1 IDE updates part #1
Hi,
What's inside:
* hpt366 host driver cleanups (Sergei Shtylyov)
* ide-cd oops fix for dead drives (Aristeu Rozanski)
* unify handling of REQ_TYPE_ATA_TASK and REQ_TYPE_ATA_TASKFILE requests (me, heavily based on the earlier patches from Tejun Heo)
* unify LBA28 and LBA48 HPA handling in ide-disk device driver (me)
* cleanups all over the map - remove needless typedefs, dead code, etc., and some bugfixes discovered in the process (me)
Extra thanks to Sergei for feedback and reviewing majority of patches!
Linus, please pull from:
master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git/
to receive the following updates:
drivers/ide/Kconfig | 12 - drivers/ide/arm/icside.c | 2 - drivers/ide/cris/ide-cris.c | 2 - drivers/ide/ide-acpi.c | 16 +- drivers/ide/ide-cd.c | 12 +- drivers/ide/ide-disk.c | 418 ++++++++++++++------------------- drivers/ide/ide-dma.c | 36 +-- drivers/ide/ide-floppy.c | 123 ++++------- drivers/ide/ide-io.c | 293 +++++++++++------------ drivers/ide/ide-iops.c | 50 +--- drivers/ide/ide-lib.c | 207 ++++++++--------- drivers/ide/ide-probe.c | 32 +-- drivers/ide/ide-tape.c | 124 ++++------ drivers/ide/ide-taskfile.c | 492 +++++++++++++++++++------------------- drivers/ide/ide.c | 6 +- drivers/ide/mips/au1xxx-ide.c | 2 - drivers/ide/pci/aec62xx.c | 13 +- drivers/ide/pci/alim15x3.c | 3 - drivers/ide/pci/amd74xx.c | 1 + drivers/ide/pci/atiixp.c | 3 - drivers/ide/pci/cmd64x.c | 10 +- drivers/ide/pci/cs5520.c | 1 + drivers/ide/pci/cs5530.c | 2 - drivers/ide/pci/cs5535.c | 2 +- drivers/ide/pci/hpt34x.c | 12 +- drivers/ide/pci/hpt366.c | 194 +++++++--------- drivers/ide/pci/it8213.c | 21 +-- drivers/ide/pci/pdc202xx_new.c | 64 ++---- drivers/ide/pci/pdc202xx_old.c | 24 +- drivers/ide/pci/piix.c | 17 +- drivers/ide/pci/sc1200.c | 172 +++++--------- drivers/ide/pci/scc_pata.c | 14 +- drivers/ide/pci/serverworks.c | 17 +- drivers/ide/pci/sgiioc4.c | 1 - drivers/ide/pci/siimage.c | 29 +-- drivers/ide/pci/sis5513.c | 99 ++++---- drivers/ide/pci/sl82c105.c | 40 ++-- drivers/ide/pci/slc90e66.c | 14 +- drivers/ide/pci/tc86c001.c | 3 +- drivers/ide/pci/triflex.c | 2 - drivers/ide/pci/via82cxxx.c | 1 + drivers/ide/ppc/pmac.c | 51 ++--- drivers/scsi/ide-scsi.c | 75 +++--- include/asm-cris/arch-v10/ide.h | 5 - include/asm-cris/arch-v32/ide.h | 5 - include/asm-frv/ide.h | 6 - include/asm-powerpc/ide.h | 3 - include/linux/blkdev.h | 1 - include/linux/hdreg.h | 64 +++--- include/linux/ide.h | 322 ++++++++----------------- 50 files changed, 1265 insertions(+), 1853 deletions(-)
Andrew Morton (1):
ide: printk fix
Aristeu Rozanski (1):
ide-io: set REQ_FAILED when drive is dead
Bartlomiej Zolnierkiewicz (62):
ide: remove ->dma_master field from ide_hwif_t (take 5)
ide: remove task_ioreg_t typedef (take 2)
ide: add struct ide_taskfile (take 2)
ide-disk: merge LBA28 and LBA48 Host Protected Area support code (take 2)
ide-disk: fix taskfile registers loading order in __ide_do_rw_disk()
ide-disk: use struct ide_taskfile in __ide_do_rw_disk()
ide: add ide_tf_load() helper
ide: add ide_no_data_taskfile() helper
ide: use do_rw_taskfile() in flagged_taskfile()
ide-pmac: fix pmac_ide_init_hwif_ports()
ide: remove IRQF_DISABLED from IRQ flags for IDE IRQ handler
ide: remove CONFIG_IDEPCI_SHARE_IRQ config option
ide: remove stale ide.h "configuration options"
ide-tape: remove dead USE_IOTRACE code
ide: fix registers loading order for WIN_SMART in execute_drive_cmd()
ide: fix registers loading order for IDE_NSECTOR_REG in execute_drive_cmd()
ide: execute_drive_cmd() cleanup
ide: remove ide_cmd() helper
ide: use ide_tf_load() in execute_drive_cmd()
ide: use IDE_TFLAG_LBA48 for REQ_TYPE_ATA_TASKFILE requests
ide: remove unnecessary writes to HOB taskfile registers
ide: extend timeout for REQ_TYPE_ATA_{CMD,TASK} requests
ide: switch idedisk_prepare_flush() to use REQ_TYPE_ATA_TASKFILE requests
ide: switch ide_task_ioctl() to use REQ_TYPE_ATA_TASKFILE requests
ide: remove REQ_TYPE_ATA_TASK
ide-floppy: remove dead code
ide: CPU endianness doesn't matter for special_t
ide: remove ata_status_t and atapi_status_t
ide: remove atapi_error_t (take 2)
ide: remove atapi_feature_t
ide: remove ata_nsector_t, ata_data_t and atapi_bcount_t
ide: remove atapi_ireason_t (take 3)
ide-cd: fix register loading order in cdrom_start_packet_command() ide-{floppy,tape,scsi}: fix register loading order when issuing packet command
ide: add ide_pktcmd_tf_load() helper
ide: remove QUIRK_LIST()
ide: remove SELECT_INTERRUPT()
ide: remove hwif->intrproc
ide: remove 'command_type' field from ide_task_t
ide: remove 'tf_in_flags' field from ide_task_t
sc1200: remove pointless hwif lookup loop
ide-disk: fix __ide_do_rw_disk() to use ->OUTBSYNC
ide-disk: guarantee 400ns delay after writing command register
ide: merge flagged_taskfile() into do_rw_taskfile()
ide: convert do_rw_taskfile() to use ->data_phase
ide: use ->data_phase to set ->handler in do_rw_taskfile()
ide: remove 'handler' field from ide_task_t (take 2)
ide-disk: extend timeout for PIO-in commands
ide-disk: add ide_tf_set_cmd() helper
ide-disk: use do_rw_taskfile() (take 2)
ide: fix registers loading order in ide_dump_ata_status()
ide: add ide_tf_read() helper
ide-disk: use ide_get_lba_addr()
ide: kill duplicate code in ide_dump_{ata,atapi}_status()
ide: make 'extra' field in struct ide_port_info u8
pdc202xx_new: move PIO programming code to pdcnew_set_pio_mode()
sis5513: factor out UDMA programming code
ide: add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag
sc1200: move DMA timings to timing tables
ide: remove redundant ->ide_dma_on call from set_using_dma()
ide: cleanup ide_set_dma()
ide: remove redundant DMA blacklist check from __ide_dma_on()
Sergei Shtylyov (3):
hpt366: change timing register masks
hpt366: kill set_dma_mode() method wrapper
hpt366: merge set_dma_mode() methods
drivers/ide/Kconfig +0 -12
@@ -374,17 +374,6 @@ comment "PCI IDE chipsets support" config BLK_DEV_IDEPCI bool -config IDEPCI_SHARE_IRQ - bool "Sharing PCI IDE interrupts support" - depends on BLK_DEV_IDEPCI - help - Some ATA/IDE chipsets have hardware support which allows for - sharing a single IRQ with other cards. To enable support for - this in the ATA/IDE driver, say Y here. - - It is safe to say Y to this question, in most cases. - If unsure, say N. - config IDEPCI_PCIBUS_ORDER def_bool BLK_DEV_IDE=y && BLK_DEV_IDEPCI
@@ -707,7 +696,6 @@ config BLK_DEV_SVWKS config BLK_DEV_SGIIOC4 tristate "Silicon Graphics IOC4 chipset ATA/ATAPI support" depends on (IA64_SGI_SN2 || IA64_GENERIC) && SGI_IOC4 - select IDEPCI_SHARE_IRQ select BLK_DEV_IDEDMA_PCI help This driver adds PIO & MultiMode DMA-2 support for the SGI IOC4
drivers/ide/arm/icside.c +0 -2
@@ -272,8 +272,6 @@ static void icside_set_dma_mode(ide_drive_t *drive, const u8 xfer_mode)case XFER_SW_DMA_0 : cycle_time =480 ;break ; -default : -return ; }/*
drivers/ide/cris/ide-cris.c +0 -2
@@ -747,8 +747,6 @@ static void cris_set_dma_mode(ide_drive_t *drive, const u8 speed) strobe =ATA_DMA2_STROBE ; hold =ATA_DMA2_HOLD ;break ; -default : -return ; }if (speed >=XFER_UDMA_0 )
drivers/ide/ide-acpi.c +4 -12
@@ -383,27 +383,19 @@ static int taskfile_load_raw(ide_drive_t *drive, gtf->tfa[3], gtf->tfa[4], gtf->tfa[5], gtf->tfa[6]);memset (&args,0 ,sizeof (ide_task_t)); - args.command_type =IDE_DRIVE_TASK_NO_DATA ; - args.data_phase =TASKFILE_NO_DATA ; - args.handler = &task_no_data_intr;/* convert gtf to IDE Taskfile */ - args.tfRegister[1 ] = gtf->tfa[0 ];/* 0x1f1 */ - args.tfRegister[2 ] = gtf->tfa[1 ];/* 0x1f2 */ - args.tfRegister[3 ] = gtf->tfa[2 ];/* 0x1f3 */ - args.tfRegister[4 ] = gtf->tfa[3 ];/* 0x1f4 */ - args.tfRegister[5 ] = gtf->tfa[4 ];/* 0x1f5 */ - args.tfRegister[6 ] = gtf->tfa[5 ];/* 0x1f6 */ - args.tfRegister[7 ] = gtf->tfa[6 ];/* 0x1f7 */ +memcpy (&args.tf_array[7 ], >f->tfa,7 ); + args.tf_flags =IDE_TFLAG_OUT_TF |IDE_TFLAG_OUT_DEVICE ;if (ide_noacpitfs) {DEBPRINT ("_GTF execution disabled\n" );return err; } - err =ide_raw_taskfile (drive, &args,NULL ); + err =ide_no_data_taskfile (drive, &args);if (err) -printk (KERN_ERR "%s: ide_raw_taskfile failed: %u\n" , +printk (KERN_ERR "%s: ide_no_data_taskfile failed: %u\n" , __FUNCTION__, err);return err;
drivers/ide/ide-cd.c +3 -9
@@ -917,19 +917,13 @@ static ide_startstop_t cdrom_start_packet_command(ide_drive_t *drive,if (ide_wait_stat (&startstop, drive,0 ,BUSY_STAT ,WAIT_READY ))return startstop; +/* FIXME: for Virtual DMA we must check harder */ if (info->dma) info->dma = !hwif->dma_setup (drive);/* Set up the controller registers. */ -/* FIXME: for Virtual DMA we must check harder */ -HWIF (drive)->OUTB (info->dma,IDE_FEATURE_REG ); -HWIF (drive)->OUTB (0 ,IDE_IREASON_REG ); -HWIF (drive)->OUTB (0 ,IDE_SECTOR_REG ); - -HWIF (drive)->OUTB (xferlen &0xff ,IDE_BCOUNTL_REG ); -HWIF (drive)->OUTB (xferlen >>8 ,IDE_BCOUNTH_REG ); -if (IDE_CONTROL_REG ) -HWIF (drive)->OUTB (drive->ctl,IDE_CONTROL_REG ); +ide_pktcmd_tf_load (drive,IDE_TFLAG_OUT_NSECT |IDE_TFLAG_OUT_LBAL | +IDE_TFLAG_NO_SELECT_MASK , xferlen, info->dma);if (CDROM_CONFIG_FLAGS (drive)->drq_interrupt) {/* waiting for CDB interrupt, not DMA yet. */
drivers/ide/ide-disk.c +175 -243
571 lines not on this page · raw message
drivers/ide/ide-dma.c +11 -25
@@ -491,10 +491,6 @@ EXPORT_SYMBOL(ide_dma_host_on);int __ide_dma_on (ide_drive_t *drive) { -/* consult the list of known "bad" drives */ -if (__ide_dma_bad_drive (drive)) -return 1 ; - drive->using_dma =1 ;ide_toggle_bounce (drive,1 );
@@ -827,22 +823,19 @@ int ide_set_dma(ide_drive_t *drive)ide_hwif_t *hwif = drive->hwif;int rc; - rc =ide_dma_check (drive); +/* +* Force DMAing for the beginning of the check. +* Some chipsets appear to do interesting +* things, if not checked and cleared. +* PARANOIA!!! +*/ + hwif->dma_off_quietly (drive); -switch (rc) { -case -1 :/* DMA needs to be disabled */ - hwif->dma_off_quietly (drive); -return -1 ; -case 0 :/* DMA needs to be enabled */ -return hwif->ide_dma_on (drive); -case 1 :/* DMA setting cannot be changed */ -break ; -default : -BUG (); -break ; - } + rc =ide_dma_check (drive); +if (rc) +return rc; -return rc; +return hwif->ide_dma_on (drive); }#ifdef CONFIG_BLK_DEV_IDEDMA_PCI
@@ -968,11 +961,6 @@ void ide_setup_dma(ide_hwif_t *hwif, unsigned long base, unsigned num_ports) hwif->dma_base = base; -if (hwif->mate) - hwif->dma_master = hwif->channel ? hwif->mate->dma_base : base; -else - hwif->dma_master = base; -if (!(hwif->dma_command)) hwif->dma_command = hwif->dma_base;if (!(hwif->dma_vendor1))
@@ -1014,8 +1002,6 @@ void ide_setup_dma(ide_hwif_t *hwif, unsigned long base, unsigned num_ports) hwif->drives[1].name, (dma_stat & 0x40) ? "DMA" : "pio"); }printk ("\n" ); - -BUG_ON (!hwif->dma_master); }EXPORT_SYMBOL_GPL (ide_setup_dma);
drivers/ide/ide-floppy.c +41 -82
250 lines not on this page · raw message
drivers/ide/ide-io.c +139 -154
426 lines not on this page · raw message
drivers/ide/ide-iops.c +11 -39
117 lines not on this page · raw message
drivers/ide/ide-lib.c +94 -113
257 lines not on this page · raw message
drivers/ide/ide-probe.c +9 -23
@@ -95,10 +95,10 @@ static void ide_disk_init_mult_count(ide_drive_t *drive)#ifdef CONFIG_IDEDISK_MULTI_MODE id->multsect = ((id->max_multsect/2 ) >1 ) ? id->max_multsect :0 ; id->multsect_valid = id->multsect ?1 :0 ; - drive->mult_req = id->multsect_valid ? id->max_multsect :INITIAL_MULT_COUNT ; + drive->mult_req = id->multsect_valid ? id->max_multsect :0 ; drive->special.b.set_multmode = drive->mult_req ?1 :0 ;#else /* original, pre IDE-NFG, per request of AC */ - drive->mult_req =INITIAL_MULT_COUNT ; + drive->mult_req =0 ;if (drive->mult_req > id->max_multsect) drive->mult_req = id->max_multsect;if (drive->mult_req || ((id->multsect_valid &1 ) && id->multsect))
@@ -234,7 +234,10 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd) drive->media = ide_disk;printk ("%s DISK drive\n" , (id->config ==0x848a ) ?"CFA" :"ATA" ); -QUIRK_LIST (drive); + +if (hwif->quirkproc) + drive->quirk_list = hwif->quirkproc (drive); +return ; err_misc:
@@ -830,16 +833,8 @@ static void probe_hwif(ide_hwif_t *hwif) drive->nice1 =1 ; -if (hwif->ide_dma_on) { -/* -* Force DMAing for the beginning of the check. -* Some chipsets appear to do interesting -* things, if not checked and cleared. -* PARANOIA!!! -*/ - hwif->dma_off_quietly (drive); +if (hwif->ide_dma_on)ide_set_dma (drive); - } } }
@@ -968,11 +963,6 @@ static int ide_init_queue(ide_drive_t *drive)* Much of the code is for correctly detecting/handling irq sharing * and irq serialization situations. This is somewhat complex because * it handles static as well as dynamic (PCMCIA) IDE interfaces. -* -* The IRQF_DISABLED in sa_flags means ide_intr() is always entered with -* interrupts completely disabled. This can be bad for interrupt latency, -* but anything else has led to problems on some machines. We re-enable -* interrupts as much as we can safely do in most places. */ static int init_irq (ide_hwif_t *hwif) {
@@ -1055,17 +1045,13 @@ static int init_irq (ide_hwif_t *hwif)* Allocate the irq, if not already obtained for another hwif */ if (!match || match->irq != hwif->irq) { -int sa =IRQF_DISABLED ; +int sa =0 ;#if defined(__mc68000__) || defined(CONFIG_APUS ) sa =IRQF_SHARED ;#endif /* __mc68000__ || CONFIG_APUS */ -if (IDE_CHIPSET_IS_PCI (hwif->chipset)) { +if (IDE_CHIPSET_IS_PCI (hwif->chipset)) sa =IRQF_SHARED ; -#ifndef CONFIG_IDEPCI_SHARE_IRQ - sa |=IRQF_DISABLED ; -#endif /* CONFIG_IDEPCI_SHARE_IRQ */ - }if (hwif->io_ports[IDE_CONTROL_OFFSET ])/* clear nIEN */
drivers/ide/ide-tape.c +50 -74
302 lines not on this page · raw message
drivers/ide/ide-taskfile.c +246 -246
658 lines not on this page · raw message
drivers/ide/ide.c +1 -5
@@ -424,7 +424,6 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif) hwif->reset_poll = tmp_hwif->reset_poll; hwif->pre_reset = tmp_hwif->pre_reset; hwif->resetproc = tmp_hwif->resetproc; - hwif->intrproc = tmp_hwif->intrproc; hwif->maskproc = tmp_hwif->maskproc; hwif->quirkproc = tmp_hwif->quirkproc; hwif->busproc = tmp_hwif->busproc;
@@ -468,7 +467,6 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif)#endif hwif->dma_base = tmp_hwif->dma_base; - hwif->dma_master = tmp_hwif->dma_master; hwif->dma_command = tmp_hwif->dma_command; hwif->dma_vendor1 = tmp_hwif->dma_vendor1; hwif->dma_status = tmp_hwif->dma_status;
@@ -602,7 +600,6 @@ void ide_unregister(unsigned int index) (void )ide_release_dma (hwif); hwif->dma_base =0 ; - hwif->dma_master =0 ; hwif->dma_command =0 ; hwif->dma_vendor1 =0 ; hwif->dma_status =0 ;
@@ -854,8 +851,7 @@ int set_using_dma(ide_drive_t *drive, int arg) err =0 ;if (arg) { - hwif->dma_off_quietly (drive); -if (ide_set_dma (drive) || hwif->ide_dma_on (drive)) +if (ide_set_dma (drive)) err = -EIO ; }else ide_dma_off (drive);
drivers/ide/mips/au1xxx-ide.c +0 -2
@@ -198,8 +198,6 @@ static void auide_set_dma_mode(ide_drive_t *drive, const u8 speed)break ;#endif -default : -return ; }au_writel (mem_sttime,MEM_STTIME2 );
drivers/ide/pci/aec62xx.c +10 -3
@@ -202,6 +202,7 @@ static const struct ide_port_info aec62xx_chipsets[] __devinitdata = { .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, .host_flags = IDE_HFLAG_SERIALIZE |IDE_HFLAG_NO_ATAPI_DMA | +IDE_HFLAG_ABUSE_SET_DMA_MODE | IDE_HFLAG_OFF_BOARD, .pio_mask = ATA_PIO4, .mwdma_mask = ATA_MWDMA2,
@@ -211,6 +212,7 @@ static const struct ide_port_info aec62xx_chipsets[] __devinitdata = { .init_chipset = init_chipset_aec62xx, .init_hwif = init_hwif_aec62xx, .host_flags =IDE_HFLAG_NO_ATAPI_DMA |IDE_HFLAG_NO_AUTODMA | +IDE_HFLAG_ABUSE_SET_DMA_MODE | IDE_HFLAG_OFF_BOARD, .pio_mask = ATA_PIO4, .mwdma_mask = ATA_MWDMA2,
@@ -220,7 +222,8 @@ static const struct ide_port_info aec62xx_chipsets[] __devinitdata = { .init_chipset = init_chipset_aec62xx, .init_hwif = init_hwif_aec62xx, .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, - .host_flags = IDE_HFLAG_NO_ATAPI_DMA, + .host_flags = IDE_HFLAG_NO_ATAPI_DMA | + IDE_HFLAG_ABUSE_SET_DMA_MODE, .pio_mask = ATA_PIO4, .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA4,
@@ -228,7 +231,9 @@ static const struct ide_port_info aec62xx_chipsets[] __devinitdata = { .name = "AEC6280", .init_chipset = init_chipset_aec62xx, .init_hwif = init_hwif_aec62xx, - .host_flags = IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_OFF_BOARD, + .host_flags =IDE_HFLAG_NO_ATAPI_DMA | +IDE_HFLAG_ABUSE_SET_DMA_MODE | + IDE_HFLAG_OFF_BOARD, .pio_mask = ATA_PIO4, .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA5,
@@ -237,7 +242,9 @@ static const struct ide_port_info aec62xx_chipsets[] __devinitdata = { .init_chipset = init_chipset_aec62xx, .init_hwif = init_hwif_aec62xx, .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, - .host_flags = IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_OFF_BOARD, + .host_flags = IDE_HFLAG_NO_ATAPI_DMA | +IDE_HFLAG_ABUSE_SET_DMA_MODE | + IDE_HFLAG_OFF_BOARD, .pio_mask = ATA_PIO4, .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA5,
drivers/ide/pci/alim15x3.c +0 -3
@@ -402,9 +402,6 @@ static void ali_set_dma_mode(ide_drive_t *drive, const u8 speed)u8 tmpbyte =0x00 ;int m5229_udma = (hwif->channel) ?0x57 :0x56 ; -if (speed <XFER_PIO_0 ) -return ; -if (speed ==XFER_UDMA_6 ) speed1 =0x47 ;
drivers/ide/pci/amd74xx.c +1 -0
@@ -266,6 +266,7 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif)#define IDE_HFLAGS_AMD \ (IDE_HFLAG_PIO_NO_BLACKLIST | \ IDE_HFLAG_PIO_NO_DOWNGRADE | \ + IDE_HFLAG_ABUSE_SET_DMA_MODE | \ IDE_HFLAG_POST_SET_MODE | \ IDE_HFLAG_IO_32BIT | \ IDE_HFLAG_UNMASK_IRQS | \
drivers/ide/pci/atiixp.c +0 -3
@@ -133,9 +133,6 @@ static void atiixp_set_dma_mode(ide_drive_t *drive, const u8 speed)u32 tmp32;u16 tmp16; -if (speed <XFER_MW_DMA_0 ) -return ; -spin_lock_irqsave (&atiixp_lock, flags); save_mdma_mode[drive->dn] =0 ;
drivers/ide/pci/cmd64x.c +5 -5
@@ -322,8 +322,6 @@ static void cmd64x_set_dma_mode(ide_drive_t *drive, const u8 speed)case XFER_MW_DMA_0 :program_cycle_times (drive,480 ,215 );break ; -default : -return ; }if (speed >=XFER_SW_DMA_0 )
@@ -333,14 +331,15 @@ static void cmd64x_set_dma_mode(ide_drive_t *drive, const u8 speed)static int cmd648_ide_dma_end (ide_drive_t *drive) {ide_hwif_t *hwif =HWIF (drive); +unsigned long base = hwif->dma_base - (hwif->channel *8 );int err =__ide_dma_end (drive);u8 irq_mask = hwif->channel ?MRDMODE_INTR_CH1 :MRDMODE_INTR_CH0 ; -u8 mrdmode =inb (hwif->dma_master +0x01 ); +u8 mrdmode =inb (base +1 );/* clear the interrupt bit */ outb ((mrdmode & ~(MRDMODE_INTR_CH0 |MRDMODE_INTR_CH1 )) | irq_mask, - hwif->dma_master +0x01 ); + base +1 );return err; }
@@ -365,10 +364,11 @@ static int cmd64x_ide_dma_end (ide_drive_t *drive)static int cmd648_ide_dma_test_irq (ide_drive_t *drive) {ide_hwif_t *hwif =HWIF (drive); +unsigned long base = hwif->dma_base - (hwif->channel *8 );u8 irq_mask = hwif->channel ?MRDMODE_INTR_CH1 :MRDMODE_INTR_CH0 ;u8 dma_stat =inb (hwif->dma_status); -u8 mrdmode =inb (hwif->dma_master +0x01 ); +u8 mrdmode =inb (base +1 );#ifdef DEBUG printk("%s: dma_stat: 0x%02x mrdmode: 0x%02x irq_mask: 0x%02x\n",
drivers/ide/pci/cs5520.c +1 -0
@@ -137,6 +137,7 @@ static void __devinit init_hwif_cs5520(ide_hwif_t *hwif)IDE_HFLAG_CS5520 | \IDE_HFLAG_VDMA | \IDE_HFLAG_NO_ATAPI_DMA | \ +IDE_HFLAG_ABUSE_SET_DMA_MODE |\ IDE_HFLAG_BOOTABLE, \ .pio_mask = ATA_PIO4, \ }
drivers/ide/pci/cs5530.c +0 -2
@@ -116,8 +116,6 @@ static void cs5530_set_dma_mode(ide_drive_t *drive, const u8 mode)case XFER_MW_DMA_0 : timings =0x00077771 ;break ;case XFER_MW_DMA_1 : timings =0x00012121 ;break ;case XFER_MW_DMA_2 : timings =0x00002020 ;break ; -default : -return ; } basereg =CS5530_BASEREG (drive->hwif); reg =inl (basereg +4 );/* get drive0 config register */
drivers/ide/pci/cs5535.c +1 -1
@@ -190,7 +190,7 @@ static const struct ide_port_info cs5535_chipset __devinitdata = { .name = "CS5535", .init_hwif = init_hwif_cs5535, .host_flags =IDE_HFLAG_SINGLE |IDE_HFLAG_POST_SET_MODE | - IDE_HFLAG_BOOTABLE, + IDE_HFLAG_ABUSE_SET_DMA_MODE | IDE_HFLAG_BOOTABLE, .pio_mask = ATA_PIO4, .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA4,
drivers/ide/pci/hpt34x.c +7 -5
@@ -129,14 +129,18 @@ static void __devinit init_hwif_hpt34x(ide_hwif_t *hwif) hwif->set_dma_mode = &hpt34x_set_mode; } +#define IDE_HFLAGS_HPT34X \ + (IDE_HFLAG_NO_ATAPI_DMA | \ + IDE_HFLAG_ABUSE_SET_DMA_MODE | \ + IDE_HFLAG_NO_AUTODMA) +static const struct ide_port_info hpt34x_chipsets[]__devinitdata = { {/* 0 */ .name ="HPT343" , .init_chipset = init_chipset_hpt34x, .init_hwif = init_hwif_hpt34x, .extra =16 , - .host_flags =IDE_HFLAG_NO_ATAPI_DMA | -IDE_HFLAG_NO_AUTODMA , + .host_flags =IDE_HFLAGS_HPT34X , .pio_mask =ATA_PIO5 , }, {/* 1 */
@@ -144,9 +148,7 @@ static const struct ide_port_info hpt34x_chipsets[] __devinitdata = { .init_chipset = init_chipset_hpt34x, .init_hwif = init_hwif_hpt34x, .extra = 16, - .host_flags =IDE_HFLAG_NO_ATAPI_DMA | -IDE_HFLAG_NO_AUTODMA | - IDE_HFLAG_OFF_BOARD, + .host_flags = IDE_HFLAGS_HPT34X | IDE_HFLAG_OFF_BOARD, .pio_mask = ATA_PIO5,
Lines of this file are not shown. View the raw message.
drivers/ide/pci/hpt366.c +82 -112
194 lines not on this page · raw message
drivers/ide/pci/pdc202xx_new.c +22 -42
64 lines not on this page · raw message
drivers/ide/pci/sc1200.c +55 -117
172 lines not on this page · raw message
drivers/ide/pci/sis5513.c +48 -51
99 lines not on this page · raw message
drivers/ide/ppc/pmac.c +14 -37
51 lines not on this page · raw message
drivers/scsi/ide-scsi.c +36 -39
75 lines not on this page · raw message
include/linux/hdreg.h +35 -29
64 lines not on this page · raw message
include/linux/ide.h +103 -219
322 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.