IDE updates part 5
Subsystems (5)
PATCH 1/1 IDE updates part 5
the final part:
- remove broken Etrax IDE driver (Adrian Bunk)
- add ->input_data and ->output_data methods
- add ->tf_load and ->tf_read methods
- and more (detailed changelog below)
Linus, please pull from:
master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git/
to receive the following updates:
arch/arm/Kconfig | 15 +- drivers/ide/Kconfig | 34 -- drivers/ide/Makefile | 2 +- drivers/ide/arm/icside.c | 2 +- drivers/ide/arm/palm_bk3710.c | 1 + drivers/ide/arm/rapide.c | 1 + drivers/ide/cris/Makefile | 3 - drivers/ide/cris/ide-cris.c | 1086 ------------------------------------- drivers/ide/h8300/ide-h8300.c | 108 ++++- drivers/ide/ide-cd.c | 32 +- drivers/ide/ide-dma.c | 11 +- drivers/ide/ide-floppy.c | 27 +- drivers/ide/ide-io.c | 68 +-- drivers/ide/ide-iops.c | 344 +++++++----- drivers/ide/ide-lib.c | 2 +- drivers/ide/ide-probe.c | 8 +- drivers/ide/ide-tape.c | 19 +- drivers/ide/ide-taskfile.c | 70 +-- drivers/ide/legacy/falconide.c | 26 + drivers/ide/legacy/ide_platform.c | 4 +- drivers/ide/legacy/q40ide.c | 24 + drivers/ide/mips/au1xxx-ide.c | 17 +- drivers/ide/mips/swarm.c | 1 + drivers/ide/pci/ns87415.c | 44 ++ drivers/ide/pci/pdc202xx_new.c | 8 +- drivers/ide/pci/piix.c | 1 + drivers/ide/pci/scc_pata.c | 196 ++++++- drivers/ide/pci/sgiioc4.c | 1 + drivers/ide/pci/siimage.c | 539 +++++++++---------- drivers/ide/ppc/pmac.c | 1 + drivers/pcmcia/Kconfig | 1 - drivers/scsi/ide-scsi.c | 38 +- include/linux/ide.h | 53 +-- 33 files changed, 961 insertions(+), 1826 deletions(-) delete mode 100644 drivers/ide/cris/Makefile delete mode 100644 drivers/ide/cris/ide-cris.c
Adrian Bunk (2):
remove the broken ETRAX_IDE driver
ARM: always select HAVE_IDE
Alexander Smal (1):
ide: add TSSTcorp CDDVDW SH-S202H to ivb_list[]
Bartlomiej Zolnierkiewicz (29):
ide: fix au1xxx-ide breakage
falconide/q40ide: add ->atapi_*put_bytes and ->ata_*put_data methods (take 2)
ide: merge ->atapi_*put_bytes and ->ata_*put_data methods
scc_pata: add ->{in,out}put_data methods (take 2)
au1xxx-ide: add ->{in,out}put_data methods (take 2)
ide-h8300: add ->{in,out}put_data methods (take 2)
ide: add IDE_HFLAG_MMIO host flag (take 2)
ide: remove ->INS{W,L} and ->OUTS{W,L} methods
siimage: do clocking register posting earlier in setup_mmio_siimage()
siimage: add sil_* I/O ops
siimage: remove proc_reports_siimage()
ide: always use ->OUTBSYNC method for executing commands
ide-{floppy,tape,scsi}: 400ns delay is required after executing the command
ide: add ide_execute_pkt_cmd() helper
ide: factor out debugging code from ide_tf_load()
ide: move ide_tf_{load,read} to ide-iops.c
ide: add ->tf_load and ->tf_read methods
ide-cris: add ->tf_{load,read} methods
ide-h8300: add ->tf_{load,read} methods
scc_pata: add ->tf_{load,read} methods
ns87415: add ->tf_read method
ide: use IDE I/O helpers directly in ide_tf_{load,read}()
ide: remove ->INW and ->OUTW methods
ide: add ide_pad_transfer() helper
ide: skip "VLB sync" if host uses MMIO
scc_pata: add ->dma_host_set and ->dma_start methods
ide: remove ->dma_vendor{1,3} fields from ide_hwif_t
ide: remove ->dma_prdtable field from ide_hwif_t
piix: add Asus Eee 701 controller to short cable listRoel Kluin (2):
ide-cd: fix test unsigned var < 0
ide-cd: clean up cdrom_analyze_sense_data()
Sergei Shtylyov (1):
siimage: coding style cleanup (take 2)
arch/arm/Kconfig +1 -14
@@ -8,6 +8,7 @@ mainmenu "Linux Kernel Configuration" config ARM bool default y + select HAVE_IDE select RTC_LIB select SYS_SUPPORTS_APM_EMULATION select HAVE_OPROFILE
@@ -223,7 +224,6 @@ config ARCH_CLPS7500 select TIMER_ACORN select ISA select NO_IOPORT - select HAVE_IDE help Support for the Cirrus Logic PS7500FE system-on-a-chip.
@@ -236,7 +236,6 @@ config ARCH_CO285 bool "Co-EBSA285" select FOOTBRIDGE select FOOTBRIDGE_ADDIN - select HAVE_IDE help Support for Intel's EBSA285 companion chip.
@@ -262,7 +261,6 @@ config ARCH_EP93XX config ARCH_FOOTBRIDGE bool "FootBridge" select FOOTBRIDGE - select HAVE_IDE help Support for systems based on the DC21285 companion chip ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder.
@@ -301,7 +299,6 @@ config ARCH_IOP32X depends on MMU select PLAT_IOP select PCI - select HAVE_IDE help Support for Intel's 80219 and IOP32X (XScale) family of processors.
@@ -311,14 +308,12 @@ config ARCH_IOP33X depends on MMU select PLAT_IOP select PCI - select HAVE_IDE help Support for Intel's IOP33X (XScale) family of processors. config ARCH_IXP23XX bool "IXP23XX-based" depends on MMU - select HAVE_IDE select PCI help Support for Intel's IXP23xx (XScale) family of processors.
@@ -336,14 +331,12 @@ config ARCH_IXP4XX select GENERIC_GPIO select GENERIC_TIME select GENERIC_CLOCKEVENTS - select HAVE_IDE help Support for Intel's IXP4XX (XScale) family of processors. config ARCH_L7200 bool "LinkUp-L7200" select FIQ - select HAVE_IDE help Say Y here if you intend to run this kernel on a LinkUp Systems L7200 Software Development Board which uses an ARM720T processor.
@@ -400,7 +393,6 @@ config ARCH_PXA depends on MMU select ARCH_MTD_XIP select GENERIC_GPIO - select HAVE_IDE select HAVE_GPIO_LIB select GENERIC_TIME select GENERIC_CLOCKEVENTS
@@ -416,7 +408,6 @@ config ARCH_RPC select ARCH_MAY_HAVE_PC_FDC select ISA_DMA_API select NO_IOPORT - select HAVE_IDE help On the Acorn Risc-PC, Linux can support the internal IDE disk and CD-ROM interface, serial and parallel port, and the floppy drive.
@@ -432,7 +423,6 @@ config ARCH_SA1100 select GENERIC_TIME select GENERIC_CLOCKEVENTS select TICK_ONESHOT - select HAVE_IDE select HAVE_GPIO_LIB help Support for StrongARM 11x0 based boards.
@@ -440,7 +430,6 @@ config ARCH_SA1100 config ARCH_S3C2410 bool "Samsung S3C2410, S3C2412, S3C2413, S3C2440, S3C2442, S3C2443" select GENERIC_GPIO - select HAVE_IDE help Samsung S3C2410X CPU based systems, such as the Simtec Electronics BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or
@@ -448,7 +437,6 @@ config ARCH_S3C2410 config ARCH_SHARK bool "Shark" - select HAVE_IDE select ISA select ISA_DMA select PCI
@@ -458,7 +446,6 @@ config ARCH_SHARK config ARCH_LH7A40X bool "Sharp LH7A40X" - select HAVE_IDE help Say Y here for systems based on one of the Sharp LH7A40X System on a Chip processors. These CPUs include an ARM922T
drivers/ide/Kconfig +0 -34
@@ -862,40 +862,6 @@ config BLK_DEV_IDE_BAST Say Y here if you want to support the onboard IDE channels on the Simtec BAST or the Thorcom VR1000 -config ETRAX_IDE - tristate "ETRAX IDE support" - depends on CRIS && BROKEN - select BLK_DEV_IDEDMA - help - Enables the ETRAX IDE driver. - - 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 && ETRAX_ARCH_V10 - 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 && ETRAX_ARCH_V10 - 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 IDE_H8300 tristate "H8300 IDE support" depends on H8300
drivers/ide/Makefile +1 -1
@@ -35,7 +35,7 @@ ifeq ($(CONFIG_BLK_DEV_CMD640), y) obj-y += cmd640-core.o endif -obj-$(CONFIG_BLK_DEV_IDE) += cris/ ppc/ +obj-$(CONFIG_BLK_DEV_IDE) += ppc/ obj-$(CONFIG_IDE_H8300) += h8300/ obj-$(CONFIG_IDE_GENERIC) += ide-generic.o obj-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o
drivers/ide/arm/icside.c +1 -1
@@ -483,7 +483,7 @@ static const struct ide_port_info icside_v6_port_info __initdata = { .init_dma = icside_dma_off_init, .port_ops = &icside_v6_no_dma_port_ops, .dma_ops = &icside_v6_dma_ops, - .host_flags = IDE_HFLAG_SERIALIZE, + .host_flags = IDE_HFLAG_SERIALIZE | IDE_HFLAG_MMIO, .mwdma_mask = ATA_MWDMA2, .swdma_mask = ATA_SWDMA2, };
drivers/ide/arm/palm_bk3710.c +1 -0
@@ -342,6 +342,7 @@ static const struct ide_port_ops palm_bk3710_ports_ops = {static const struct ide_port_info __devinitdata palm_bk3710_port_info = { .init_dma = palm_bk3710_init_dma, .port_ops = &palm_bk3710_ports_ops, + .host_flags =IDE_HFLAG_MMIO , .pio_mask =ATA_PIO4 , .udma_mask =ATA_UDMA4 ,/* (input clk 99MHz) */ .mwdma_mask =ATA_MWDMA2 ,
drivers/ide/arm/rapide.c +1 -0
@@ -53,6 +53,7 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id)ide_init_port_hw (hwif, &hw); + hwif->host_flags =IDE_HFLAG_MMIO ;default_hwif_mmiops (hwif); idx[0 ] = hwif->index;
drivers/ide/cris/Makefile deleted +0 -3
@@ -1,3 +0,0 @@ -EXTRA_CFLAGS += -Idrivers/ide - -obj-$(CONFIG_IDE_ETRAX) += ide-cris.o
drivers/ide/cris/ide-cris.c deleted +0 -1086
1,086 lines not on this page · raw message
drivers/ide/h8300/ide-h8300.c +102 -6
126 lines not on this page · raw message
drivers/ide/ide-cd.c +10 -22
@@ -142,7 +142,6 @@ static void cdrom_analyze_sense_data(ide_drive_t *drive, {unsigned long sector;unsigned long bio_sectors; -unsigned long valid;struct cdrom_info *info = drive->driver_data;if (!cdrom_log_sense (drive, failed_command, sense))
@@ -173,17 +172,13 @@ static void cdrom_analyze_sense_data(ide_drive_t *drive, (sense->information[2 ] <<8 ) | (sense->information[3 ]); - bio_sectors =bio_sectors (failed_command->bio); -if (bio_sectors <4 ) - bio_sectors =4 ;if (drive->queue->hardsect_size ==2048 )/* device sector size is 2K */ sector <<=2 ; + + bio_sectors =max (bio_sectors (failed_command->bio),4U ); sector &= ~(bio_sectors -1 ); - valid = (sector - failed_command->sector) <<9 ; -if (valid <0 ) - valid =0 ;if (sector <get_capacity (info->disk) && drive->probed_capacity - sector <4 *75 )set_capacity (info->disk, sector);
@@ -555,14 +550,7 @@ static ide_startstop_t cdrom_start_packet_command(ide_drive_t *drive, ATAPI_WAIT_PC, cdrom_timer_expiry);return ide_started; }else { -unsigned long flags; - -/* packet command */ -spin_lock_irqsave (&ide_lock, flags); - hwif->OUTBSYNC (drive,WIN_PACKETCMD , - hwif->io_ports.command_addr); -ndelay (400 ); -spin_unlock_irqrestore (&ide_lock, flags); +ide_execute_pkt_cmd (drive);return (*handler) (drive); }
@@ -613,7 +601,7 @@ static ide_startstop_t cdrom_transfer_packet_command(ide_drive_t *drive, cmd_len =ATAPI_MIN_CDB_BYTES ;/* send the command to the device */ -HWIF (drive)->atapi_output_bytes (drive, rq->cmd, cmd_len); + hwif->output_data (drive,NULL , rq->cmd, cmd_len);/* start the DMA if need be */ if (info->dma)
@@ -629,7 +617,7 @@ static void ide_cd_pad_transfer(ide_drive_t *drive, xfer_func_t *xf, int len) {while (len >0 ) {int dum =0 ; -xf (drive, &dum,sizeof (dum)); +xf (drive,NULL , &dum,sizeof (dum)); len -=sizeof (dum); } }
@@ -639,7 +627,7 @@ static void ide_cd_drain_data(ide_drive_t *drive, int nsects)while (nsects >0 ) {static char dum[SECTOR_SIZE ]; - drive->hwif->atapi_input_bytes (drive, dum,sizeof (dum)); + drive->hwif->input_data (drive,NULL , dum,sizeof (dum)); nsects--; } }
@@ -666,7 +654,7 @@ static int ide_cd_check_ireason(ide_drive_t *drive, struct request *rq,printk (KERN_ERR "%s: %s: wrong transfer direction!\n" , drive->name, __func__); - xf = rw ? hwif->atapi_output_bytes : hwif->atapi_input_bytes; + xf = rw ? hwif->output_data : hwif->input_data;ide_cd_pad_transfer (drive, xf, len); }else if (rw ==0 && ireason ==1 ) {/*
@@ -1019,10 +1007,10 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)if (ireason ==0 ) { write =1 ; - xferfunc =HWIF (drive)->atapi_output_bytes; + xferfunc = hwif->output_data; }else { write =0 ; - xferfunc =HWIF (drive)->atapi_input_bytes; + xferfunc = hwif->input_data; }/* transfer data */
@@ -1061,7 +1049,7 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)if (blen > thislen) blen = thislen; -xferfunc (drive, ptr, blen); +xferfunc (drive,NULL , ptr, blen); thislen -= blen; len -= blen;
drivers/ide/ide-dma.c +3 -8
@@ -464,9 +464,10 @@ int ide_dma_setup(ide_drive_t *drive)/* PRD table */ if (hwif->mmio) -writel (hwif->dmatable_dma, (void __iomem *)hwif->dma_prdtable); +writel (hwif->dmatable_dma, + (void __iomem *)(hwif->dma_base +ATA_DMA_TABLE_OFS ));else -outl (hwif->dmatable_dma, hwif->dma_prdtable); +outl (hwif->dmatable_dma, hwif->dma_base +ATA_DMA_TABLE_OFS );/* specify r/w */ hwif->OUTB (reading, hwif->dma_command);
@@ -858,14 +859,8 @@ void ide_setup_dma(ide_hwif_t *hwif, unsigned long base)if (!hwif->dma_command) hwif->dma_command = hwif->dma_base +0 ; -if (!hwif->dma_vendor1) - hwif->dma_vendor1 = hwif->dma_base +1 ;if (!hwif->dma_status) hwif->dma_status = hwif->dma_base +2 ; -if (!hwif->dma_vendor3) - hwif->dma_vendor3 = hwif->dma_base +3 ; -if (!hwif->dma_prdtable) - hwif->dma_prdtable = hwif->dma_base +4 ; hwif->dma_ops = &sff_dma_ops; }
drivers/ide/ide-floppy.c +14 -13
@@ -231,6 +231,7 @@ static int idefloppy_end_request(ide_drive_t *drive, int uptodate, int nsecs)static void ide_floppy_io_buffers (ide_drive_t *drive,struct ide_atapi_pc *pc,unsigned int bcount,int direction) { +ide_hwif_t *hwif = drive->hwif;struct request *rq = pc->rq;struct req_iterator iter;struct bio_vec *bvec;
@@ -246,9 +247,9 @@ static void ide_floppy_io_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc, data =bvec_kmap_irq (bvec, &flags);if (direction) - drive->hwif->atapi_output_bytes (drive, data, count); + hwif->output_data (drive,NULL , data, count);else - drive->hwif->atapi_input_bytes (drive, data, count); + hwif->input_data (drive,NULL , data, count);bvec_kunmap_irq (data, &flags); bcount -= count;
@@ -261,10 +262,7 @@ static void ide_floppy_io_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc,if (bcount) {printk (KERN_ERR "%s: leftover data in %s, bcount == %d\n" , drive->name, __func__, bcount); -if (direction) -ide_atapi_write_zeros (drive, bcount); -else -ide_atapi_discard_data (drive, bcount); +ide_pad_transfer (drive, direction, bcount); } }
@@ -490,7 +488,7 @@ static ide_startstop_t idefloppy_pc_intr(ide_drive_t *drive)printk (KERN_ERR "ide-floppy: The floppy wants " "to send us more data than expected " "- discarding data\n" ); -ide_atapi_discard_data (drive, bcount); +ide_pad_transfer (drive,0 , bcount); ide_set_handler(drive, &idefloppy_pc_intr,
@@ -503,12 +501,12 @@ static ide_startstop_t idefloppy_pc_intr(ide_drive_t *drive) } }if (pc->flags &PC_FLAG_WRITING ) - xferfunc = hwif->atapi_output_bytes; + xferfunc = hwif->output_data;else - xferfunc = hwif->atapi_input_bytes; + xferfunc = hwif->input_data;if (pc->buf) -xferfunc (drive, pc->cur_pos, bcount); +xferfunc (drive,NULL , pc->cur_pos, bcount);else ide_floppy_io_buffers (drive, pc, bcount, !!(pc->flags &PC_FLAG_WRITING ));
@@ -548,8 +546,10 @@ static ide_startstop_t idefloppy_transfer_pc(ide_drive_t *drive)/* Set the interrupt routine */ ide_set_handler (drive, &idefloppy_pc_intr,IDEFLOPPY_WAIT_CMD ,NULL ); +/* Send the actual packet */ -HWIF (drive)->atapi_output_bytes (drive, floppy->pc->c,12 ); + hwif->output_data (drive,NULL , floppy->pc->c,12 ); +return ide_started; }
@@ -569,7 +569,8 @@ static int idefloppy_transfer_pc2(ide_drive_t *drive)idefloppy_floppy_t *floppy = drive->driver_data;/* Send the actual packet */ -HWIF (drive)->atapi_output_bytes (drive, floppy->pc->c,12 ); + drive->hwif->output_data (drive,NULL , floppy->pc->c,12 ); +/* Timeout for the packet command */ return IDEFLOPPY_WAIT_CMD ; }
@@ -692,7 +693,7 @@ static ide_startstop_t idefloppy_issue_pc(ide_drive_t *drive,return ide_started; }else {/* Issue the packet command */ - hwif->OUTB (WIN_PACKETCMD , hwif->io_ports.command_addr); +ide_execute_pkt_cmd (drive);return (*pkt_xfer_routine) (drive); } }
drivers/ide/ide-io.c +21 -47
98 lines not on this page · raw message
drivers/ide/ide-iops.c +202 -142
454 lines not on this page · raw message
drivers/ide/ide-lib.c +1 -1
@@ -487,7 +487,7 @@ static void ide_dump_sector(ide_drive_t *drive)else task.tf_flags =IDE_TFLAG_IN_LBA |IDE_TFLAG_IN_DEVICE ; -ide_tf_read (drive, &task); + drive->hwif->tf_read (drive, &task);if (lba48 || (tf->device &ATA_LBA )) printk(", LBAsect=%llu",
drivers/ide/ide-probe.c +4 -4
@@ -124,7 +124,7 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd) id = drive->id;/* read 512 bytes of id info */ - hwif->ata_input_data (drive, id,SECTOR_WORDS ); + hwif->input_data (drive,NULL , id,SECTOR_SIZE ); drive->id_read =1 ;local_irq_enable ();
@@ -293,7 +293,7 @@ static int actual_try_to_identify (ide_drive_t *drive, u8 cmd) hwif->OUTB (0 , io_ports->feature_addr);/* ask drive for ID */ - hwif->OUTB (cmd, io_ports->command_addr); + hwif->OUTBSYNC (drive, cmd, io_ports->command_addr); timeout = ((cmd ==WIN_IDENTIFY ) ?WAIT_WORSTCASE :WAIT_PIDENTIFY ) /2 ; timeout += jiffies;
@@ -480,7 +480,7 @@ static int do_probe (ide_drive_t *drive, u8 cmd)msleep (50 ); hwif->OUTB (drive->select.all, io_ports->device_addr);msleep (50 ); - hwif->OUTB (WIN_SRST , io_ports->command_addr); + hwif->OUTBSYNC (drive,WIN_SRST , io_ports->command_addr); (void )ide_busy_sleep (hwif); rc =try_to_identify (drive, cmd); }
@@ -516,7 +516,7 @@ static void enable_nest (ide_drive_t *drive)printk ("%s: enabling %s -- " , hwif->name, drive->id->model);SELECT_DRIVE (drive);msleep (50 ); - hwif->OUTB (EXABYTE_ENABLE_NEST , hwif->io_ports.command_addr); + hwif->OUTBSYNC (drive,EXABYTE_ENABLE_NEST , hwif->io_ports.command_addr);if (ide_busy_sleep (hwif)) {printk (KERN_CONT "failed (timeout)\n" );
drivers/ide/ide-tape.c +10 -9
@@ -395,13 +395,13 @@ static void idetape_input_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc,if (bh ==NULL ) {printk (KERN_ERR "ide-tape: bh == NULL in " "idetape_input_buffers\n" ); -ide_atapi_discard_data (drive, bcount); +ide_pad_transfer (drive,0 , bcount);return ; } count =min ( (unsigned int )(bh->b_size -atomic_read (&bh->b_count)), bcount); -HWIF (drive)->atapi_input_bytes (drive, bh->b_data + + drive->hwif->input_data (drive,NULL , bh->b_data +atomic_read (&bh->b_count), count); bcount -= count;atomic_add (count, &bh->b_count);
@@ -427,7 +427,7 @@ static void idetape_output_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc,return ; } count =min ((unsigned int )pc->b_count, (unsigned int )bcount); -HWIF (drive)->atapi_output_bytes (drive, pc->b_data, count); + drive->hwif->output_data (drive,NULL , pc->b_data, count); bcount -= count; pc->b_data += count; pc->b_count -= count;
@@ -871,7 +871,7 @@ static ide_startstop_t idetape_pc_intr(ide_drive_t *drive)printk (KERN_ERR "ide-tape: The tape wants to " "send us more data than expected " "- discarding data\n" ); -ide_atapi_discard_data (drive, bcount); +ide_pad_transfer (drive,0 , bcount);ide_set_handler (drive, &idetape_pc_intr,IDETAPE_WAIT_CMD ,NULL );return ide_started;
@@ -880,16 +880,16 @@ static ide_startstop_t idetape_pc_intr(ide_drive_t *drive) "data than expected - allowing transfer\n"); } iobuf = &idetape_input_buffers; - xferfunc = hwif->atapi_input_bytes; + xferfunc = hwif->input_data; }else { iobuf = &idetape_output_buffers; - xferfunc = hwif->atapi_output_bytes; + xferfunc = hwif->output_data; }if (pc->bh)iobuf (drive, pc, bcount);else -xferfunc (drive, pc->cur_pos, bcount); +xferfunc (drive,NULL , pc->cur_pos, bcount);/* Update the current position */ pc->xferred += bcount;
@@ -979,7 +979,8 @@ static ide_startstop_t idetape_transfer_pc(ide_drive_t *drive) hwif->dma_ops->dma_start (drive);#endif /* Send the actual packet */ -HWIF (drive)->atapi_output_bytes (drive, pc->c,12 ); + hwif->output_data (drive,NULL , pc->c,12 ); +return ide_started; }
@@ -1055,7 +1056,7 @@ static ide_startstop_t idetape_issue_pc(ide_drive_t *drive, IDETAPE_WAIT_CMD, NULL);return ide_started; }else { - hwif->OUTB (WIN_PACKETCMD , hwif->io_ports.command_addr); +ide_execute_pkt_cmd (drive);return idetape_transfer_pc (drive); } }
drivers/ide/ide-taskfile.c +16 -54
123 lines not on this page · raw message
drivers/ide/legacy/falconide.c +26 -0
@@ -44,6 +44,28 @@int falconide_intr_lock;EXPORT_SYMBOL (falconide_intr_lock); +static void falconide_input_data (ide_drive_t *drive,struct request *rq, +void *buf,unsigned int len) +{ +unsigned long data_addr = drive->hwif->io_ports.data_addr; + +if (drive->media == ide_disk && rq && rq->cmd_type ==REQ_TYPE_FS ) +return insw (data_addr, buf, (len +1 ) /2 ); + +insw_swapw (data_addr, buf, (len +1 ) /2 ); +} + +static void falconide_output_data (ide_drive_t *drive,struct request *rq, +void *buf,unsigned int len) +{ +unsigned long data_addr = drive->hwif->io_ports.data_addr; + +if (drive->media == ide_disk && rq && rq->cmd_type ==REQ_TYPE_FS ) +return outsw (data_adr, buf, (len +1 ) /2 ); + +outsw_swapw (data_addr, buf, (len +1 ) /2 ); +} +static void __init falconide_setup_ports (hw_regs_t *hw) {int i;
@@ -90,6 +112,10 @@ static int __init falconide_init(void)ide_init_port_data (hwif, index);ide_init_port_hw (hwif, &hw); +/* Atari has a byte-swapped IDE interface */ + hwif->input_data = falconide_input_data; + hwif->output_data = falconide_output_data; +ide_get_lock (NULL ,NULL );ide_device_add (idx,NULL );ide_release_lock ();
drivers/ide/legacy/ide_platform.c +3 -1
@@ -101,8 +101,10 @@ static int __devinit plat_ide_probe(struct platform_device *pdev)ide_init_port_hw (hwif, &hw); -if (mmio) +if (mmio) { + hwif->host_flags =IDE_HFLAG_MMIO ;default_hwif_mmiops (hwif); + } idx[0 ] = hwif->index;
drivers/ide/legacy/q40ide.c +24 -0
@@ -72,7 +72,27 @@ static void q40_ide_setup_ports(hw_regs_t *hw, unsigned long base, hw->ack_intr = ack_intr; } +static void q40ide_input_data (ide_drive_t *drive,struct request *rq, +void *buf,unsigned int len) +{ +unsigned long data_addr = drive->hwif->io_ports.data_addr; + +if (drive->media == ide_disk && rq && rq->cmd_type ==REQ_TYPE_FS ) +return insw (data_addr, buf, (len +1 ) /2 ); +insw_swapw (data_addr, buf, (len +1 ) /2 ); +} + +static void q40ide_output_data (ide_drive_t *drive,struct request *rq, +void *buf,unsigned int len) +{ +unsigned long data_addr = drive->hwif->io_ports.data_addr; + +if (drive->media == ide_disk && rq && rq->cmd_type ==REQ_TYPE_FS ) +return outsw (data_addr, buf, (len +1 ) /2 ); + +outsw_swapw (data_addr, buf, (len +1 ) /2 ); +}/* * the static array is needed to have the name reported in /proc/ioports,
@@ -123,6 +143,10 @@ static int __init q40ide_init(void)ide_init_port_data (hwif, hwif->index);ide_init_port_hw (hwif, &hw); +/* Q40 has a byte-swapped IDE interface */ + hwif->input_data = q40ide_input_data; + hwif->output_data = q40ide_output_data; + idx[i] = hwif->index; } }
drivers/ide/mips/au1xxx-ide.c +13 -4
@@ -48,8 +48,6 @@static _auide_hwif auide_hwif; -static int auide_ddma_init (_auide_hwif *auide); -#if defined(CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA )void auide_insw (unsigned long port,void *addr,u32 count)
@@ -88,6 +86,17 @@ void auide_outsw(unsigned long port, void *addr, u32 count) ctp->cur_ptr = au1xxx_ddma_get_nextptr_virt(dp); } +static void au1xxx_input_data (ide_drive_t *drive,struct request *rq, +void *buf,unsigned int len) +{ +auide_insw (drive->hwif->io_ports.data_addr, buf, (len +1 ) /2 ); +} + +static void au1xxx_output_data (ide_drive_t *drive,struct request *rq, +void *buf,unsigned int len) +{ +auide_outsw (drive->hwif->io_ports.data_addr, buf, (len +1 ) /2 ); +}#endif static void au1xxx_set_pio_mode (ide_drive_t *drive,const u8 pio)
@@ -598,8 +607,8 @@ static int au_ide_probe(struct device *dev)*/ #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA - hwif->INSW = auide_insw; - hwif->OUTSW = auide_outsw; + hwif->input_data = au1xxx_input_data; + hwif->output_data = au1xxx_output_data;#endif hwif->select_data =0 ;/* no chipset-specific code */ hwif->config_data =0 ;/* no chipset-specific code */
drivers/ide/mips/swarm.c +1 -0
@@ -109,6 +109,7 @@ static int __devinit swarm_ide_probe(struct device *dev) base =ioremap (offset, size);/* Setup MMIO ops. */ + hwif->host_flags =IDE_HFLAG_MMIO ;default_hwif_mmiops (hwif); hwif->chipset = ide_generic;
drivers/ide/pci/ns87415.c +44 -0
56 lines not on this page · raw message
drivers/ide/pci/pdc202xx_new.c +4 -4
@@ -83,8 +83,8 @@ static u8 get_indexed_reg(ide_hwif_t *hwif, u8 index) {u8 value; -outb (index, hwif->dma_vendor1); - value =inb (hwif->dma_vendor3); +outb (index, hwif->dma_base +1 ); + value =inb (hwif->dma_base +3 );DBG ("index[%02X] value[%02X]\n" , index, value);return value;
@@ -97,8 +97,8 @@ static u8 get_indexed_reg(ide_hwif_t *hwif, u8 index)*/ static void set_indexed_reg (ide_hwif_t *hwif,u8 index,u8 value) { -outb (index, hwif->dma_vendor1); -outb (value, hwif->dma_vendor3); +outb (index, hwif->dma_base +1 ); +outb (value, hwif->dma_base +3 );DBG ("index[%02X] value[%02X]\n" , index, value); }
drivers/ide/pci/piix.c +1 -0
@@ -250,6 +250,7 @@ static const struct ich_laptop ich_laptop[] = { { 0x27DF, 0x1043, 0x1267 }, /* ICH7 on Asus W5F */ { 0x27DF, 0x103C, 0x30A1 }, /* ICH7 on HP Compaq nc2400 */ { 0x24CA, 0x1025, 0x0061 }, /* ICH4 on Acer Aspire 2023WLMi */ + { 0x2653, 0x1043, 0x82D8 }, /* ICH6M on Asus Eee 701 *//* end marker */ { 0, } };
drivers/ide/pci/scc_pata.c +173 -23
267 lines not on this page · raw message
drivers/ide/pci/sgiioc4.c +1 -0
@@ -573,6 +573,7 @@ static const struct ide_port_info sgiioc4_port_info __devinitdata = { .init_dma = ide_dma_sgiioc4, .port_ops = &sgiioc4_port_ops, .dma_ops = &sgiioc4_dma_ops, + .host_flags = IDE_HFLAG_MMIO, .mwdma_mask = ATA_MWDMA2_ONLY, };
drivers/ide/pci/siimage.c +249 -290
144 lines not on this page · raw message
include/linux/ide.h +14 -39
53 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.