ide: minor improvements/cleanups
Subsystems (3)
cover ide: minor improvements/cleanups
On top of for-next branch of ide-2.6.git tree.
* BUG() on impossible conditions
* make ide_host_{alloc,add}() API less magic
* remove 'chipset' field from hw_regs_t
* remove few typedefs
diffstat:
drivers/ide/at91_ide.c | 7 +--- drivers/ide/au1xxx-ide.c | 8 ++--- drivers/ide/buddha.c | 9 ++--- drivers/ide/cmd640.c | 7 +--- drivers/ide/cs5520.c | 4 +- drivers/ide/delkin_cb.c | 6 +-- drivers/ide/falconide.c | 9 ++--- drivers/ide/gayle.c | 9 ++--- drivers/ide/icside.c | 13 ++++---- drivers/ide/ide-4drives.c | 6 +-- drivers/ide/ide-cd.c | 8 +---- drivers/ide/ide-cs.c | 6 +-- drivers/ide/ide-disk.c | 13 +------- drivers/ide/ide-eh.c | 9 ++--- drivers/ide/ide-floppy.c | 6 +-- drivers/ide/ide-generic.c | 7 +--- drivers/ide/ide-h8300.c | 10 +++--- drivers/ide/ide-io.c | 69 ++++++++++++++++++--------------------------- drivers/ide/ide-legacy.c | 7 +--- drivers/ide/ide-pnp.c | 6 +-- drivers/ide/ide-probe.c | 25 +++++++--------- drivers/ide/ide-tape.c | 10 ------ drivers/ide/ide-taskfile.c | 2 - drivers/ide/ide_platform.c | 9 ++--- drivers/ide/macide.c | 9 ++--- drivers/ide/palm_bk3710.c | 6 +-- drivers/ide/pmac.c | 13 ++++---- drivers/ide/q40ide.c | 11 +++---- drivers/ide/rapide.c | 8 ++--- drivers/ide/scc_pata.c | 6 +-- drivers/ide/setup-pci.c | 21 ++++++------- drivers/ide/sgiioc4.c | 7 +--- drivers/ide/siimage.c | 4 +- drivers/ide/tx4938ide.c | 5 +-- drivers/ide/tx4939ide.c | 5 +-- include/linux/ide.h | 37 +++++++++--------------- 36 files changed, 171 insertions(+), 226 deletions(-)
PATCH 1/7 ide: BUG() on unknown requests
Unsupported requests should be never handed down to device drivers and the best thing we can do upon discovering such request inside driver's ->do_request method is to just BUG().
--- drivers/ide/ide-cd.c | 8 ++------ drivers/ide/ide-disk.c | 9 +-------- drivers/ide/ide-floppy.c | 6 ++---- drivers/ide/ide-tape.c | 10 +--------- 4 files changed, 6 insertions(+), 27 deletions(-)
drivers/ide/ide-cd.c +2 -6
@@ -831,12 +831,8 @@ static ide_startstop_t ide_cd_do_request/* right now this can only be a reset... */ uptodate =1 ; goto out_end; - }else { -blk_dump_rq_flags (rq,DRV_NAME " bad flags" ); -if (rq->errors ==0 ) - rq->errors = -EIO ; - goto out_end; - } + }else +BUG ();/* prepare sense request for this command */ ide_prep_sense (drive, rq);
drivers/ide/ide-disk.c +1 -8
@@ -184,14 +184,7 @@ static ide_startstop_t ide_do_rw_disk(idide_hwif_t *hwif = drive->hwif;BUG_ON (drive->dev_flags &IDE_DFLAG_BLOCKED ); - -if (!blk_fs_request (rq)) { -blk_dump_rq_flags (rq,"ide_do_rw_disk - bad command" ); -if (rq->errors ==0 ) - rq->errors = -EIO ; -ide_complete_rq (drive, -EIO ,ide_rq_bytes (rq)); -return ide_stopped; - } +BUG_ON (!blk_fs_request (rq));ledtrig_ide_activity ();
drivers/ide/ide-floppy.c +2 -4
@@ -272,10 +272,8 @@ static ide_startstop_t ide_floppy_do_req }else if (blk_pc_request (rq)) { pc = &floppy->queued_pc;idefloppy_blockpc_cmd (floppy, pc, rq); - }else { -blk_dump_rq_flags (rq,PFX "unsupported command in queue" ); - goto out_end; - } + }else +BUG ();ide_prep_sense (drive, rq);
drivers/ide/ide-tape.c +1 -9
@@ -620,15 +620,7 @@ static ide_startstop_t idetape_do_reques debug_log(DBG_SENSE, "sector: %llu, nr_sectors: %u\n" (unsigned long long)blk_rq_pos(rq), blk_rq_sectors(rq)); -if (!(blk_special_request (rq) ||blk_sense_request (rq))) { -/* We do not support buffer cache originated requests. */ -printk (KERN_NOTICE "ide-tape: %s: Unsupported request in " -"request queue (%d)\n" , drive->name, rq->cmd_type); -if (blk_fs_request (rq) ==0 && rq->errors ==0 ) - rq->errors = -EIO ; -ide_complete_rq (drive, -EIO ,ide_rq_bytes (rq)); -return ide_stopped; - } +BUG_ON (!(blk_special_request (rq) ||blk_sense_request (rq)));/* Retry a failed packet command */ if (drive->failed_pc && drive->pc->c[0 ] ==REQUEST_SENSE ) {
PATCH 2/7 ide: BUG() on unknown flags in ide_disk_special()
In reply to Bartlomiej Zolnierkiewicz--- drivers/ide/ide-io.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/ide/ide-io.c +2 -6
@@ -201,12 +201,8 @@ static ide_startstop_t ide_disk_special( }else if (s->b.set_multmode) { s->b.set_multmode =0 ;ide_tf_set_setmult_cmd (drive, &cmd.tf); - }else if (s->all) { -int special = s->all; - s->all =0 ; -printk (KERN_ERR "%s: bad special flag: 0x%02x\n" , drive->name, special); -return ide_stopped; - } + }else +BUG (); cmd.valid.out.tf =IDE_VALID_OUT_TF |IDE_VALID_DEVICE ; cmd.valid.in.tf =IDE_VALID_IN_TF |IDE_VALID_DEVICE ;
PATCH 3/7 ide: merge ide_disk_special() into do_special()
In reply to Bartlomiej ZolnierkiewiczWhile at it:
- change debug printk() level to KERN_DEBUG
- update documentation
There should be no functional changes caused by this patch.
--- drivers/ide/ide-io.c | 44 ++++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 26 deletions(-)
drivers/ide/ide-io.c +18 -26
@@ -184,11 +184,28 @@ static void ide_tf_set_setmult_cmd(ide_d tf->command =ATA_CMD_SET_MULTI ; } -static ide_startstop_t ide_disk_special (ide_drive_t *drive) +/** +* do_special - issue some special commands +* @drive: drive the command is for +* +* do_special() is used to issue ATA_CMD_INIT_DEV_PARAMS, +* ATA_CMD_RESTORE and ATA_CMD_SET_MULTI commands to a drive. +*/ + +static ide_startstop_t do_special (ide_drive_t *drive) {special_t *s = &drive->special;struct ide_cmd cmd; +#ifdef DEBUG +printk (KERN_DEBUG "%s: %s: 0x%02x\n" , drive->name, s->all); +#endif +if (drive->media != ide_disk) { + s->all =0 ; + drive->mult_req =0 ; +return ide_stopped; + } +memset (&cmd,0 ,sizeof (cmd)); cmd.protocol =ATA_PROT_NODATA ;
@@ -213,31 +230,6 @@ static ide_startstop_t ide_disk_special(return ide_started; } -/** -* do_special - issue some special commands -* @drive: drive the command is for -* -* do_special() is used to issue ATA_CMD_INIT_DEV_PARAMS, -* ATA_CMD_RESTORE and ATA_CMD_SET_MULTI commands to a drive. -* -* It used to do much more, but has been scaled back. -*/ - -static ide_startstop_t do_special (ide_drive_t *drive) -{ -special_t *s = &drive->special; - -#ifdef DEBUG -printk ("%s: do_special: 0x%02x\n" , drive->name, s->all); -#endif -if (drive->media == ide_disk) -return ide_disk_special (drive); - - s->all =0 ; - drive->mult_req =0 ; -return ide_stopped; -} -void ide_map_sg (ide_drive_t *drive,struct ide_cmd *cmd) {ide_hwif_t *hwif = drive->hwif;
PATCH 4/7 ide: replace special_t typedef by IDE_SFLAG_* flags
In reply to Bartlomiej ZolnierkiewiczReplace:
- special_t typedef by IDE_SFLAG_* flags
- 'special_t special' ide_drive_t's field by 'u8 special_flags' one
There should be no functional changes caused by this patch.
--- drivers/ide/ide-disk.c | 4 ++-- drivers/ide/ide-eh.c | 9 ++++----- drivers/ide/ide-io.c | 21 +++++++++++---------- drivers/ide/ide-probe.c | 6 +++--- drivers/ide/ide-taskfile.c | 2 +- drivers/ide/siimage.c | 4 ++-- include/linux/ide.h | 21 ++++++--------------- 7 files changed, 29 insertions(+), 38 deletions(-)
drivers/ide/ide-disk.c +2 -2
@@ -421,14 +421,14 @@ static int set_multcount(ide_drive_t *drif (arg <0 || arg > (drive->id[ATA_ID_MAX_MULTSECT ] &0xff ))return -EINVAL ; -if (drive->special.b.set_multmode) +if (drive->special_flags &IDE_SFLAG_SET_MULTMODE )return -EBUSY ; rq =blk_get_request (drive->queue,READ , __GFP_WAIT); rq->cmd_type =REQ_TYPE_ATA_TASKFILE ; drive->mult_req = arg; - drive->special.b.set_multmode =1 ; + drive->special_flags |=IDE_SFLAG_SET_MULTMODE ; error =blk_execute_rq (drive->queue,NULL , rq,0 );blk_put_request (rq);
drivers/ide/ide-eh.c +4 -5
@@ -52,7 +52,7 @@ static ide_startstop_t ide_ata_error(ide }if ((rq->errors &ERROR_RECAL ) ==ERROR_RECAL ) - drive->special.b.recalibrate =1 ; + drive->special_flags |=IDE_SFLAG_RECALIBRATE ; ++rq->errors;
@@ -268,9 +268,8 @@ static void ide_disk_pre_reset(ide_drive {int legacy = (drive->id[ATA_ID_CFS_ENABLE_2 ] &0x0400 ) ?0 :1 ; - drive->special.all =0 ; - drive->special.b.set_geometry = legacy; - drive->special.b.recalibrate = legacy; + drive->special_flags = + legacy ? (IDE_SFLAG_SET_GEOMETRY |IDE_SFLAG_RECALIBRATE ) :0 ; drive->mult_count =0 ; drive->dev_flags &= ~IDE_DFLAG_PARKED ;
@@ -280,7 +279,7 @@ static void ide_disk_pre_reset(ide_drive drive->mult_req =0 ;if (drive->mult_req != drive->mult_count) - drive->special.b.set_multmode =1 ; + drive->special_flags |=IDE_SFLAG_SET_MULTMODE ; }static void pre_reset (ide_drive_t *drive)
drivers/ide/ide-io.c +11 -10
@@ -194,14 +194,14 @@ static void ide_tf_set_setmult_cmd(ide_dstatic ide_startstop_t do_special (ide_drive_t *drive) { -special_t *s = &drive->special;struct ide_cmd cmd;#ifdef DEBUG -printk (KERN_DEBUG "%s: %s: 0x%02x\n" , drive->name, s->all); +printk (KERN_DEBUG "%s: %s: 0x%02x\n" , drive->name, + drive->special_flags);#endif if (drive->media != ide_disk) { - s->all =0 ; + drive->special_flags =0 ; drive->mult_req =0 ;return ide_stopped; }
@@ -209,14 +209,14 @@ static ide_startstop_t do_special(ide_drmemset (&cmd,0 ,sizeof (cmd)); cmd.protocol =ATA_PROT_NODATA ; -if (s->b.set_geometry) { - s->b.set_geometry =0 ; +if (drive->special_flags &IDE_SFLAG_SET_GEOMETRY ) { + drive->special_flags &= ~IDE_SFLAG_SET_GEOMETRY ;ide_tf_set_specify_cmd (drive, &cmd.tf); - }else if (s->b.recalibrate) { - s->b.recalibrate =0 ; + }else if (drive->special_flags &IDE_SFLAG_RECALIBRATE ) { + drive->special_flags &= ~IDE_SFLAG_RECALIBRATE ;ide_tf_set_restore_cmd (drive, &cmd.tf); - }else if (s->b.set_multmode) { - s->b.set_multmode =0 ; + }else if (drive->special_flags &IDE_SFLAG_SET_MULTMODE ) { + drive->special_flags &= ~IDE_SFLAG_SET_MULTMODE ;ide_tf_set_setmult_cmd (drive, &cmd.tf); }else BUG ();
@@ -339,7 +339,8 @@ static ide_startstop_t start_request (idprintk (KERN_ERR "%s: drive not ready for command\n" , drive->name);return startstop; } -if (!drive->special.all) { + +if (drive->special_flags ==0 ) {struct ide_driver *drv;/*
drivers/ide/ide-probe.c +3 -3
@@ -97,7 +97,7 @@ static void ide_disk_init_mult_count(ide drive->mult_req = id[ATA_ID_MULTSECT ] &0xff ;if (drive->mult_req) - drive->special.b.set_multmode =1 ; + drive->special_flags |=IDE_SFLAG_SET_MULTMODE ; } }
@@ -1129,8 +1129,8 @@ static void ide_port_init_devices_data(i drive->hwif = hwif; drive->ready_stat =ATA_DRDY ; drive->bad_wstat =BAD_W_STAT ; - drive->special.b.recalibrate =1 ; - drive->special.b.set_geometry =1 ; + drive->special_flags =IDE_SFLAG_RECALIBRATE | +IDE_SFLAG_SET_GEOMETRY ; drive->name[0 ] ='h' ; drive->name[1 ] ='d' ; drive->name[2 ] ='a' + j;
drivers/ide/ide-taskfile.c +1 -1
@@ -166,7 +166,7 @@ static ide_startstop_t task_no_data_intrif (!OK_STAT (stat,ATA_DRDY ,BAD_STAT )) {if (custom && tf->command ==ATA_CMD_SET_MULTI ) { drive->mult_req = drive->mult_count =0 ; - drive->special.b.recalibrate =1 ; + drive->special_flags |=IDE_SFLAG_RECALIBRATE ; (void )ide_dump_status (drive, __func__, stat);return ide_stopped; }else if (custom && tf->command ==ATA_CMD_INIT_DEV_PARAMS ) {
drivers/ide/siimage.c +2 -2
@@ -451,8 +451,8 @@ static int sil_sata_reset_poll(ide_drivestatic void sil_sata_pre_reset (ide_drive_t *drive) {if (drive->media == ide_disk) { - drive->special.b.set_geometry =0 ; - drive->special.b.recalibrate =0 ; + drive->special_flags &= + ~(IDE_SFLAG_SET_GEOMETRY |IDE_SFLAG_RECALIBRATE ); } }
include/linux/ide.h +6 -15
@@ -218,21 +218,12 @@ static inline void ide_std_init_ports(hw/* * Special Driver Flags -* -* set_geometry : respecify drive geometry -* recalibrate : seek to cyl 0 -* set_multmode : set multmode count -* reserved : unused */ -typedef union { -unsigned all :8 ; -struct { -unsigned set_geometry :1 ; -unsigned recalibrate :1 ; -unsigned set_multmode :1 ; -unsigned reserved :5 ; - } b; -}special_t ; +enum { +IDE_SFLAG_SET_GEOMETRY = (1 <<0 ), +IDE_SFLAG_RECALIBRATE = (1 <<1 ), +IDE_SFLAG_SET_MULTMODE = (1 <<2 ), +};/* * Status returned from various ide_ functions
@@ -530,7 +521,7 @@ struct ide_drive_s {unsigned long sleep;/* sleep until this time */ unsigned long timeout;/* max time to wait for irq */ -special_t special;/* special action flags */ +u8 special_flags;/* special action flags */ u8 select;/* basic drive/head select reg value */ u8 retry_pio;/* retrying dma capable host in pio */
PATCH 5/7 ide: remove chipset field from hw_regs_t
In reply to Bartlomiej Zolnierkiewicz* Convert host drivers that still use hw_regs_t's chipset field to use the one in struct ide_port_info instead.
* Move special handling of ide_pci chipset type from ide_hw_configure() to ide_init_port().
* Remove chipset field from hw_regs_t.
While at it:
- remove stale comment in delkin_cb.c
There should be no functional changes caused by this patch.
--- drivers/ide/at91_ide.c | 2 +- drivers/ide/au1xxx-ide.c | 2 +- drivers/ide/buddha.c | 3 +-- drivers/ide/cmd640.c | 2 -- drivers/ide/delkin_cb.c | 2 +- drivers/ide/falconide.c | 3 +-- drivers/ide/gayle.c | 3 +-- drivers/ide/icside.c | 3 ++- drivers/ide/ide-4drives.c | 2 +- drivers/ide/ide-cs.c | 2 +- drivers/ide/ide-generic.c | 3 +-- drivers/ide/ide-h8300.c | 2 +- drivers/ide/ide-legacy.c | 1 - drivers/ide/ide-pnp.c | 2 +- drivers/ide/ide-probe.c | 4 +--- drivers/ide/ide_platform.c | 3 +-- drivers/ide/macide.c | 3 +-- drivers/ide/palm_bk3710.c | 2 +- drivers/ide/q40ide.c | 3 +-- drivers/ide/rapide.c | 2 +- drivers/ide/scc_pata.c | 2 +- drivers/ide/setup-pci.c | 1 - drivers/ide/sgiioc4.c | 1 - include/linux/ide.h | 1 - 24 files changed, 20 insertions(+), 34 deletions(-)
drivers/ide/at91_ide.c +1 -1
@@ -216,6 +216,7 @@ static const struct ide_port_info at91_i .host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA | IDE_HFLAG_SINGLE | IDE_HFLAG_NO_IO_32BIT | IDE_HFLAG_UNMASK_IRQS, .pio_mask = ATA_PIO6, + .chipset = ide_generic, };/*
@@ -304,7 +305,6 @@ static int __init at91_ide_probe(structide_std_init_ports (&hw, tf_base, ctl_base +6 ); hw.irq = board->irq_pin; - hw.chipset = ide_generic; hw.dev = &pdev->dev; host =ide_host_alloc (&at91_ide_port_info, hws);
drivers/ide/au1xxx-ide.c +1 -1
@@ -499,6 +499,7 @@ static const struct ide_port_info au1xxx#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA .mwdma_mask = ATA_MWDMA2, #endif + .chipset = ide_au1xxx, };static int au_ide_probe (struct platform_device *dev)
@@ -548,7 +549,6 @@ static int au_ide_probe(struct platform_auide_setup_ports (&hw, ahwif); hw.irq = ahwif->irq; hw.dev = &dev->dev; - hw.chipset = ide_au1xxx; ret =ide_host_add (&au1xxx_port_info, hws, &host);if (ret)
drivers/ide/buddha.c +1 -2
@@ -139,13 +139,12 @@ static void __init buddha_setup_ports(hw hw->irq =IRQ_AMIGA_PORTS ; hw->ack_intr = ack_intr; - - hw->chipset = ide_generic; }static const struct ide_port_info buddha_port_info = { .host_flags =IDE_HFLAG_MMIO |IDE_HFLAG_NO_DMA , .irq_flags =IRQF_SHARED , + .chipset = ide_generic, };/*
drivers/ide/cmd640.c +0 -2
@@ -762,11 +762,9 @@ static int __init cmd640x_init(void)ide_std_init_ports (&hw[0 ],0x1f0 ,0x3f6 ); hw[0 ].irq =14 ; - hw[0 ].chipset = ide_cmd640;ide_std_init_ports (&hw[1 ],0x170 ,0x376 ); hw[1 ].irq =15 ; - hw[1 ].chipset = ide_cmd640;printk (KERN_INFO "cmd640: buggy cmd640%c interface on %s, config=0x%02x" "\n" ,'a' + cmd640_chip_version -1 , bus_type, cfr);
drivers/ide/delkin_cb.c +1 -1
@@ -68,6 +68,7 @@ static const struct ide_port_info delkin IDE_HFLAG_NO_DMA, .irq_flags = IRQF_SHARED, .init_chipset = delkin_cb_init_chipset, + .chipset = ide_pci, }; static int __devinit
@@ -97,7 +98,6 @@ delkin_cb_probe (struct pci_dev *dev, coide_std_init_ports (&hw, base +0x10 , base +0x1e ); hw.irq = dev->irq; hw.dev = &dev->dev; - hw.chipset = ide_pci;/* this enables IRQ sharing */ rc =ide_host_add (&delkin_cb_port_info, hws, &host);if (rc)
drivers/ide/falconide.c +1 -2
@@ -111,6 +111,7 @@ static const struct ide_port_info falcon .host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_SERIALIZE | IDE_HFLAG_NO_DMA, .irq_flags = IRQF_SHARED, + .chipset = ide_generic, };static void __init falconide_setup_ports (hw_regs_t *hw)
@@ -128,8 +129,6 @@ static void __init falconide_setup_ports hw->irq =IRQ_MFP_IDE ; hw->ack_intr =NULL ; - - hw->chipset = ide_generic; }/*
drivers/ide/gayle.c +1 -2
@@ -106,14 +106,13 @@ static void __init gayle_setup_ports(hw_ hw->irq =IRQ_AMIGA_PORTS ; hw->ack_intr = ack_intr; - - hw->chipset = ide_generic; }static const struct ide_port_info gayle_port_info = { .host_flags =IDE_HFLAG_MMIO |IDE_HFLAG_SERIALIZE |IDE_HFLAG_NO_DMA , .irq_flags =IRQF_SHARED , + .chipset = ide_generic, };/*
drivers/ide/icside.c +2 -1
@@ -398,11 +398,11 @@ static void icside_setup_ports(hw_regs_t hw->irq = ec->irq; hw->dev = &ec->dev; - hw->chipset = ide_acorn; }static const struct ide_port_info icside_v5_port_info = { .host_flags =IDE_HFLAG_NO_DMA , + .chipset = ide_acorn, }; static int __devinit
@@ -457,6 +457,7 @@ static const struct ide_port_info icside .host_flags = IDE_HFLAG_SERIALIZE | IDE_HFLAG_MMIO, .mwdma_mask = ATA_MWDMA2, .swdma_mask = ATA_SWDMA2, + .chipset = ide_acorn, }; static int __devinit
drivers/ide/ide-4drives.c +1 -1
@@ -25,6 +25,7 @@ static const struct ide_port_info ide_4d .port_ops = &ide_4drives_port_ops, .host_flags = IDE_HFLAG_SERIALIZE | IDE_HFLAG_NO_DMA | IDE_HFLAG_4DRIVES, + .chipset = ide_4drives, };static int __init ide_4drives_init (void )
@@ -52,7 +53,6 @@ static int __init ide_4drives_init(void)ide_std_init_ports (&hw, base, ctl); hw.irq =14 ; - hw.chipset = ide_4drives;return ide_host_add (&ide_4drives_port_info, hws,NULL ); }
drivers/ide/ide-cs.c +1 -1
@@ -155,6 +155,7 @@ static const struct ide_port_info idecs_ .port_ops = &idecs_port_ops, .host_flags = IDE_HFLAG_NO_DMA, .irq_flags = IRQF_SHARED, + .chipset = ide_pci, }; static struct ide_host *idecs_register(unsigned long io, unsigned long ctl,
@@ -181,7 +182,6 @@ static struct ide_host *idecs_register(umemset (&hw,0 ,sizeof (hw));ide_std_init_ports (&hw, io, ctl); hw.irq = irq; - hw.chipset = ide_pci; hw.dev = &handle->dev; rc =ide_host_add (&idecs_port_info, hws, &host);
drivers/ide/ide-generic.c +1 -2
@@ -29,6 +29,7 @@ MODULE_PARM_DESC(probe_mask, "probe maskstatic const struct ide_port_info ide_generic_port_info = { .host_flags =IDE_HFLAG_NO_DMA , + .chipset = ide_generic, };#ifdef CONFIG_ARM
@@ -132,8 +133,6 @@ static int __init ide_generic_init(void)#else hw.irq = legacy_irqs[i];#endif - hw.chipset = ide_generic; - rc =ide_host_add (&ide_generic_port_info, hws,NULL );if (rc) {release_region (io_addr +0x206 ,1 );
drivers/ide/ide-h8300.c +1 -1
@@ -73,12 +73,12 @@ static inline void hw_setup(hw_regs_t *h hw->io_ports_array[i] =CONFIG_H8300_IDE_BASE +H8300_IDE_GAP *i; hw->io_ports.ctl_addr =CONFIG_H8300_IDE_ALT ; hw->irq =EXT_IRQ0 +CONFIG_H8300_IDE_IRQ ; - hw->chipset = ide_generic; }static const struct ide_port_info h8300_port_info = { .tp_ops = &h8300_tp_ops, .host_flags =IDE_HFLAG_NO_IO_32BIT |IDE_HFLAG_NO_DMA , + .chipset = ide_generic, };static int __init h8300_ide_init (void )
drivers/ide/ide-legacy.c +0 -1
@@ -33,7 +33,6 @@ static void ide_legacy_init_one(hw_regs_ide_std_init_ports (hw, base, ctl); hw->irq = irq; - hw->chipset = d->chipset; hw->config = config; hws[port_no] = hw;
drivers/ide/ide-pnp.c +1 -1
@@ -29,6 +29,7 @@ static struct pnp_device_id idepnp_devicstatic const struct ide_port_info ide_pnp_port_info = { .host_flags =IDE_HFLAG_NO_DMA , + .chipset = ide_generic, };static int idepnp_probe (struct pnp_dev *dev,const struct pnp_device_id *dev_id)
@@ -62,7 +63,6 @@ static int idepnp_probe(struct pnp_dev *memset (&hw,0 ,sizeof (hw));ide_std_init_ports (&hw, base, ctl); hw.irq =pnp_irq (dev,0 ); - hw.chipset = ide_generic; rc =ide_host_add (&ide_pnp_port_info, hws, &host);if (rc)
drivers/ide/ide-probe.c +1 -3
@@ -1039,8 +1039,7 @@ static void ide_init_port(ide_hwif_t *hw { hwif->channel = port; -if (d->chipset) - hwif->chipset = d->chipset; + hwif->chipset = d->chipset ? d->chipset : ide_pci;if (d->init_iops) d->init_iops (hwif);
@@ -1169,7 +1168,6 @@ static void ide_init_port_hw(ide_hwif_t {memcpy (&hwif->io_ports, &hw->io_ports,sizeof (hwif->io_ports)); hwif->irq = hw->irq; - hwif->chipset = hw->chipset; hwif->dev = hw->dev; hwif->gendev.parent = hw->parent ? hw->parent : hw->dev; hwif->ack_intr = hw->ack_intr;
drivers/ide/ide_platform.c +1 -2
@@ -40,12 +40,11 @@ static void __devinit plat_ide_setup_por hw->io_ports.ctl_addr = (unsigned long )ctrl; hw->irq = irq; - - hw->chipset = ide_generic; }static const struct ide_port_info platform_ide_port_info = { .host_flags =IDE_HFLAG_NO_DMA , + .chipset = ide_generic, };static int __devinit plat_ide_probe (struct platform_device *pdev)
drivers/ide/macide.c +1 -2
@@ -76,13 +76,12 @@ static void __init macide_setup_ports(hw hw->irq = irq; hw->ack_intr = ack_intr; - - hw->chipset = ide_generic; }static const struct ide_port_info macide_port_info = { .host_flags =IDE_HFLAG_MMIO |IDE_HFLAG_NO_DMA , .irq_flags =IRQF_SHARED , + .chipset = ide_generic, }; static const char *mac_ide_name[] =
drivers/ide/palm_bk3710.c +1 -1
@@ -306,6 +306,7 @@ static struct ide_port_info __devinitdat .host_flags = IDE_HFLAG_MMIO, .pio_mask = ATA_PIO4, .mwdma_mask = ATA_MWDMA2, + .chipset = ide_palm3710, };static int __init palm_bk3710_probe (struct platform_device *pdev)
@@ -363,7 +364,6 @@ static int __init palm_bk3710_probe(stru (base +IDE_PALM_ATA_PRI_CTL_OFFSET ); hw.irq = irq->start; hw.dev = &pdev->dev; - hw.chipset = ide_palm3710; palm_bk3710_port_info.udma_mask = rate <100000000 ?ATA_UDMA4 :ATA_UDMA5 ;
drivers/ide/q40ide.c +1 -2
@@ -70,8 +70,6 @@ static void q40_ide_setup_ports(hw_regs_ hw->irq = irq; hw->ack_intr = ack_intr; - - hw->chipset = ide_generic; } static void q40ide_input_data(ide_drive_t *drive, struct ide_cmd *cmd,
@@ -119,6 +117,7 @@ static const struct ide_port_info q40ide .tp_ops = &q40ide_tp_ops, .host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA, .irq_flags = IRQF_SHARED, + .chipset = ide_generic, };/*
drivers/ide/rapide.c +1 -1
@@ -13,6 +13,7 @@static const struct ide_port_info rapide_port_info = { .host_flags =IDE_HFLAG_MMIO |IDE_HFLAG_NO_DMA , + .chipset = ide_generic, }; static void rapide_setup_ports(hw_regs_t *hw, void __iomem *base,
@@ -49,7 +50,6 @@ rapide_probe(struct expansion_card *ec,memset (&hw,0 ,sizeof (hw));rapide_setup_ports (&hw, base, base +0x818 ,1 <<6 , ec->irq); - hw.chipset = ide_generic; hw.dev = &ec->dev; ret =ide_host_add (&rapide_port_info, hws, &host);
drivers/ide/scc_pata.c +1 -1
@@ -567,7 +567,6 @@ static int scc_ide_setup_pci_device(stru hw.io_ports_array[i] = ports->dma +0x20 + i *4 ; hw.irq = dev->irq; hw.dev = &dev->dev; - hw.chipset = ide_pci; rc =ide_host_add (d, hws, &host);if (rc)
@@ -823,6 +822,7 @@ static const struct ide_port_info scc_ch .host_flags = IDE_HFLAG_SINGLE, .irq_flags = IRQF_SHARED, .pio_mask = ATA_PIO4, + .chipset = ide_pci, };/**
drivers/ide/setup-pci.c +0 -1
@@ -344,7 +344,6 @@ static int ide_hw_configure(struct pci_dmemset (hw,0 ,sizeof (*hw)); hw->dev = &dev->dev; - hw->chipset = d->chipset ? d->chipset : ide_pci;ide_std_init_ports (hw, base, ctl |2 );return 0 ;
drivers/ide/sgiioc4.c +0 -1
@@ -575,7 +575,6 @@ sgiioc4_ide_setup_pci_device(struct pci_memset (&hw,0 ,sizeof (hw));sgiioc4_init_hwif_ports (&hw, cmd_base, ctl, irqport); hw.irq = dev->irq; - hw.chipset = ide_pci; hw.dev = &dev->dev;/* Initializing chipset IRQ Registers */
include/linux/ide.h +0 -1
@@ -186,7 +186,6 @@ typedef struct hw_regs_s {int irq;/* our irq number */ ide_ack_intr_t *ack_intr;/* acknowledge interrupt */ -hwif_chipset_t chipset;struct device *dev, *parent;unsigned long config; } hw_regs_t;
PATCH 6/7 ide: pass number of ports to ide_host_{alloc,add}()
In reply to Bartlomiej ZolnierkiewiczPass number of ports to ide_host_{alloc,add}() and then update all users accordingly.
There should be no functional changes caused by this patch.
--- drivers/ide/at91_ide.c | 5 ++--- drivers/ide/au1xxx-ide.c | 4 ++-- drivers/ide/buddha.c | 4 ++-- drivers/ide/cmd640.c | 5 +++-- drivers/ide/cs5520.c | 4 ++-- drivers/ide/delkin_cb.c | 4 ++-- drivers/ide/falconide.c | 4 ++-- drivers/ide/gayle.c | 4 ++-- drivers/ide/icside.c | 8 ++++---- drivers/ide/ide-4drives.c | 4 ++-- drivers/ide/ide-cs.c | 4 ++-- drivers/ide/ide-generic.c | 4 ++-- drivers/ide/ide-h8300.c | 4 ++-- drivers/ide/ide-legacy.c | 4 ++-- drivers/ide/ide-pnp.c | 4 ++-- drivers/ide/ide-probe.c | 9 +++++---- drivers/ide/ide_platform.c | 4 ++-- drivers/ide/macide.c | 4 ++-- drivers/ide/palm_bk3710.c | 4 ++-- drivers/ide/pmac.c | 4 ++-- drivers/ide/q40ide.c | 4 ++-- drivers/ide/rapide.c | 4 ++-- drivers/ide/scc_pata.c | 4 ++-- drivers/ide/setup-pci.c | 6 +++--- drivers/ide/sgiioc4.c | 4 ++-- drivers/ide/tx4938ide.c | 5 ++--- drivers/ide/tx4939ide.c | 5 ++--- include/linux/ide.h | 5 +++-- 28 files changed, 64 insertions(+), 64 deletions(-)
drivers/ide/at91_ide.c +2 -3
@@ -247,8 +247,7 @@ irqreturn_t at91_irq_handler(int irq, vostatic int __init at91_ide_probe (struct platform_device *pdev) {int ret; -hw_regs_t hw; -hw_regs_t *hws[] = { &hw,NULL ,NULL ,NULL }; +hw_regs_t hw, *hws[] = { &hw };struct ide_host *host;struct resource *res;unsigned long tf_base =0 , ctl_base =0 ;
@@ -307,7 +306,7 @@ static int __init at91_ide_probe(struct hw.irq = board->irq_pin; hw.dev = &pdev->dev; - host =ide_host_alloc (&at91_ide_port_info, hws); + host =ide_host_alloc (&at91_ide_port_info, hws,1 );if (!host) {perr ("failed to allocate ide host\n" );return -ENOMEM ;
drivers/ide/au1xxx-ide.c +2 -2
@@ -508,7 +508,7 @@ static int au_ide_probe(struct platform_struct resource *res;struct ide_host *host;int ret =0 ; -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +hw_regs_t hw, *hws[] = { &hw };#if defined(CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA )char *mode ="MWDMA2" ;
@@ -550,7 +550,7 @@ static int au_ide_probe(struct platform_ hw.irq = ahwif->irq; hw.dev = &dev->dev; - ret =ide_host_add (&au1xxx_port_info, hws, &host); + ret =ide_host_add (&au1xxx_port_info, hws,1 , &host);if (ret) goto out;
drivers/ide/buddha.c +2 -2
@@ -160,7 +160,7 @@ static int __init buddha_init(void)while ((z =zorro_find_device (ZORRO_WILDCARD , z))) {unsigned long board; -hw_regs_t hw[MAX_NUM_HWIFS ], *hws[] = {NULL ,NULL ,NULL ,NULL }; +hw_regs_t hw[MAX_NUM_HWIFS ], *hws[] = {NULL ,NULL ,NULL };if (z->id ==ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA ) { buddha_num_hwifs =BUDDHA_NUM_HWIFS ;
@@ -224,7 +224,7 @@ fail_base2: hws[i] = &hw[i]; } -ide_host_add (&buddha_port_info, hws,NULL ); +ide_host_add (&buddha_port_info, hws, i,NULL ); }return 0 ;
drivers/ide/cmd640.c +3 -2
@@ -708,7 +708,7 @@ static int __init cmd640x_init(void)int second_port_cmd640 =0 , rc;const char *bus_type, *port2;u8 b, cfr; -hw_regs_t hw[2 ], *hws[] = {NULL ,NULL ,NULL ,NULL }; +hw_regs_t hw[2 ], *hws[] = {NULL ,NULL };if (cmd640_vlb &&probe_for_cmd640_vlb ()) { bus_type ="VLB" ;
@@ -822,7 +822,8 @@ static int __init cmd640x_init(void)cmd640_dump_regs ();#endif -return ide_host_add (&cmd640_port_info, hws,NULL ); +return ide_host_add (&cmd640_port_info, hws, second_port_cmd640 ?2 :1 , +NULL ); }module_param_named (probe_vlb, cmd640_vlb, bool,0 );
drivers/ide/cs5520.c +2 -2
@@ -110,7 +110,7 @@ static const struct ide_port_info cyrix_static int __devinit cs5520_init_one (struct pci_dev *dev,const struct pci_device_id *id) {const struct ide_port_info *d = &cyrix_chipset; -hw_regs_t hw[4 ], *hws[] = {NULL ,NULL ,NULL ,NULL }; +hw_regs_t hw[2 ], *hws[] = {NULL ,NULL };ide_setup_pci_noise (dev, d);
@@ -136,7 +136,7 @@ static int __devinit cs5520_init_one(stride_pci_setup_ports (dev, d, &hw[0 ], &hws[0 ]); hw[0 ].irq =14 ; -return ide_host_add (d, hws,NULL ); +return ide_host_add (d, hws,2 ,NULL ); }static const struct pci_device_id cs5520_pci_tbl[] = {
drivers/ide/delkin_cb.c +2 -2
@@ -77,7 +77,7 @@ delkin_cb_probe (struct pci_dev *dev, costruct ide_host *host;unsigned long base;int rc; -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +hw_regs_t hw, *hws[] = { &hw }; rc =pci_enable_device (dev);if (rc) {
@@ -99,7 +99,7 @@ delkin_cb_probe (struct pci_dev *dev, co hw.irq = dev->irq; hw.dev = &dev->dev; - rc =ide_host_add (&delkin_cb_port_info, hws, &host); + rc =ide_host_add (&delkin_cb_port_info, hws,1 , &host);if (rc) goto out_disable;
drivers/ide/falconide.c +2 -2
@@ -138,7 +138,7 @@ static void __init falconide_setup_portsstatic int __init falconide_init (void ) {struct ide_host *host; -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +hw_regs_t hw, *hws[] = { &hw };int rc;if (!MACH_IS_ATARI || !ATARIHW_PRESENT (IDE ))
@@ -153,7 +153,7 @@ static int __init falconide_init(void)falconide_setup_ports (&hw); - host =ide_host_alloc (&falconide_port_info, hws); + host =ide_host_alloc (&falconide_port_info, hws,1 );if (host ==NULL ) { rc = -ENOMEM ; goto err;
drivers/ide/gayle.c +2 -2
@@ -125,7 +125,7 @@ static int __init gayle_init(void)unsigned long base, ctrlport, irqport;ide_ack_intr_t *ack_intr;int a4000, i, rc; -hw_regs_t hw[GAYLE_NUM_HWIFS ], *hws[] = {NULL ,NULL ,NULL ,NULL }; +hw_regs_t hw[GAYLE_NUM_HWIFS ], *hws[] = {NULL ,NULL };if (!MACH_IS_AMIGA )return -ENODEV ;
@@ -170,7 +170,7 @@ found: hws[i] = &hw[i]; } - rc =ide_host_add (&gayle_port_info, hws,NULL ); + rc =ide_host_add (&gayle_port_info, hws, i,NULL );if (rc)release_mem_region (res_start, res_n);
drivers/ide/icside.c +4 -4
@@ -410,7 +410,7 @@ icside_register_v5(struct icside_state * {void __iomem *base;struct ide_host *host; -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +hw_regs_t hw, *hws[] = { &hw };int ret; base =ecardm_iomap (ec,ECARD_RES_MEMC ,0 ,0 );
@@ -431,7 +431,7 @@ icside_register_v5(struct icside_state *icside_setup_ports (&hw, base, &icside_cardinfo_v5, ec); - host =ide_host_alloc (&icside_v5_port_info, hws); + host =ide_host_alloc (&icside_v5_port_info, hws,1 );if (host ==NULL )return -ENODEV ;
@@ -467,7 +467,7 @@ icside_register_v6(struct icside_state *struct ide_host *host;unsigned int sel =0 ;int ret; -hw_regs_t hw[2 ], *hws[] = { &hw[0 ],NULL ,NULL ,NULL }; +hw_regs_t hw[2 ], *hws[] = { &hw[0 ],NULL };struct ide_port_info d = icside_v6_port_info; ioc_base =ecardm_iomap (ec,ECARD_RES_IOCFAST ,0 ,0 );
@@ -507,7 +507,7 @@ icside_register_v6(struct icside_state *icside_setup_ports (&hw[0 ], easi_base, &icside_cardinfo_v6_1, ec);icside_setup_ports (&hw[1 ], easi_base, &icside_cardinfo_v6_2, ec); - host =ide_host_alloc (&d, hws); + host =ide_host_alloc (&d, hws,2 );if (host ==NULL )return -ENODEV ;
drivers/ide/ide-4drives.c +2 -2
@@ -31,7 +31,7 @@ static const struct ide_port_info ide_4dstatic int __init ide_4drives_init (void ) {unsigned long base =0x1f0 , ctl =0x3f6 ; -hw_regs_t hw, *hws[] = { &hw, &hw,NULL ,NULL }; +hw_regs_t hw, *hws[] = { &hw, &hw };if (probe_4drives ==0 )return -ENODEV ;
@@ -54,7 +54,7 @@ static int __init ide_4drives_init(void)ide_std_init_ports (&hw, base, ctl); hw.irq =14 ; -return ide_host_add (&ide_4drives_port_info, hws,NULL ); +return ide_host_add (&ide_4drives_port_info, hws,2 ,NULL ); }module_init (ide_4drives_init);
drivers/ide/ide-cs.c +2 -2
@@ -164,7 +164,7 @@ static struct ide_host *idecs_register(ustruct ide_host *host;ide_hwif_t *hwif;int i, rc; -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +hw_regs_t hw, *hws[] = { &hw };if (!request_region (io,8 ,DRV_NAME )) { printk(KERN_ERR "%s: I/O resource 0x%lX-0x%lX not free.\n",
@@ -184,7 +184,7 @@ static struct ide_host *idecs_register(u hw.irq = irq; hw.dev = &handle->dev; - rc =ide_host_add (&idecs_port_info, hws, &host); + rc =ide_host_add (&idecs_port_info, hws,1 , &host);if (rc) goto out_release;
drivers/ide/ide-generic.c +2 -2
@@ -86,7 +86,7 @@ static void ide_generic_check_pci_legacystatic int __init ide_generic_init (void ) { -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +hw_regs_t hw, *hws[] = { &hw };unsigned long io_addr;int i, rc =0 , primary =0 , secondary =0 ;
@@ -133,7 +133,7 @@ static int __init ide_generic_init(void)#else hw.irq = legacy_irqs[i];#endif - rc =ide_host_add (&ide_generic_port_info, hws,NULL ); + rc =ide_host_add (&ide_generic_port_info, hws,1 ,NULL );if (rc) {release_region (io_addr +0x206 ,1 );release_region (io_addr,8 );
drivers/ide/ide-h8300.c +2 -2
@@ -83,7 +83,7 @@ static const struct ide_port_info h8300_static int __init h8300_ide_init (void ) { -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +hw_regs_t hw, *hws[] = { &hw }; printk(KERN_INFO DRV_NAME ": H8/300 generic IDE interface\n");
@@ -96,7 +96,7 @@ static int __init h8300_ide_init(void)hw_setup (&hw); -return ide_host_add (&h8300_port_info, hws,NULL ); +return ide_host_add (&h8300_port_info, hws,1 ,NULL ); out_busy:printk (KERN_ERR "ide-h8300: IDE I/F resource already used.\n" );
drivers/ide/ide-legacy.c +2 -2
@@ -40,7 +40,7 @@ static void ide_legacy_init_one(hw_regs_int ide_legacy_device_add (const struct ide_port_info *d,unsigned long config) { -hw_regs_t hw[2 ], *hws[] = {NULL ,NULL ,NULL ,NULL }; +hw_regs_t hw[2 ], *hws[] = {NULL ,NULL };memset (&hw,0 ,sizeof (hw));
@@ -52,6 +52,6 @@ int ide_legacy_device_add(const struct i (d->host_flags & IDE_HFLAG_SINGLE))return -ENOENT ; -return ide_host_add (d, hws,NULL ); +return ide_host_add (d, hws,2 ,NULL ); }EXPORT_SYMBOL_GPL (ide_legacy_device_add);
drivers/ide/ide-pnp.c +2 -2
@@ -37,7 +37,7 @@ static int idepnp_probe(struct pnp_dev *struct ide_host *host;unsigned long base, ctl;int rc; -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +hw_regs_t hw, *hws[] = { &hw }; printk(KERN_INFO DRV_NAME ": generic PnP IDE interface\n");
@@ -64,7 +64,7 @@ static int idepnp_probe(struct pnp_dev *ide_std_init_ports (&hw, base, ctl); hw.irq =pnp_irq (dev,0 ); - rc =ide_host_add (&ide_pnp_port_info, hws, &host); + rc =ide_host_add (&ide_pnp_port_info, hws,1 , &host);if (rc) goto out;
drivers/ide/ide-probe.c +5 -4
@@ -1252,7 +1252,8 @@ out_nomem:return -ENOMEM ; } -struct ide_host *ide_host_alloc (const struct ide_port_info *d,hw_regs_t **hws) +struct ide_host *ide_host_alloc (const struct ide_port_info *d,hw_regs_t **hws, +unsigned int n_ports) {struct ide_host *host;struct device *dev = hws[0 ] ? hws[0 ]->dev :NULL ;
@@ -1263,7 +1264,7 @@ struct ide_host *ide_host_alloc(const stif (host ==NULL )return NULL ; -for (i =0 ; i <MAX_HOST_PORTS ; i++) { +for (i =0 ; i < n_ports; i++) {ide_hwif_t *hwif;int idx;
@@ -1434,12 +1435,12 @@ int ide_host_register(struct ide_host *hEXPORT_SYMBOL_GPL (ide_host_register);int ide_host_add (const struct ide_port_info *d,hw_regs_t **hws, -struct ide_host **hostp) +unsigned int n_ports,struct ide_host **hostp) {struct ide_host *host;int rc; - host =ide_host_alloc (d, hws); + host =ide_host_alloc (d, hws, n_ports);if (host ==NULL )return -ENOMEM ;
drivers/ide/ide_platform.c +2 -2
@@ -54,7 +54,7 @@ static int __devinit plat_ide_probe(strustruct pata_platform_info *pdata;struct ide_host *host;int ret =0 , mmio =0 ; -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +hw_regs_t hw, *hws[] = { &hw };struct ide_port_info d = platform_ide_port_info; pdata = pdev->dev.platform_data;
@@ -98,7 +98,7 @@ static int __devinit plat_ide_probe(struif (mmio) d.host_flags |=IDE_HFLAG_MMIO ; - ret =ide_host_add (&d, hws, &host); + ret =ide_host_add (&d, hws,1 , &host);if (ret) goto out;
drivers/ide/macide.c +2 -2
@@ -96,7 +96,7 @@ static int __init macide_init(void)ide_ack_intr_t *ack_intr;unsigned long base;int irq; -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +hw_regs_t hw, *hws[] = { &hw };if (!MACH_IS_MAC )return -ENODEV ;
@@ -126,7 +126,7 @@ static int __init macide_init(void)macide_setup_ports (&hw, base, irq, ack_intr); -return ide_host_add (&macide_port_info, hws,NULL ); +return ide_host_add (&macide_port_info, hws,1 ,NULL ); }module_init (macide_init);
drivers/ide/palm_bk3710.c +2 -2
@@ -316,7 +316,7 @@ static int __init palm_bk3710_probe(struvoid __iomem *base;unsigned long rate, mem_size;int i, rc; -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +hw_regs_t hw, *hws[] = { &hw }; clk =clk_get (&pdev->dev,"IDECLK" );if (IS_ERR (clk))
@@ -369,7 +369,7 @@ static int __init palm_bk3710_probe(struATA_UDMA5 ;/* Register the IDE interface with Linux */ - rc =ide_host_add (&palm_bk3710_port_info, hws,NULL ); + rc =ide_host_add (&palm_bk3710_port_info, hws,1 ,NULL );if (rc) goto out;
drivers/ide/pmac.c +2 -2
@@ -1029,7 +1029,7 @@ static int __devinit pmac_ide_setup_deviconst int *bidp;struct ide_host *host;ide_hwif_t *hwif; -hw_regs_t *hws[] = { hw,NULL ,NULL ,NULL }; +hw_regs_t *hws[] = { hw };struct ide_port_info d = pmac_port_info;int rc;
@@ -1077,7 +1077,7 @@ static int __devinit pmac_ide_setup_devi/* Make sure we have sane timings */ sanitize_timings (pmif); - host =ide_host_alloc (&d, hws); + host =ide_host_alloc (&d, hws,1 );if (host ==NULL )return -ENOMEM ; hwif = host->ports[0 ];
drivers/ide/q40ide.c +2 -2
@@ -135,7 +135,7 @@ static const char *q40_ide_names[Q40IDE_static int __init q40ide_init (void ) {int i; -hw_regs_t hw[Q40IDE_NUM_HWIFS ], *hws[] = {NULL ,NULL ,NULL ,NULL }; +hw_regs_t hw[Q40IDE_NUM_HWIFS ], *hws[] = {NULL ,NULL };if (!MACH_IS_Q40 )return -ENODEV ;
@@ -162,7 +162,7 @@ static int __init q40ide_init(void) hws[i] = &hw[i]; } -return ide_host_add (&q40ide_port_info, hws,NULL ); +return ide_host_add (&q40ide_port_info, hws,Q40IDE_NUM_HWIFS ,NULL ); }module_init (q40ide_init);
drivers/ide/rapide.c +2 -2
@@ -36,7 +36,7 @@ rapide_probe(struct expansion_card *ec,void __iomem *base;struct ide_host *host;int ret; -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +hw_regs_t hw, *hws[] = { &hw }; ret =ecard_request_resources (ec);if (ret)
@@ -52,7 +52,7 @@ rapide_probe(struct expansion_card *ec,rapide_setup_ports (&hw, base, base +0x818 ,1 <<6 , ec->irq); hw.dev = &ec->dev; - ret =ide_host_add (&rapide_port_info, hws, &host); + ret =ide_host_add (&rapide_port_info, hws,1 , &host);if (ret) goto release;
drivers/ide/scc_pata.c +2 -2
@@ -559,7 +559,7 @@ static int scc_ide_setup_pci_device(stru {struct scc_ports *ports =pci_get_drvdata (dev);struct ide_host *host; -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +hw_regs_t hw, *hws[] = { &hw };int i, rc;memset (&hw,0 ,sizeof (hw));
@@ -568,7 +568,7 @@ static int scc_ide_setup_pci_device(stru hw.irq = dev->irq; hw.dev = &dev->dev; - rc =ide_host_add (d, hws, &host); + rc =ide_host_add (d, hws,1 , &host);if (rc)return rc;
drivers/ide/setup-pci.c +3 -3
@@ -538,7 +538,7 @@ int ide_pci_init_one(struct pci_dev *dev void *priv) {struct ide_host *host; -hw_regs_t hw[4 ], *hws[] = {NULL ,NULL ,NULL ,NULL }; +hw_regs_t hw[2 ], *hws[] = {NULL ,NULL };int ret; ret =ide_setup_pci_controller (dev, d,1 );
@@ -547,7 +547,7 @@ int ide_pci_init_one(struct pci_dev *devide_pci_setup_ports (dev, d, &hw[0 ], &hws[0 ]); - host =ide_host_alloc (d, hws); + host =ide_host_alloc (d, hws,2 );if (host ==NULL ) { ret = -ENOMEM ; goto out;
@@ -596,7 +596,7 @@ int ide_pci_init_two(struct pci_dev *devide_pci_setup_ports (pdev[i], d, &hw[i*2 ], &hws[i*2 ]); } - host =ide_host_alloc (d, hws); + host =ide_host_alloc (d, hws,4 );if (host ==NULL ) { ret = -ENOMEM ; goto out;
drivers/ide/sgiioc4.c +2 -2
@@ -546,7 +546,7 @@ sgiioc4_ide_setup_pci_device(struct pci_unsigned long cmd_base, irqport;unsigned long bar0, cmd_phys_base, ctl;void __iomem *virt_base; -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +hw_regs_t hw, *hws[] = { &hw };int rc;/* Get the CmdBlk and CtrlBlk Base Registers */
@@ -580,7 +580,7 @@ sgiioc4_ide_setup_pci_device(struct pci_/* Initializing chipset IRQ Registers */ writel (0x03 , (void __iomem *)(irqport +IOC4_INTR_SET *4 )); - rc =ide_host_add (&sgiioc4_port_info, hws,NULL ); + rc =ide_host_add (&sgiioc4_port_info, hws,1 ,NULL );if (!rc)return 0 ;
drivers/ide/tx4938ide.c +2 -3
@@ -130,8 +130,7 @@ static const struct ide_port_info tx4938static int __init tx4938ide_probe (struct platform_device *pdev) { -hw_regs_t hw; -hw_regs_t *hws[] = { &hw,NULL ,NULL ,NULL }; +hw_regs_t hw, *hws[] = { &hw };struct ide_host *host;struct resource *res;struct tx4938ide_platform_info *pdata = pdev->dev.platform_data;
@@ -183,7 +182,7 @@ static int __init tx4938ide_probe(structtx4938ide_tune_ebusc (pdata->ebus_ch, pdata->gbus_clock,0 ); else d.port_ops = NULL; - ret =ide_host_add (&d, hws, &host); + ret =ide_host_add (&d, hws,1 , &host);if (!ret)platform_set_drvdata (pdev, host);return ret;
drivers/ide/tx4939ide.c +2 -3
@@ -537,8 +537,7 @@ static const struct ide_port_info tx4939static int __init tx4939ide_probe (struct platform_device *pdev) { -hw_regs_t hw; -hw_regs_t *hws[] = { &hw,NULL ,NULL ,NULL }; +hw_regs_t hw, *hws[] = { &hw };struct ide_host *host;struct resource *res;int irq, ret;
@@ -581,7 +580,7 @@ static int __init tx4939ide_probe(struct hw.dev = &pdev->dev;pr_info ("TX4939 IDE interface (base %#lx, irq %d)\n" , mapbase, irq); - host =ide_host_alloc (&tx4939ide_port_info, hws); + host =ide_host_alloc (&tx4939ide_port_info, hws,1 );if (!host)return -ENOMEM ;/* use extra_base for base address of the all registers */
include/linux/ide.h +3 -2
@@ -1456,11 +1456,12 @@ void ide_undecoded_slave(ide_drive_t *);void ide_port_apply_params (ide_hwif_t *);int ide_sysfs_register_port (ide_hwif_t *); -struct ide_host *ide_host_alloc (const struct ide_port_info *,hw_regs_t **); +struct ide_host *ide_host_alloc (const struct ide_port_info *,hw_regs_t **, +unsigned int );void ide_host_free (struct ide_host *);int ide_host_register (struct ide_host *,const struct ide_port_info *,hw_regs_t **); -int ide_host_add (const struct ide_port_info *,hw_regs_t **, +int ide_host_add (const struct ide_port_info *,hw_regs_t **,unsigned int ,struct ide_host **);void ide_host_remove (struct ide_host *);int ide_legacy_device_add (const struct ide_port_info *,unsigned long );
PATCH 7/7 ide: remove hw_regs_t typedef
In reply to Bartlomiej ZolnierkiewiczRemove hw_regs_t typedef and rename struct hw_regs_s to struct ide_hw.
There should be no functional changes caused by this patch.
--- drivers/ide/at91_ide.c | 2 +- drivers/ide/au1xxx-ide.c | 4 ++-- drivers/ide/buddha.c | 4 ++-- drivers/ide/cmd640.c | 2 +- drivers/ide/cs5520.c | 2 +- drivers/ide/delkin_cb.c | 2 +- drivers/ide/falconide.c | 4 ++-- drivers/ide/gayle.c | 4 ++-- drivers/ide/icside.c | 6 +++--- drivers/ide/ide-4drives.c | 2 +- drivers/ide/ide-cs.c | 2 +- drivers/ide/ide-generic.c | 2 +- drivers/ide/ide-h8300.c | 6 +++--- drivers/ide/ide-legacy.c | 4 ++-- drivers/ide/ide-pnp.c | 2 +- drivers/ide/ide-probe.c | 10 +++++----- drivers/ide/ide_platform.c | 4 ++-- drivers/ide/macide.c | 4 ++-- drivers/ide/palm_bk3710.c | 2 +- drivers/ide/pmac.c | 11 ++++++----- drivers/ide/q40ide.c | 6 +++--- drivers/ide/rapide.c | 4 ++-- drivers/ide/scc_pata.c | 2 +- drivers/ide/setup-pci.c | 16 ++++++++-------- drivers/ide/sgiioc4.c | 4 ++-- drivers/ide/tx4938ide.c | 2 +- drivers/ide/tx4939ide.c | 2 +- include/linux/ide.h | 14 +++++++------- 28 files changed, 65 insertions(+), 64 deletions(-)
drivers/ide/at91_ide.c +1 -1
@@ -247,7 +247,7 @@ irqreturn_t at91_irq_handler(int irq, vostatic int __init at91_ide_probe (struct platform_device *pdev) {int ret; -hw_regs_t hw, *hws[] = { &hw }; +struct ide_hw hw, *hws[] = { &hw };struct ide_host *host;struct resource *res;unsigned long tf_base =0 , ctl_base =0 ;
drivers/ide/au1xxx-ide.c +2 -2
@@ -449,7 +449,7 @@ static int auide_ddma_init(ide_hwif_t *h }#endif -static void auide_setup_ports (hw_regs_t *hw,_auide_hwif *ahwif) +static void auide_setup_ports (struct ide_hw *hw,_auide_hwif *ahwif) {int i;unsigned long *ata_regs = hw->io_ports_array;
@@ -508,7 +508,7 @@ static int au_ide_probe(struct platform_struct resource *res;struct ide_host *host;int ret =0 ; -hw_regs_t hw, *hws[] = { &hw }; +struct ide_hw hw, *hws[] = { &hw };#if defined(CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA )char *mode ="MWDMA2" ;
drivers/ide/buddha.c +2 -2
@@ -121,7 +121,7 @@ static int xsurf_ack_intr(ide_hwif_t *hwreturn 1 ; } -static void __init buddha_setup_ports (hw_regs_t *hw,unsigned long base, +static void __init buddha_setup_ports (struct ide_hw *hw,unsigned long base,unsigned long ctl,unsigned long irq_port,ide_ack_intr_t *ack_intr) {
@@ -160,7 +160,7 @@ static int __init buddha_init(void)while ((z =zorro_find_device (ZORRO_WILDCARD , z))) {unsigned long board; -hw_regs_t hw[MAX_NUM_HWIFS ], *hws[] = {NULL ,NULL ,NULL }; +struct ide_hw hw[MAX_NUM_HWIFS ], *hws[] = {NULL ,NULL ,NULL };if (z->id ==ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA ) { buddha_num_hwifs =BUDDHA_NUM_HWIFS ;
drivers/ide/cmd640.c +1 -1
@@ -708,7 +708,7 @@ static int __init cmd640x_init(void)int second_port_cmd640 =0 , rc;const char *bus_type, *port2;u8 b, cfr; -hw_regs_t hw[2 ], *hws[] = {NULL ,NULL }; +struct ide_hw hw[2 ], *hws[] = {NULL ,NULL };if (cmd640_vlb &&probe_for_cmd640_vlb ()) { bus_type ="VLB" ;
drivers/ide/cs5520.c +1 -1
@@ -110,7 +110,7 @@ static const struct ide_port_info cyrix_static int __devinit cs5520_init_one (struct pci_dev *dev,const struct pci_device_id *id) {const struct ide_port_info *d = &cyrix_chipset; -hw_regs_t hw[2 ], *hws[] = {NULL ,NULL }; +struct ide_hw hw[2 ], *hws[] = {NULL ,NULL };ide_setup_pci_noise (dev, d);
drivers/ide/delkin_cb.c +1 -1
@@ -77,7 +77,7 @@ delkin_cb_probe (struct pci_dev *dev, costruct ide_host *host;unsigned long base;int rc; -hw_regs_t hw, *hws[] = { &hw }; +struct ide_hw hw, *hws[] = { &hw }; rc =pci_enable_device (dev);if (rc) {
drivers/ide/falconide.c +2 -2
@@ -114,7 +114,7 @@ static const struct ide_port_info falcon .chipset = ide_generic, }; -static void __init falconide_setup_ports (hw_regs_t *hw) +static void __init falconide_setup_ports (struct ide_hw *hw) {int i;
@@ -138,7 +138,7 @@ static void __init falconide_setup_portsstatic int __init falconide_init (void ) {struct ide_host *host; -hw_regs_t hw, *hws[] = { &hw }; +struct ide_hw hw, *hws[] = { &hw };int rc;if (!MACH_IS_ATARI || !ATARIHW_PRESENT (IDE ))
drivers/ide/gayle.c +2 -2
@@ -88,7 +88,7 @@ static int gayle_ack_intr_a1200(ide_hwifreturn 1 ; } -static void __init gayle_setup_ports (hw_regs_t *hw,unsigned long base, +static void __init gayle_setup_ports (struct ide_hw *hw,unsigned long base,unsigned long ctl,unsigned long irq_port,ide_ack_intr_t *ack_intr) {
@@ -125,7 +125,7 @@ static int __init gayle_init(void)unsigned long base, ctrlport, irqport;ide_ack_intr_t *ack_intr;int a4000, i, rc; -hw_regs_t hw[GAYLE_NUM_HWIFS ], *hws[] = {NULL ,NULL }; +struct ide_hw hw[GAYLE_NUM_HWIFS ], *hws[] = {NULL ,NULL };if (!MACH_IS_AMIGA )return -ENODEV ;
drivers/ide/icside.c +3 -3
@@ -381,7 +381,7 @@ static int icside_dma_off_init(ide_hwif_return -EOPNOTSUPP ; } -static void icside_setup_ports (hw_regs_t *hw,void __iomem *base, +static void icside_setup_ports (struct ide_hw *hw,void __iomem *base,struct cardinfo *info,struct expansion_card *ec) {unsigned long port = (unsigned long )base + info->dataoffset;
@@ -410,7 +410,7 @@ icside_register_v5(struct icside_state * {void __iomem *base;struct ide_host *host; -hw_regs_t hw, *hws[] = { &hw }; +struct ide_hw hw, *hws[] = { &hw };int ret; base =ecardm_iomap (ec,ECARD_RES_MEMC ,0 ,0 );
@@ -467,7 +467,7 @@ icside_register_v6(struct icside_state *struct ide_host *host;unsigned int sel =0 ;int ret; -hw_regs_t hw[2 ], *hws[] = { &hw[0 ],NULL }; +struct ide_hw hw[2 ], *hws[] = { &hw[0 ],NULL };struct ide_port_info d = icside_v6_port_info; ioc_base =ecardm_iomap (ec,ECARD_RES_IOCFAST ,0 ,0 );
drivers/ide/ide-4drives.c +1 -1
@@ -31,7 +31,7 @@ static const struct ide_port_info ide_4dstatic int __init ide_4drives_init (void ) {unsigned long base =0x1f0 , ctl =0x3f6 ; -hw_regs_t hw, *hws[] = { &hw, &hw }; +struct ide_hw hw, *hws[] = { &hw, &hw };if (probe_4drives ==0 )return -ENODEV ;
drivers/ide/ide-cs.c +1 -1
@@ -164,7 +164,7 @@ static struct ide_host *idecs_register(ustruct ide_host *host;ide_hwif_t *hwif;int i, rc; -hw_regs_t hw, *hws[] = { &hw }; +struct ide_hw hw, *hws[] = { &hw };if (!request_region (io,8 ,DRV_NAME )) { printk(KERN_ERR "%s: I/O resource 0x%lX-0x%lX not free.\n",
drivers/ide/ide-generic.c +1 -1
@@ -86,7 +86,7 @@ static void ide_generic_check_pci_legacystatic int __init ide_generic_init (void ) { -hw_regs_t hw, *hws[] = { &hw }; +struct ide_hw hw, *hws[] = { &hw };unsigned long io_addr;int i, rc =0 , primary =0 , secondary =0 ;
drivers/ide/ide-h8300.c +3 -3
@@ -64,11 +64,11 @@ static const struct ide_tp_ops h8300_tp_#define H8300_IDE_GAP (2) -static inline void hw_setup (hw_regs_t *hw) +static inline void hw_setup (struct ide_hw *hw) {int i; -memset (hw,0 ,sizeof (hw_regs_t)); +memset (hw,0 ,sizeof (*hw));for (i =0 ; i <=7 ; i++) hw->io_ports_array[i] =CONFIG_H8300_IDE_BASE +H8300_IDE_GAP *i; hw->io_ports.ctl_addr =CONFIG_H8300_IDE_ALT ;
@@ -83,7 +83,7 @@ static const struct ide_port_info h8300_static int __init h8300_ide_init (void ) { -hw_regs_t hw, *hws[] = { &hw }; +struct ide_hw hw, *hws[] = { &hw }; printk(KERN_INFO DRV_NAME ": H8/300 generic IDE interface\n");
drivers/ide/ide-legacy.c +2 -2
@@ -1,7 +1,7 @@#include <linux/kernel.h> #include <linux/ide.h> -static void ide_legacy_init_one (hw_regs_t **hws,hw_regs_t *hw, +static void ide_legacy_init_one (struct ide_hw **hws,struct ide_hw *hw,u8 port_no,const struct ide_port_info *d,unsigned long config) {
@@ -40,7 +40,7 @@ static void ide_legacy_init_one(hw_regs_int ide_legacy_device_add (const struct ide_port_info *d,unsigned long config) { -hw_regs_t hw[2 ], *hws[] = {NULL ,NULL }; +struct ide_hw hw[2 ], *hws[] = {NULL ,NULL };memset (&hw,0 ,sizeof (hw));
drivers/ide/ide-pnp.c +1 -1
@@ -37,7 +37,7 @@ static int idepnp_probe(struct pnp_dev *struct ide_host *host;unsigned long base, ctl;int rc; -hw_regs_t hw, *hws[] = { &hw }; +struct ide_hw hw, *hws[] = { &hw }; printk(KERN_INFO DRV_NAME ": generic PnP IDE interface\n");
drivers/ide/ide-probe.c +5 -5
@@ -1164,7 +1164,7 @@ static void ide_init_port_data(ide_hwif_ide_port_init_devices_data (hwif); } -static void ide_init_port_hw (ide_hwif_t *hwif,hw_regs_t *hw) +static void ide_init_port_hw (ide_hwif_t *hwif,struct ide_hw *hw) {memcpy (&hwif->io_ports, &hw->io_ports,sizeof (hwif->io_ports)); hwif->irq = hw->irq;
@@ -1252,8 +1252,8 @@ out_nomem:return -ENOMEM ; } -struct ide_host *ide_host_alloc (const struct ide_port_info *d,hw_regs_t **hws, -unsigned int n_ports) +struct ide_host *ide_host_alloc (const struct ide_port_info *d, +struct ide_hw **hws,unsigned int n_ports) {struct ide_host *host;struct device *dev = hws[0 ] ? hws[0 ]->dev :NULL ;
@@ -1340,7 +1340,7 @@ static void ide_disable_port(ide_hwif_t }int ide_host_register (struct ide_host *host,const struct ide_port_info *d, -hw_regs_t **hws) +struct ide_hw **hws) {ide_hwif_t *hwif, *mate =NULL ;int i, j =0 ;
@@ -1434,7 +1434,7 @@ int ide_host_register(struct ide_host *h }EXPORT_SYMBOL_GPL (ide_host_register); -int ide_host_add (const struct ide_port_info *d,hw_regs_t **hws, +int ide_host_add (const struct ide_port_info *d,struct ide_hw **hws,unsigned int n_ports,struct ide_host **hostp) {struct ide_host *host;
drivers/ide/ide_platform.c +2 -2
@@ -21,7 +21,7 @@#include <linux/platform_device.h> #include <linux/io.h> -static void __devinit plat_ide_setup_ports(hw_regs_t *hw, +static void __devinit plat_ide_setup_ports(struct ide_hw *hw, void __iomem *base, void __iomem *ctrl, struct pata_platform_info *pdata,
@@ -54,7 +54,7 @@ static int __devinit plat_ide_probe(strustruct pata_platform_info *pdata;struct ide_host *host;int ret =0 , mmio =0 ; -hw_regs_t hw, *hws[] = { &hw }; +struct ide_hw hw, *hws[] = { &hw };struct ide_port_info d = platform_ide_port_info; pdata = pdev->dev.platform_data;
drivers/ide/macide.c +2 -2
@@ -62,7 +62,7 @@ int macide_ack_intr(ide_hwif_t* hwif)return 0 ; } -static void __init macide_setup_ports (hw_regs_t *hw,unsigned long base, +static void __init macide_setup_ports (struct ide_hw *hw,unsigned long base,int irq,ide_ack_intr_t *ack_intr) {int i;
@@ -96,7 +96,7 @@ static int __init macide_init(void)ide_ack_intr_t *ack_intr;unsigned long base;int irq; -hw_regs_t hw, *hws[] = { &hw }; +struct ide_hw hw, *hws[] = { &hw };if (!MACH_IS_MAC )return -ENODEV ;
drivers/ide/palm_bk3710.c +1 -1
@@ -316,7 +316,7 @@ static int __init palm_bk3710_probe(struvoid __iomem *base;unsigned long rate, mem_size;int i, rc; -hw_regs_t hw, *hws[] = { &hw }; +struct ide_hw hw, *hws[] = { &hw }; clk =clk_get (&pdev->dev,"IDECLK" );if (IS_ERR (clk))
drivers/ide/pmac.c +6 -5
@@ -1023,13 +1023,14 @@ static const struct ide_port_info pmac_p* Setup, register & probe an IDE channel driven by this driver, this is * called by one of the 2 probe functions (macio or PCI). */ -static int __devinit pmac_ide_setup_device (pmac_ide_hwif_t *pmif,hw_regs_t *hw) +static int __devinit pmac_ide_setup_device (pmac_ide_hwif_t *pmif, +struct ide_hw *hw) {struct device_node *np = pmif->node;const int *bidp;struct ide_host *host;ide_hwif_t *hwif; -hw_regs_t *hws[] = { hw }; +struct ide_hw *hws[] = { hw };struct ide_port_info d = pmac_port_info;int rc;
@@ -1124,7 +1125,7 @@ static int __devinit pmac_ide_setup_devireturn 0 ; } -static void __devinit pmac_ide_init_ports (hw_regs_t *hw,unsigned long base) +static void __devinit pmac_ide_init_ports (struct ide_hw *hw,unsigned long base) {int i;
@@ -1144,7 +1145,7 @@ pmac_ide_macio_attach(struct macio_dev *unsigned long regbase;pmac_ide_hwif_t *pmif;int irq, rc; -hw_regs_t hw; +struct ide_hw hw; pmif =kzalloc (sizeof (*pmif),GFP_KERNEL );if (pmif ==NULL )
@@ -1268,7 +1269,7 @@ pmac_ide_pci_attach(struct pci_dev *pdevvoid __iomem *base;unsigned long rbase, rlen;int rc; -hw_regs_t hw; +struct ide_hw hw; np =pci_device_to_OF_node (pdev);if (np ==NULL ) {
drivers/ide/q40ide.c +3 -3
@@ -51,11 +51,11 @@ static int q40ide_default_irq(unsigned l/* * Addresses are pretranslated for Q40 ISA access. */ -static void q40_ide_setup_ports (hw_regs_t *hw,unsigned long base, +static void q40_ide_setup_ports (struct ide_hw *hw,unsigned long base,ide_ack_intr_t *ack_intr,int irq) { -memset (hw,0 ,sizeof (hw_regs_t)); +memset (hw,0 ,sizeof (*hw));/* BIG FAT WARNING: assumption: only DATA port is ever used in 16 bit mode */ hw->io_ports.data_addr =Q40_ISA_IO_W (base);
@@ -135,7 +135,7 @@ static const char *q40_ide_names[Q40IDE_static int __init q40ide_init (void ) {int i; -hw_regs_t hw[Q40IDE_NUM_HWIFS ], *hws[] = {NULL ,NULL }; +struct ide_hw hw[Q40IDE_NUM_HWIFS ], *hws[] = {NULL ,NULL };if (!MACH_IS_Q40 )return -ENODEV ;
drivers/ide/rapide.c +2 -2
@@ -16,7 +16,7 @@ static const struct ide_port_info rapide .chipset = ide_generic, }; -static void rapide_setup_ports (hw_regs_t *hw,void __iomem *base, +static void rapide_setup_ports (struct ide_hw *hw,void __iomem *base,void __iomem *ctrl,unsigned int sz,int irq) {unsigned long port = (unsigned long )base;
@@ -36,7 +36,7 @@ rapide_probe(struct expansion_card *ec,void __iomem *base;struct ide_host *host;int ret; -hw_regs_t hw, *hws[] = { &hw }; +struct ide_hw hw, *hws[] = { &hw }; ret =ecard_request_resources (ec);if (ret)
drivers/ide/scc_pata.c +1 -1
@@ -559,7 +559,7 @@ static int scc_ide_setup_pci_device(stru {struct scc_ports *ports =pci_get_drvdata (dev);struct ide_host *host; -hw_regs_t hw, *hws[] = { &hw }; +struct ide_hw hw, *hws[] = { &hw };int i, rc;memset (&hw,0 ,sizeof (hw));
drivers/ide/setup-pci.c +8 -8
@@ -301,11 +301,11 @@ static int ide_pci_check_iomem(struct pc }/** -* ide_hw_configure - configure a hw_regs_t instance +* ide_hw_configure - configure a struct ide_hw instance * @dev: PCI device holding interface * @d: IDE port info * @port: port number -* @hw: hw_regs_t instance corresponding to this port +* @hw: struct ide_hw instance corresponding to this port * * Perform the initial set up for the hardware interface structure. This * is done per interface port rather than per PCI device. There may be
@@ -315,7 +315,7 @@ static int ide_pci_check_iomem(struct pc*/ static int ide_hw_configure (struct pci_dev *dev,const struct ide_port_info *d, -unsigned int port,hw_regs_t *hw) +unsigned int port,struct ide_hw *hw) {unsigned long ctl =0 , base =0 ;
@@ -445,8 +445,8 @@ out:* ide_pci_setup_ports - configure ports/devices on PCI IDE * @dev: PCI device * @d: IDE port info -* @hw: hw_regs_t instances corresponding to this PCI IDE device -* @hws: hw_regs_t pointers table to update +* @hw: struct ide_hw instances corresponding to this PCI IDE device +* @hws: struct ide_hw pointers table to update * * Scan the interfaces attached to this device and do any * necessary per port setup. Attach the devices and ask the
@@ -458,7 +458,7 @@ out:*/ void ide_pci_setup_ports (struct pci_dev *dev,const struct ide_port_info *d, -hw_regs_t *hw,hw_regs_t **hws) +struct ide_hw *hw,struct ide_hw **hws) {int channels = (d->host_flags &IDE_HFLAG_SINGLE ) ?1 :2 , port;u8 tmp;
@@ -538,7 +538,7 @@ int ide_pci_init_one(struct pci_dev *dev void *priv) {struct ide_host *host; -hw_regs_t hw[2 ], *hws[] = {NULL ,NULL }; +struct ide_hw hw[2 ], *hws[] = {NULL ,NULL };int ret; ret =ide_setup_pci_controller (dev, d,1 );
@@ -586,7 +586,7 @@ int ide_pci_init_two(struct pci_dev *devstruct pci_dev *pdev[] = { dev1, dev2 };struct ide_host *host;int ret, i; -hw_regs_t hw[4 ], *hws[] = {NULL ,NULL ,NULL ,NULL }; +struct ide_hw hw[4 ], *hws[] = {NULL ,NULL ,NULL ,NULL };for (i =0 ; i <2 ; i++) { ret =ide_setup_pci_controller (pdev[i], d, !i);
drivers/ide/sgiioc4.c +2 -2
@@ -91,7 +91,7 @@ typedef struct {static void -sgiioc4_init_hwif_ports (hw_regs_t * hw,unsigned long data_port, +sgiioc4_init_hwif_ports (struct ide_hw *hw,unsigned long data_port,unsigned long ctrl_port,unsigned long irq_port) {unsigned long reg = data_port;
@@ -546,7 +546,7 @@ sgiioc4_ide_setup_pci_device(struct pci_unsigned long cmd_base, irqport;unsigned long bar0, cmd_phys_base, ctl;void __iomem *virt_base; -hw_regs_t hw, *hws[] = { &hw }; +struct ide_hw hw, *hws[] = { &hw };int rc;/* Get the CmdBlk and CtrlBlk Base Registers */
drivers/ide/tx4938ide.c +1 -1
@@ -130,7 +130,7 @@ static const struct ide_port_info tx4938static int __init tx4938ide_probe (struct platform_device *pdev) { -hw_regs_t hw, *hws[] = { &hw }; +struct ide_hw hw, *hws[] = { &hw };struct ide_host *host;struct resource *res;struct tx4938ide_platform_info *pdata = pdev->dev.platform_data;
drivers/ide/tx4939ide.c +1 -1
@@ -537,7 +537,7 @@ static const struct ide_port_info tx4939static int __init tx4939ide_probe (struct platform_device *pdev) { -hw_regs_t hw, *hws[] = { &hw }; +struct ide_hw hw, *hws[] = { &hw };struct ide_host *host;struct resource *res;int irq, ret;
include/linux/ide.h +7 -7
@@ -178,7 +178,7 @@ typedef u8 hwif_chipset_t;/* * Structure to hold all information about the location of this port */ -typedef struct hw_regs_s { +struct ide_hw {union {struct ide_io_ports io_ports;unsigned long io_ports_array[IDE_NR_PORTS ];
@@ -188,9 +188,9 @@ typedef struct hw_regs_s {ide_ack_intr_t *ack_intr;/* acknowledge interrupt */ struct device *dev, *parent;unsigned long config; -} hw_regs_t; +}; -static inline void ide_std_init_ports (hw_regs_t *hw, +static inline void ide_std_init_ports (struct ide_hw *hw,unsigned long io_addr,unsigned long ctl_addr) {
@@ -1212,7 +1212,7 @@ static inline int ide_pci_is_in_compatib }void ide_pci_setup_ports (struct pci_dev *,const struct ide_port_info *, -hw_regs_t *,hw_regs_t **); +struct ide_hw *,struct ide_hw **);void ide_setup_pci_noise (struct pci_dev *,const struct ide_port_info *);#ifdef CONFIG_BLK_DEV_IDEDMA_PCI
@@ -1456,12 +1456,12 @@ void ide_undecoded_slave(ide_drive_t *);void ide_port_apply_params (ide_hwif_t *);int ide_sysfs_register_port (ide_hwif_t *); -struct ide_host *ide_host_alloc (const struct ide_port_info *,hw_regs_t **, +struct ide_host *ide_host_alloc (const struct ide_port_info *,struct ide_hw **,unsigned int );void ide_host_free (struct ide_host *);int ide_host_register (struct ide_host *,const struct ide_port_info *, -hw_regs_t **); -int ide_host_add (const struct ide_port_info *,hw_regs_t **,unsigned int , +struct ide_hw **); +int ide_host_add (const struct ide_port_info *,struct ide_hw **,unsigned int ,struct ide_host **);void ide_host_remove (struct ide_host *);int ide_legacy_device_add (const struct ide_port_info *,unsigned long );
Re: [PATCH 3/7] ide: merge ide_disk_special() into do_special()
In reply to Bartlomiej Zolnierkiewiczdrivers/ide/ide-io.c static void ide_tf_set_setmult_cmd(ide_d
Quoted 16 lines · Bartlomiej Zolnierkiewicz
While at it:
- change debugprintk()level toKERN_DEBUG
- update documentationThere should be no functional changes caused by this patch.
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>--- drivers/ide/ide-io.c | 44 ++++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 26 deletions(-)Index:
b/drivers/ide/ide-io.c
===================================================================drivers/ide/ide-io.c +0
-0@@ -184,11 +184,28 @@ static void ide_tf_set_setmult_cmd(ide_d
[]
drivers/ide/ide-io.c static void ide_tf_set_setmult_cmd(ide_d · line 202
Quoted 3 lines
drivers/ide/ide-io.c +3
-0+#ifdef DEBUG +printk (KERN_DEBUG "%s: %s: 0x%02x\n" , drive->name, s->all); +#endif
pr_debug?
Quoted 2 lines · On Wednesday 13 May 2009 22:51:39 Bartlomiej Zolnierkiewicz wrote:
On top of for-next branch of ide-2.6.git tree.
Uh, no. This is on top of for-next + block (=> linux-next).
Re: [PATCH 3/7] ide: merge ide_disk_special() into do_special()
In reply to Joe PerchesHello.
Quoted 19 lines · Joe Perches
drivers/ide/ide-io.c static void ide_tf_set_setmult_cmd(ide_d
Quoted 16 lines
While at it:
- change debugprintk()level toKERN_DEBUG
- update documentationThere should be no functional changes caused by this patch.
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>---
drivers/ide/ide-io.c| 44 ++++++++++++++++++--------------------------1 file changed, 18 insertions(+), 26 deletions(-)Index:
b/drivers/ide/ide-io.c
===================================================================drivers/ide/ide-io.c +0
-0@@ -184,11 +184,28 @@ static void ide_tf_set_setmult_cmd(ide_d[]
Quoted 5 lines
drivers/ide/ide-io.c static void ide_tf_set_setmult_cmd(ide_d · line 202
Quoted 3 lines
drivers/ide/ide-io.c +3
-0+#ifdef DEBUG +printk (KERN_DEBUG "%s: %s: 0x%02x\n" , drive->name, s->all); +#endif
pr_debug?
Yes, and the number of arguments doesn't correspond to the number of the
format specifiers.
WBR, Sergei
Re: [PATCH 4/7] ide: replace special_t typedef by IDE_SFLAG_* flags
In reply to Bartlomiej ZolnierkiewiczQuoted 7 lines · Bartlomiej Zolnierkiewicz
Replace:
-special_ttypedef by IDE_SFLAG_* flags
- 'special_tspecial' ide_drive_t's field by 'u8special_flags' oneThere should be no functional changes caused by this patch.
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>
WBR, Sergei
Re: [PATCH 5/7] ide: remove chipset field from hw_regs_t
In reply to Bartlomiej ZolnierkiewiczQuoted 6 lines · Bartlomiej Zolnierkiewicz
* Convert host drivers that still use hw_regs_t's chipset field to use the one in struct
ide_port_infoinstead.* Move special handling of
ide_pcichipset type fromide_hw_configure()toide_init_port().
Quoted 8 lines
* Remove chipset field from
hw_regs_t.While at it:
- remove stale comment indelkin_cb.cThere should be no functional changes caused by this patch.
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>
MBR, Sergei
Re: [PATCH 6/7] ide: pass number of ports to ide_host_{alloc,add}()
In reply to Bartlomiej ZolnierkiewiczQuoted 6 lines · Bartlomiej Zolnierkiewicz
Pass number of ports to ide_host_{alloc,add}() and then update all users accordingly.
There should be no functional changes caused by this patch.
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>
drivers/ide/buddha.c static int __init buddha_init(void) · line 163
Quoted 10 lines
Index:
b/drivers/ide/buddha.c
===================================================================drivers/ide/buddha.c +1
-1@@ -160,7 +160,7 @@ static int __init buddha_init(void)while ((z =zorro_find_device (ZORRO_WILDCARD , z))) {unsigned long board; -hw_regs_t hw[MAX_NUM_HWIFS ], *hws[] = {NULL ,NULL ,NULL ,NULL }; +hw_regs_t hw[MAX_NUM_HWIFS ], *hws[] = {NULL ,NULL ,NULL };
I think it makes sense to just drop the NULL initializers here...
drivers/ide/buddha.c fail_base2: · line 227
Quoted 9 lines
drivers/ide/buddha.c +1
-1if (z->id ==ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA ) { buddha_num_hwifs =BUDDHA_NUM_HWIFS ;@@ -224,7 +224,7 @@ fail_base2: hws[i] = &hw[i]; } -ide_host_add (&buddha_port_info, hws,NULL ); +ide_host_add (&buddha_port_info, hws, i,NULL );
... since ide_host_add() won't look beyond hws[i - 1] anyway.
drivers/ide/cmd640.c static int __init cmd640x_init(void) · line 711
Quoted 13 lines
drivers/ide/buddha.c +0
-0}return 0 ;Index:
b/drivers/ide/cmd640.c
===================================================================drivers/ide/cmd640.c +1
-1@@ -708,7 +708,7 @@ static int __init cmd640x_init(void)int second_port_cmd640 =0 , rc;const char *bus_type, *port2;u8 b, cfr; -hw_regs_t hw[2 ], *hws[] = {NULL ,NULL ,NULL ,NULL }; +hw_regs_t hw[2 ], *hws[] = {NULL ,NULL };
Same here...
drivers/ide/gayle.c static int __init gayle_init(void) · line 128
Quoted 10 lines
Index:
b/drivers/ide/gayle.c
===================================================================drivers/ide/gayle.c +1
-1@@ -125,7 +125,7 @@ static int __init gayle_init(void)unsigned long base, ctrlport, irqport;ide_ack_intr_t *ack_intr;int a4000, i, rc; -hw_regs_t hw[GAYLE_NUM_HWIFS ], *hws[] = {NULL ,NULL ,NULL ,NULL }; +hw_regs_t hw[GAYLE_NUM_HWIFS ], *hws[] = {NULL ,NULL };
... and here.
Quoted 4 lines
Index:
b/drivers/ide/icside.c
===================================================================drivers/ide/icside.c +0
-0
[...]
drivers/ide/icside.c icside_register_v6(struct icside_state * · line 470
Quoted 6 lines
drivers/ide/icside.c +1
-1@@ -467,7 +467,7 @@ icside_register_v6(struct icside_state *struct ide_host *host;unsigned int sel =0 ;int ret; -hw_regs_t hw[2 ], *hws[] = { &hw[0 ],NULL ,NULL ,NULL }; +hw_regs_t hw[2 ], *hws[] = { &hw[0 ],NULL };
I wonder if there's an old bug here since I'm not seeing when hws[1] is
set to non-NULL -- despite there are apparently two ports?
Indeed, this bug seems to date back to the 'struct ide_host'
introduction, see this:
MBR, Sergei
Re: [PATCH 6/7] ide: pass number of ports to ide_host_{alloc,add}()
Quoted 10 lines · On Thursday 14 May 2009 20:59:51 Sergei Shtylyov wrote:
drivers/ide/icside.c icside_register_v6(struct icside_state * · line 470
Quoted 6 lines
drivers/ide/icside.c +1
-1@@ -467,7 +467,7 @@ icside_register_v6(struct icside_state *struct ide_host *host;unsigned int sel =0 ;int ret; -hw_regs_t hw[2 ], *hws[] = { &hw[0 ],NULL ,NULL ,NULL }; +hw_regs_t hw[2 ], *hws[] = { &hw[0 ],NULL };I wonder if there's an old bug here since I'm not seeing when hws[1] is
set to non-NULL -- despite there are apparently two ports?
Quoted 4 lines
Indeed, this bug seems to date back to the 'struct
ide_host'
introduction, see this:
Care to send a fix?
Re: [PATCH 6/7] ide: pass number of ports to ide_host_{alloc,add}()
Hello.
Quoted 10 lines · Bartlomiej Zolnierkiewicz
Quoted 10 lines
drivers/ide/icside.c icside_register_v6(struct icside_state * · line 471
Quoted 7 lines
drivers/ide/icside.c +1
-1@@ -467,7 +467,7 @@ icside_register_v6(struct icside_state *struct ide_host *host;unsigned int sel =0 ;int ret; -hw_regs_t hw[2 ], *hws[] = { &hw[0 ],NULL ,NULL ,NULL }; +hw_regs_t hw[2 ], *hws[] = { &hw[0 ],NULL };I wonder if there's an old bug here since I'm not seeing when hws[1] is
set to non-NULL -- despite there are apparently two ports?
Quoted 8 lines
Quoted 5 lines
Indeed, this bug seems to date back to the 'struct
ide_host'
introduction, see this:Care to send a fix?
I will...
MBR, Sergei
Re: [PATCH 7/7] ide: remove hw_regs_t typedef
In reply to Bartlomiej ZolnierkiewiczHello.
Quoted 5 lines · Bartlomiej Zolnierkiewicz
Remove
hw_regs_ttypedef and rename structhw_regs_sto structide_hw.There should be no functional changes caused by this patch.
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>
MBR, Sergei
Re: [PATCH 6/7] ide: pass number of ports to ide_host_{alloc,add}()
In reply to Sergei ShtylyovQuoted 52 lines · On Thursday 14 May 2009 20:59:51 Sergei Shtylyov wrote:
Quoted 6 lines · Bartlomiej Zolnierkiewicz
Pass number of ports to ide_host_{alloc,add}() and then update all users accordingly.
There should be no functional changes caused by this patch.
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>Acked-by Sergei Shtylyov <[email protected]>drivers/ide/buddha.c static int __init buddha_init(void) · line 163
Quoted 10 lines
Index:
b/drivers/ide/buddha.c
===================================================================drivers/ide/buddha.c +1
-1@@ -160,7 +160,7 @@ static int __init buddha_init(void)while ((z =zorro_find_device (ZORRO_WILDCARD , z))) {unsigned long board; -hw_regs_t hw[MAX_NUM_HWIFS ], *hws[] = {NULL ,NULL ,NULL ,NULL }; +hw_regs_t hw[MAX_NUM_HWIFS ], *hws[] = {NULL ,NULL ,NULL };I think it makes sense to just drop the NULL initializers here...
drivers/ide/buddha.c fail_base2: · line 227
Quoted 9 lines
drivers/ide/buddha.c +1
-1if (z->id ==ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA ) { buddha_num_hwifs =BUDDHA_NUM_HWIFS ;@@ -224,7 +224,7 @@ fail_base2: hws[i] = &hw[i]; } -ide_host_add (&buddha_port_info, hws,NULL ); +ide_host_add (&buddha_port_info, hws, i,NULL );... since
ide_host_add()won't look beyond hws[i - 1] anyway.drivers/ide/cmd640.c static int __init cmd640x_init(void) · line 711
Quoted 13 lines
drivers/ide/buddha.c +0
-0}return 0 ;Index:
b/drivers/ide/cmd640.c
===================================================================drivers/ide/cmd640.c +1
-1@@ -708,7 +708,7 @@ static int __init cmd640x_init(void)int second_port_cmd640 =0 , rc;const char *bus_type, *port2;u8 b, cfr; -hw_regs_t hw[2 ], *hws[] = {NULL ,NULL ,NULL ,NULL }; +hw_regs_t hw[2 ], *hws[] = {NULL ,NULL };Same here...
Quoted 12 lines
drivers/ide/gayle.c static int __init gayle_init(void) · line 128
Quoted 10 lines
Index:
b/drivers/ide/gayle.c
===================================================================drivers/ide/gayle.c +1
-1@@ -125,7 +125,7 @@ static int __init gayle_init(void)unsigned long base, ctrlport, irqport;ide_ack_intr_t *ack_intr;int a4000, i, rc; -hw_regs_t hw[GAYLE_NUM_HWIFS ], *hws[] = {NULL ,NULL ,NULL ,NULL }; +hw_regs_t hw[GAYLE_NUM_HWIFS ], *hws[] = {NULL ,NULL };... and here.
done in v2:
...
v2:
- drop no longer needed NULL initializers in buddha.c, cmd640.c and gayle.c (noticed by Sergei)
...
drivers/ide/buddha.c +1 -1
@@ -160,7 +160,7 @@while ((z =zorro_find_device (ZORRO_WILDCARD , z))) {unsigned long board; -hw_regs_t hw[MAX_NUM_HWIFS ], *hws[] = {NULL ,NULL ,NULL }; +hw_regs_t hw[MAX_NUM_HWIFS ], *hws[MAX_NUM_HWIFS ];if (z->id ==ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA ) { buddha_num_hwifs =BUDDHA_NUM_HWIFS ;
drivers/ide/cmd640.c +1 -1
@@ -708,7 +708,7 @@int second_port_cmd640 =0 , rc;const char *bus_type, *port2;u8 b, cfr; -hw_regs_t hw[2 ], *hws[] = {NULL ,NULL }; +hw_regs_t hw[2 ], *hws[2 ];if (cmd640_vlb &&probe_for_cmd640_vlb ()) { bus_type ="VLB" ;
drivers/ide/gayle.c +1 -1
@@ -125,7 +125,7 @@unsigned long base, ctrlport, irqport;ide_ack_intr_t *ack_intr;int a4000, i, rc; -hw_regs_t hw[GAYLE_NUM_HWIFS ], *hws[] = {NULL ,NULL }; +hw_regs_t hw[GAYLE_NUM_HWIFS ], *hws[GAYLE_NUM_HWIFS ];if (!MACH_IS_AMIGA )return -ENODEV ;
Re: [PATCH 3/7] ide: merge ide_disk_special() into do_special()
In reply to Sergei ShtylyovQuoted 23 lines · On Thursday 14 May 2009 14:23:32 Sergei Shtylyov wrote:
Hello.
Quoted 18 lines · Joe Perches
drivers/ide/ide-io.c static void ide_tf_set_setmult_cmd(ide_d
Quoted 16 lines
While at it:
- change debugprintk()level toKERN_DEBUG
- update documentationThere should be no functional changes caused by this patch.
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>---
drivers/ide/ide-io.c| 44 ++++++++++++++++++--------------------------1 file changed, 18 insertions(+), 26 deletions(-)Index:
b/drivers/ide/ide-io.c
===================================================================drivers/ide/ide-io.c +0
-0@@ -184,11 +184,28 @@ static void ide_tf_set_setmult_cmd(ide_d[]
Quoted 8 lines
Quoted 5 lines
drivers/ide/ide-io.c static void ide_tf_set_setmult_cmd(ide_d · line 186
Quoted 3 lines
drivers/ide/ide-io.c +3
-0+#ifdef DEBUG +printk (KERN_DEBUG "%s: %s: 0x%02x\n" , drive->name, s->all); +#endif
pr_debug?Yes, and the number of arguments doesn't correspond to the number of the
format specifiers.
Ugh :) Fixed in the revised version (interdiff below)...
When it comes to pr_debug() & co. I will warmly welcome patches converting drivers/ide/*.[ch] to use them.
...
v2:
- fix DEBUG build (noticed by Sergei)
...
drivers/ide/ide-io.c +1 -1
@@ -198,7 +198,7 @@struct ide_cmd cmd;#ifdef DEBUG -printk (KERN_DEBUG "%s: %s: 0x%02x\n" , drive->name, s->all); +printk (KERN_DEBUG "%s: %s: 0x%02x\n" , drive->name, __func__, s->all);#endif if (drive->media != ide_disk) { s->all =0 ;
Sergei Shtylyov
Acked-byRe: [PATCH 3/7] ide: merge ide_disk_special() into do_special()
Hello.
Quoted 44 lines · Bartlomiej Zolnierkiewicz
Quoted 19 lines
Quoted 19 lines
Quoted 16 lines
While at it:
- change debugprintk()level toKERN_DEBUG
- update documentationThere should be no functional changes caused by this patch.
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>---
drivers/ide/ide-io.c| 44 ++++++++++++++++++--------------------------1 file changed, 18 insertions(+), 26 deletions(-)Index:
b/drivers/ide/ide-io.c
===================================================================drivers/ide/ide-io.c static void ide_tf_set_setmult_cmd(ide_d · line 184
Quoted 1 line
drivers/ide/ide-io.c +0
-0@@ -184,11 +184,28 @@ static void ide_tf_set_setmult_cmd(ide_d[]
Quoted 9 lines
Quoted 6 lines
drivers/ide/ide-io.c static void ide_tf_set_setmult_cmd(ide_d · line 188
Quoted 4 lines
drivers/ide/ide-io.c +3
-0+#ifdef DEBUG +printk (KERN_DEBUG "%s: %s: 0x%02x\n" , drive->name, s->all); +#endif
pr_debug?Yes, and the number of arguments doesn't correspond to the number of the
format specifiers.Ugh :) Fixed in the revised version (interdiff below)...
When it comes to
pr_debug()& co. I will warmly welcome patches converting drivers/ide/*.[ch] to use them....
v2:
- fix DEBUG build (noticed by Sergei)
...diff -u
b/drivers/ide/ide-io.cb/drivers/ide/ide-io.c
drivers/ide/ide-io.c line 204
Quoted 8 lines
drivers/ide/ide-io.c +1
-1@@ -198,7 +198,7 @@struct ide_cmd cmd;#ifdef DEBUG -printk (KERN_DEBUG "%s: %s: 0x%02x\n" , drive->name, s->all); +printk (KERN_DEBUG "%s: %s: 0x%02x\n" , drive->name, __func__, s->all);#endif if (drive->media != ide_disk) { s->all =0 ;
MBR, Sergei