IDE updates part 2
Subsystems (5)
Hi,
More IDE changes for 2.6.31 merge window:
* Improved Host Protected Area handling [ http://lwn.net/Articles/335913/ ].
* Use PIO Mode 0 during probe if possible -- increases chance of successful probe on BIOS/firmware-less systems (Joao Ramos, Hugh Dickins).
* Generalized nIEN quirks handling (some older disks don't handle IRQ [un]masking well and we need a special treatment for them).
* pdc202xx_old host driver fixes (Sergei Shtylyov).
* ide-tape fixes (Borislav Petkov).
* Misc fixes/cleanups.
Linus, please pull from 'for-2.6.31' branch of:
master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git for-2.6.31
to receive the following updates:
Documentation/ide/ide.txt | 2 + Documentation/kernel-parameters.txt | 7 +-- 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/hpt366.c | 25 +--------- drivers/ide/icside.c | 77 ++++------------------------ drivers/ide/ide-4drives.c | 6 +- drivers/ide/ide-atapi.c | 2 +- drivers/ide/ide-cs.c | 6 +- drivers/ide/ide-disk.c | 75 +++++++++++++++++++++++---- drivers/ide/ide-dma.c | 1 - drivers/ide/ide-eh.c | 14 +++--- drivers/ide/ide-gd.c | 14 +++++ drivers/ide/ide-generic.c | 7 +-- drivers/ide/ide-h8300.c | 10 ++-- drivers/ide/ide-io.c | 77 +++++++++++++--------------- drivers/ide/ide-iops.c | 26 +++++++++- drivers/ide/ide-legacy.c | 7 +-- drivers/ide/ide-pnp.c | 6 +- drivers/ide/ide-probe.c | 95 +++++++++++++++++++--------------- drivers/ide/ide-tape.c | 90 +++++++++++++++++---------------- drivers/ide/ide-taskfile.c | 3 +- drivers/ide/ide.c | 10 ++++ drivers/ide/ide_platform.c | 9 ++-- drivers/ide/macide.c | 9 ++-- drivers/ide/palm_bk3710.c | 6 +- drivers/ide/pdc202xx_new.c | 26 ---------- drivers/ide/pdc202xx_old.c | 92 +-------------------------------- 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 | 85 ++++++++----------------------- drivers/ide/sgiioc4.c | 7 +-- drivers/ide/siimage.c | 4 +- drivers/ide/sl82c105.c | 9 ++-- drivers/ide/tx4938ide.c | 5 +- drivers/ide/tx4939ide.c | 5 +- fs/partitions/check.c | 42 ++++++++++++---- include/linux/blkdev.h | 2 + include/linux/genhd.h | 1 + include/linux/ide.h | 46 +++++++---------- 48 files changed, 442 insertions(+), 563 deletions(-)
Bartlomiej Zolnierkiewicz (23):
ide: BUG() on unknown flags in ide_disk_special()
ide: merge ide_disk_special() into do_special() (v2)
ide: replace special_t typedef by IDE_SFLAG_* flags
ide: remove chipset field from hw_regs_t
ide: pass number of ports to ide_host_{alloc,add}() (v2)
ide: remove hw_regs_t typedef
Merge branch 'for-linus' into for-next
partitions: warn about the partition exceeding device capacity
partitions: add ->set_capacity block device method
ide-gd: implement block device ->set_capacity method (v2)
ide: preserve Host Protected Area by default (v2)
Merge branch 'for-linus' into for-next
icside: remove superfluous ->maskproc method
ide: remove superfluous SELECT_MASK() call from ide_driveid_update()
ide: remove superfluous SELECT_MASK() call from do_rw_taskfile()
hpt366: sync quirk_drives[] list with pdc202xx_{new,old}.c
hpt366: enable all quirks for devices on quirk_drives[] list
ide: respect quirk_drives[] list on all controllers
ide: add IDE_DFLAG_NIEN_QUIRK device flag
ide: skip probe if there are no devices on the port (v2)
ide: unexport ide_find_dma_mode()
ide: re-implement ide_pci_init_one() on top of ide_pci_init_two() Merge branch 'for-2.6.31' into 2.6.31
Borislav Petkov (3):
ide-tape: change IDE_AFLAG_IGNORE_DSC non-atomically
ide-tape: fix IDE_AFLAG_* atomic accesses
ide-tape: fix proc warning
Hugh Dickins (1):
ide: fix PowerMac bootup oops
Joao Ramos (1):
ide: try to use PIO Mode 0 during probe if possible
Sergei Shtylyov (4):
pdc202xx_old: use ide_dma_test_irq()
pdc202xx_old: don't call pdc202xx_reset() on IRQ timeout
pdc202xx_old: kill resetproc() method
sl82c105: add printk() logging facility
Documentation/ide/ide.txt +2 -0
@@ -216,6 +216,8 @@ Other kernel parameters for ide_core are: * "noflush=[interface_number.device_number]" to disable flush requests +* "nohpa=[interface_number.device_number]" to disable Host Protected Area + * "noprobe=[interface_number.device_number]" to skip probing * "nowerr=[interface_number.device_number]" to ignore the WRERR_STAT bit
Documentation/kernel-parameters.txt +2 -5
@@ -887,11 +887,8 @@ and is between 256 and 4096 characters. It is defined in the file ide-core.nodma= [HW] (E)IDE subsystem Format: =0.0 to prevent dma on hda, =0.1 hdb =1.0 hdc - .vlb_clock .pci_clock .noflush .noprobe .nowerr .cdrom - .chs .ignore_cable are additional options - See Documentation/ide/ide.txt. - - idebus= [HW] (E)IDE subsystem - VLB/PCI bus speed + .vlb_clock .pci_clock .noflush .nohpa .noprobe .nowerr + .cdrom .chs .ignore_cable are additional options See Documentation/ide/ide.txt. ide-pci-generic.all-generic-ide [HW] (E)IDE subsystem
drivers/ide/at91_ide.c +3 -4
@@ -216,6 +216,7 @@ static const struct ide_port_info at91_ide_port_info __initdata = { .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, };/*
@@ -246,8 +247,7 @@ irqreturn_t at91_irq_handler(int irq, void *dev_id)static int __init at91_ide_probe (struct platform_device *pdev) {int ret; -hw_regs_t hw; -hw_regs_t *hws[] = { &hw,NULL ,NULL ,NULL }; +struct ide_hw hw, *hws[] = { &hw };struct ide_host *host;struct resource *res;unsigned long tf_base =0 , ctl_base =0 ;
@@ -304,10 +304,9 @@ static int __init at91_ide_probe(struct platform_device *pdev)ide_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); + 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 +4 -4
@@ -449,7 +449,7 @@ static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d) }#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;
@@ -499,6 +499,7 @@ static const struct ide_port_info au1xxx_port_info = {#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)
@@ -507,7 +508,7 @@ static int au_ide_probe(struct platform_device *dev)struct resource *res;struct ide_host *host;int ret =0 ; -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +struct ide_hw hw, *hws[] = { &hw };#if defined(CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA )char *mode ="MWDMA2" ;
@@ -548,9 +549,8 @@ static int au_ide_probe(struct platform_device *dev)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); + ret =ide_host_add (&au1xxx_port_info, hws,1 , &host);if (ret) goto out;
drivers/ide/buddha.c +4 -5
@@ -121,7 +121,7 @@ static int xsurf_ack_intr(ide_hwif_t *hwif)return 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) {
@@ -139,13 +139,12 @@ static void __init buddha_setup_ports(hw_regs_t *hw, unsigned long base, 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, };/*
@@ -161,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 }; +struct ide_hw hw[MAX_NUM_HWIFS ], *hws[MAX_NUM_HWIFS ];if (z->id ==ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA ) { buddha_num_hwifs =BUDDHA_NUM_HWIFS ;
@@ -225,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 -4
@@ -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 }; +struct ide_hw hw[2 ], *hws[2 ];if (cmd640_vlb &&probe_for_cmd640_vlb ()) { bus_type ="VLB" ;
@@ -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);
@@ -824,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_chipset __devinitdata = {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 }; +struct ide_hw hw[2 ], *hws[] = {NULL ,NULL };ide_setup_pci_noise (dev, d);
@@ -136,7 +136,7 @@ static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_devicide_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 +3 -3
@@ -68,6 +68,7 @@ static const struct ide_port_info delkin_cb_port_info = { IDE_HFLAG_NO_DMA, .irq_flags = IRQF_SHARED, .init_chipset = delkin_cb_init_chipset, + .chipset = ide_pci, }; static int __devinit
@@ -76,7 +77,7 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id)struct ide_host *host;unsigned long base;int rc; -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +struct ide_hw hw, *hws[] = { &hw }; rc =pci_enable_device (dev);if (rc) {
@@ -97,9 +98,8 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id)ide_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); + rc =ide_host_add (&delkin_cb_port_info, hws,1 , &host);if (rc) goto out_disable;
drivers/ide/falconide.c +4 -5
@@ -111,9 +111,10 @@ static const struct ide_port_info falconide_port_info = { .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) +static void __init falconide_setup_ports (struct ide_hw *hw) {int i;
@@ -128,8 +129,6 @@ static void __init falconide_setup_ports(hw_regs_t *hw) hw->irq =IRQ_MFP_IDE ; hw->ack_intr =NULL ; - - hw->chipset = ide_generic; }/*
@@ -139,7 +138,7 @@ static void __init falconide_setup_ports(hw_regs_t *hw)static int __init falconide_init (void ) {struct ide_host *host; -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +struct ide_hw hw, *hws[] = { &hw };int rc;if (!MACH_IS_ATARI || !ATARIHW_PRESENT (IDE ))
@@ -154,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 +4 -5
@@ -88,7 +88,7 @@ static int gayle_ack_intr_a1200(ide_hwif_t *hwif)return 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) {
@@ -106,14 +106,13 @@ static void __init gayle_setup_ports(hw_regs_t *hw, unsigned long base, 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, };/*
@@ -126,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 }; +struct ide_hw hw[GAYLE_NUM_HWIFS ], *hws[GAYLE_NUM_HWIFS ];if (!MACH_IS_AMIGA )return -ENODEV ;
@@ -171,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/hpt366.c +1 -24
@@ -138,14 +138,6 @@#undef HPT_RESET_STATE_ENGINE#undef HPT_DELAY_INTERRUPT -static const char *quirk_drives[] = { -"QUANTUM FIREBALLlct08 08" , -"QUANTUM FIREBALLP KA6.4" , -"QUANTUM FIREBALLP LM20.4" , -"QUANTUM FIREBALLP LM20.5" , -NULL -}; -static const char *bad_ata100_5[] = {"IBM-DTLA-307075" ,"IBM-DTLA-307060" ,
@@ -729,27 +721,13 @@ static void hpt3xx_set_pio_mode(ide_drive_t *drive, const u8 pio)hpt3xx_set_mode (drive,XFER_PIO_0 + pio); } -static void hpt3xx_quirkproc (ide_drive_t *drive) -{ -char *m = (char *)&drive->id[ATA_ID_PROD ]; -const char **list = quirk_drives; - -while (*list) -if (strstr (m, *list++)) { - drive->quirk_list =1 ; -return ; - } - - drive->quirk_list =0 ; -} -static void hpt3xx_maskproc (ide_drive_t *drive,int mask) {ide_hwif_t *hwif = drive->hwif;struct pci_dev *dev =to_pci_dev (hwif->dev);struct hpt_info *info =hpt3xx_get_info (hwif->dev); -if (drive->quirk_list ==0 ) +if ((drive->dev_flags &IDE_DFLAG_NIEN_QUIRK ) ==0 )return ;if (info->chip_type >=HPT370 ) {
@@ -1404,7 +1382,6 @@ static int __devinit hpt36x_init(struct pci_dev *dev, struct pci_dev *dev2)static const struct ide_port_ops hpt3xx_port_ops = { .set_pio_mode = hpt3xx_set_pio_mode, .set_dma_mode = hpt3xx_set_mode, - .quirkproc = hpt3xx_quirkproc, .maskproc = hpt3xx_maskproc, .mdma_filter = hpt3xx_mdma_filter, .udma_filter = hpt3xx_udma_filter,
drivers/ide/icside.c +11 -66
164 lines not on this page · raw message
drivers/ide/ide-4drives.c +3 -3
@@ -25,12 +25,13 @@ static const struct ide_port_info ide_4drives_port_info = { .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 ) {unsigned long base =0x1f0 , ctl =0x3f6 ; -hw_regs_t hw, *hws[] = { &hw, &hw,NULL ,NULL }; +struct ide_hw hw, *hws[] = { &hw, &hw };if (probe_4drives ==0 )return -ENODEV ;
@@ -52,9 +53,8 @@ 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 ); +return ide_host_add (&ide_4drives_port_info, hws,2 ,NULL ); }module_init (ide_4drives_init);
drivers/ide/ide-atapi.c +1 -1
@@ -259,7 +259,7 @@ void ide_retry_pc(ide_drive_t *drive) pc->req_xfer =blk_rq_bytes (sense_rq);if (drive->media == ide_tape) -set_bit (IDE_AFLAG_IGNORE_DSC , &drive->atapi_flags); + drive->atapi_flags |=IDE_AFLAG_IGNORE_DSC ;/* * Push back the failed request and put request sense on top
drivers/ide/ide-cs.c +3 -3
@@ -155,6 +155,7 @@ static const struct ide_port_info idecs_port_info = { .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,
@@ -163,7 +164,7 @@ static struct ide_host *idecs_register(unsigned long io, unsigned long ctl,struct ide_host *host;ide_hwif_t *hwif;int i, rc; -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +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",
@@ -181,10 +182,9 @@ static struct ide_host *idecs_register(unsigned long io, unsigned long ctl,memset (&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); + rc =ide_host_add (&idecs_port_info, hws,1 , &host);if (rc) goto out_release;
drivers/ide/ide-disk.c +63 -12
138 lines not on this page · raw message
drivers/ide/ide-dma.c +0 -1
@@ -347,7 +347,6 @@ u8 ide_find_dma_mode(ide_drive_t *drive, u8 req_mode)return mode; } -EXPORT_SYMBOL_GPL (ide_find_dma_mode);static int ide_tune_dma (ide_drive_t *drive) {
drivers/ide/ide-eh.c +7 -7
@@ -52,7 +52,7 @@ static ide_startstop_t ide_ata_error(ide_drive_t *drive, struct request *rq, }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_t *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_t *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)
@@ -408,8 +407,9 @@ static ide_startstop_t do_reset1(ide_drive_t *drive, int do_not_try_atapi)/* more than enough time */ udelay (10 );/* clear SRST, leave nIEN (unless device is on the quirk list) */ - tp_ops->write_devctl (hwif, (drive->quirk_list ==2 ?0 :ATA_NIEN ) | -ATA_DEVCTL_OBS ); + tp_ops->write_devctl (hwif, + ((drive->dev_flags &IDE_DFLAG_NIEN_QUIRK ) ?0 :ATA_NIEN ) | +ATA_DEVCTL_OBS );/* more than enough time */ udelay (10 ); hwif->poll_timeout = jiffies +WAIT_WORSTCASE ;
drivers/ide/ide-gd.c +14 -0
@@ -287,6 +287,19 @@ static int ide_gd_media_changed(struct gendisk *disk)return ret; } +static unsigned long long ide_gd_set_capacity (struct gendisk *disk, +unsigned long long capacity) +{ +struct ide_disk_obj *idkp =ide_drv_g (disk, ide_disk_obj); +ide_drive_t *drive = idkp->drive; +const struct ide_disk_ops *disk_ops = drive->disk_ops; + +if (disk_ops->set_capacity) +return disk_ops->set_capacity (drive, capacity); + +return drive->capacity64; +} +static int ide_gd_revalidate_disk (struct gendisk *disk) {struct ide_disk_obj *idkp =ide_drv_g (disk, ide_disk_obj);
@@ -315,6 +328,7 @@ static struct block_device_operations ide_gd_ops = { .locked_ioctl = ide_gd_ioctl, .getgeo = ide_gd_getgeo, .media_changed = ide_gd_media_changed, + .set_capacity = ide_gd_set_capacity, .revalidate_disk = ide_gd_revalidate_disk };
drivers/ide/ide-generic.c +3 -4
@@ -29,6 +29,7 @@ MODULE_PARM_DESC(probe_mask, "probe mask for legacy ISA IDE ports");static const struct ide_port_info ide_generic_port_info = { .host_flags =IDE_HFLAG_NO_DMA , + .chipset = ide_generic, };#ifdef CONFIG_ARM
@@ -85,7 +86,7 @@ static void ide_generic_check_pci_legacy_iobases(int *primary, int *secondary)static int __init ide_generic_init (void ) { -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +struct ide_hw hw, *hws[] = { &hw };unsigned long io_addr;int i, rc =0 , primary =0 , secondary =0 ;
@@ -132,9 +133,7 @@ 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 ); + 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 +5 -5
@@ -64,26 +64,26 @@ static const struct ide_tp_ops h8300_tp_ops = {#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 ; 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 ) { -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +struct ide_hw 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-io.c +35 -42
113 lines not on this page · raw message
drivers/ide/ide-iops.c +24 -2
@@ -282,6 +282,29 @@ no_80w:return 0 ; } +static const char *nien_quirk_list[] = { +"QUANTUM FIREBALLlct08 08" , +"QUANTUM FIREBALLP KA6.4" , +"QUANTUM FIREBALLP KA9.1" , +"QUANTUM FIREBALLP KX13.6" , +"QUANTUM FIREBALLP KX20.5" , +"QUANTUM FIREBALLP KX27.3" , +"QUANTUM FIREBALLP LM20.4" , +"QUANTUM FIREBALLP LM20.5" , +NULL +}; + +void ide_check_nien_quirk_list (ide_drive_t *drive) +{ +const char **list, *m = (char *)&drive->id[ATA_ID_PROD ]; + +for (list = nien_quirk_list; *list !=NULL ; list++) +if (strstr (m, *list) !=NULL ) { + drive->dev_flags |=IDE_DFLAG_NIEN_QUIRK ; +return ; + } +} +int ide_driveid_update (ide_drive_t *drive) {u16 *id;
@@ -311,7 +334,6 @@ int ide_driveid_update(ide_drive_t *drive)return 1 ; out_err: -SELECT_MASK (drive,0 );if (rc ==2 )printk (KERN_ERR "%s: %s: bad status\n" , drive->name, __func__);kfree (id);
@@ -365,7 +387,7 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed) tp_ops->exec_command (hwif,ATA_CMD_SET_FEATURES ); -if (drive->quirk_list ==2 ) +if (drive->dev_flags &IDE_DFLAG_NIEN_QUIRK ) tp_ops->write_devctl (hwif,ATA_DEVCTL_OBS ); error = __ide_wait_stat(drive, drive->ready_stat,
drivers/ide/ide-legacy.c +3 -4
@@ -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) {
@@ -33,7 +33,6 @@ static void ide_legacy_init_one(hw_regs_t **hws, hw_regs_t *hw,ide_std_init_ports (hw, base, ctl); hw->irq = irq; - hw->chipset = d->chipset; hw->config = config; hws[port_no] = hw;
@@ -41,7 +40,7 @@ static void ide_legacy_init_one(hw_regs_t **hws, hw_regs_t *hw,int ide_legacy_device_add (const struct ide_port_info *d,unsigned long config) { -hw_regs_t hw[2 ], *hws[] = {NULL ,NULL ,NULL ,NULL }; +struct ide_hw hw[2 ], *hws[] = {NULL ,NULL };memset (&hw,0 ,sizeof (hw));
@@ -53,6 +52,6 @@ int ide_legacy_device_add(const struct ide_port_info *d, unsigned long config) (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 +3 -3
@@ -29,6 +29,7 @@ static struct pnp_device_id idepnp_devices[] = {static 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)
@@ -36,7 +37,7 @@ static int idepnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)struct ide_host *host;unsigned long base, ctl;int rc; -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +struct ide_hw hw, *hws[] = { &hw }; printk(KERN_INFO DRV_NAME ": generic PnP IDE interface\n");
@@ -62,9 +63,8 @@ static int idepnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)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); + rc =ide_host_add (&ide_pnp_port_info, hws,1 , &host);if (rc) goto out;
drivers/ide/ide-probe.c +53 -42
239 lines not on this page · raw message
drivers/ide/ide-tape.c +46 -44
238 lines not on this page · raw message
drivers/ide/ide-taskfile.c +1 -2
@@ -98,7 +98,6 @@ ide_startstop_t do_rw_taskfile(ide_drive_t *drive, struct ide_cmd *orig_cmd)if ((cmd->tf_flags &IDE_TFLAG_DMA_PIO_FALLBACK ) ==0 ) {ide_tf_dump (drive->name, cmd); tp_ops->write_devctl (hwif,ATA_DEVCTL_OBS ); -SELECT_MASK (drive,0 );if (cmd->ftf_flags &IDE_FTFLAG_OUT_DATA ) {u8 data[2 ] = { cmd->tf.data, cmd->hob.data };
@@ -166,7 +165,7 @@ static ide_startstop_t task_no_data_intr(ide_drive_t *drive)if (!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/ide.c +10 -0
@@ -211,6 +211,11 @@ static unsigned int ide_noflush;module_param_call (noflush, ide_set_dev_param_mask,NULL , &ide_noflush,0 );MODULE_PARM_DESC (noflush,"disable flush requests for a device" ); +static unsigned int ide_nohpa; + +module_param_call (nohpa, ide_set_dev_param_mask,NULL , &ide_nohpa,0 ); +MODULE_PARM_DESC (nohpa,"disable Host Protected Area for a device" ); +static unsigned int ide_noprobe;module_param_call (noprobe, ide_set_dev_param_mask,NULL , &ide_noprobe,0 );
@@ -281,6 +286,11 @@ static void ide_dev_apply_params(ide_drive_t *drive, u8 unit) drive->name); drive->dev_flags |=IDE_DFLAG_NOFLUSH ; } +if (ide_nohpa & (1 << i)) { +printk (KERN_INFO "ide: disabling Host Protected Area for %s\n" , + drive->name); + drive->dev_flags |=IDE_DFLAG_NOHPA ; + }if (ide_noprobe & (1 << i)) {printk (KERN_INFO "ide: skipping probe for %s\n" , drive->name); drive->dev_flags |=IDE_DFLAG_NOPROBE ;
drivers/ide/ide_platform.c +4 -5
@@ -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,
@@ -40,12 +40,11 @@ static void __devinit plat_ide_setup_ports(hw_regs_t *hw, 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)
@@ -55,7 +54,7 @@ static int __devinit plat_ide_probe(struct platform_device *pdev)struct pata_platform_info *pdata;struct ide_host *host;int ret =0 , mmio =0 ; -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +struct ide_hw hw, *hws[] = { &hw };struct ide_port_info d = platform_ide_port_info; pdata = pdev->dev.platform_data;
@@ -99,7 +98,7 @@ static int __devinit plat_ide_probe(struct platform_device *pdev)if (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 +4 -5
@@ -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;
@@ -76,13 +76,12 @@ static void __init macide_setup_ports(hw_regs_t *hw, unsigned long base, 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[] =
@@ -97,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 }; +struct ide_hw hw, *hws[] = { &hw };if (!MACH_IS_MAC )return -ENODEV ;
@@ -127,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 +3 -3
@@ -306,6 +306,7 @@ static struct ide_port_info __devinitdata palm_bk3710_port_info = { .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)
@@ -315,7 +316,7 @@ static int __init palm_bk3710_probe(struct platform_device *pdev)void __iomem *base;unsigned long rate, mem_size;int i, rc; -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +struct ide_hw hw, *hws[] = { &hw }; clk =clk_get (&pdev->dev,"IDECLK" );if (IS_ERR (clk))
@@ -363,13 +364,12 @@ static int __init palm_bk3710_probe(struct platform_device *pdev) (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 ;/* 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/pdc202xx_new.c +0 -26
@@ -40,18 +40,6 @@ #define DBG(fmt, args...)#endif -static const char *pdc_quirk_drives[] = { -"QUANTUM FIREBALLlct08 08" , -"QUANTUM FIREBALLP KA6.4" , -"QUANTUM FIREBALLP KA9.1" , -"QUANTUM FIREBALLP LM20.4" , -"QUANTUM FIREBALLP KX13.6" , -"QUANTUM FIREBALLP KX20.5" , -"QUANTUM FIREBALLP KX27.3" , -"QUANTUM FIREBALLP LM20.5" , -NULL -}; -static u8 max_dma_rate (struct pci_dev *pdev) {u8 mode;
@@ -200,19 +188,6 @@ static u8 pdcnew_cable_detect(ide_hwif_t *hwif)return ATA_CBL_PATA80 ; } -static void pdcnew_quirkproc (ide_drive_t *drive) -{ -const char **list, *m = (char *)&drive->id[ATA_ID_PROD ]; - -for (list = pdc_quirk_drives; *list !=NULL ; list++) -if (strstr (m, *list) !=NULL ) { - drive->quirk_list =2 ; -return ; - } - - drive->quirk_list =0 ; -} -static void pdcnew_reset (ide_drive_t *drive) {/*
@@ -473,7 +448,6 @@ static struct pci_dev * __devinit pdc20270_get_dev2(struct pci_dev *dev)static const struct ide_port_ops pdcnew_port_ops = { .set_pio_mode = pdcnew_set_pio_mode, .set_dma_mode = pdcnew_set_dma_mode, - .quirkproc = pdcnew_quirkproc, .resetproc = pdcnew_reset, .cable_detect = pdcnew_cable_detect, };
drivers/ide/pdc202xx_old.c +3 -89
136 lines not on this page · raw message
drivers/ide/pmac.c +7 -6
@@ -1023,13 +1023,14 @@ static const struct ide_port_info pmac_port_info = {* 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,NULL ,NULL ,NULL }; +struct ide_hw *hws[] = { hw };struct ide_port_info d = pmac_port_info;int rc;
@@ -1077,7 +1078,7 @@ static int __devinit pmac_ide_setup_device(pmac_ide_hwif_t *pmif, hw_regs_t *hw)/* 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 ];
@@ -1124,7 +1125,7 @@ static int __devinit pmac_ide_setup_device(pmac_ide_hwif_t *pmif, hw_regs_t *hw)return 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 *mdev, const struct of_device_id *match)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 *pdev, const struct pci_device_id *id)void __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 +5 -6
@@ -51,11 +51,11 @@ static int q40ide_default_irq(unsigned long base)/* * 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);
@@ -70,8 +70,6 @@ static void q40_ide_setup_ports(hw_regs_t *hw, unsigned long base, 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_port_info = { .tp_ops = &q40ide_tp_ops, .host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA, .irq_flags = IRQF_SHARED, + .chipset = ide_generic, };/*
@@ -136,7 +135,7 @@ static const char *q40_ide_names[Q40IDE_NUM_HWIFS]={static int __init q40ide_init (void ) {int i; -hw_regs_t hw[Q40IDE_NUM_HWIFS ], *hws[] = {NULL ,NULL ,NULL ,NULL }; +struct ide_hw hw[Q40IDE_NUM_HWIFS ], *hws[] = {NULL ,NULL };if (!MACH_IS_Q40 )return -ENODEV ;
@@ -163,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 +4 -4
@@ -13,9 +13,10 @@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, +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;
@@ -35,7 +36,7 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id)void __iomem *base;struct ide_host *host;int ret; -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +struct ide_hw hw, *hws[] = { &hw }; ret =ecard_request_resources (ec);if (ret)
@@ -49,10 +50,9 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id)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); + ret =ide_host_add (&rapide_port_info, hws,1 , &host);if (ret) goto release;
drivers/ide/scc_pata.c +3 -3
@@ -559,7 +559,7 @@ static int scc_ide_setup_pci_device(struct pci_dev *dev, {struct scc_ports *ports =pci_get_drvdata (dev);struct ide_host *host; -hw_regs_t hw, *hws[] = { &hw,NULL ,NULL ,NULL }; +struct ide_hw hw, *hws[] = { &hw };int i, rc;memset (&hw,0 ,sizeof (hw));
@@ -567,9 +567,8 @@ static int scc_ide_setup_pci_device(struct pci_dev *dev, 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); + rc =ide_host_add (d, hws,1 , &host);if (rc)return rc;
@@ -823,6 +822,7 @@ static const struct ide_port_info scc_chipset __devinitdata = { .host_flags = IDE_HFLAG_SINGLE, .irq_flags = IRQF_SHARED, .pio_mask = ATA_PIO4, + .chipset = ide_pci, };/**
drivers/ide/setup-pci.c +23 -62
160 lines not on this page · raw message
drivers/ide/sgiioc4.c +3 -4
@@ -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_dev *dev)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 }; +struct ide_hw hw, *hws[] = { &hw };int rc;/* Get the CmdBlk and CtrlBlk Base Registers */
@@ -575,13 +575,12 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev)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 */ 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/siimage.c +2 -2
@@ -451,8 +451,8 @@ static int sil_sata_reset_poll(ide_drive_t *drive)static 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 ); } }
drivers/ide/sl82c105.c +5 -4
@@ -10,7 +10,7 @@* with the timing registers setup. * -- Benjamin Herrenschmidt (01/11/03) [email protected] * -* Copyright (C) 2006-2007 MontaVista Software, Inc. <[email protected]> +* Copyright (C) 2006-2007,2009 MontaVista Software, Inc. <[email protected]> * Copyright (C) 2007 Bartlomiej Zolnierkiewicz */
@@ -146,14 +146,15 @@ static void sl82c105_dma_lost_irq(ide_drive_t *drive)u32 val, mask = hwif->channel ?CTRL_IDE_IRQB :CTRL_IDE_IRQA ;u8 dma_cmd; -printk ("sl82c105: lost IRQ, resetting host\n" ); +printk (KERN_WARNING "sl82c105: lost IRQ, resetting host\n" );/* * Check the raw interrupt from the drive. */ pci_read_config_dword (dev,0x40 , &val);if (val & mask) -printk ("sl82c105: drive was requesting IRQ, but host lost it\n" ); +printk (KERN_INFO "sl82c105: drive was requesting IRQ, " +"but host lost it\n" );/* * Was DMA enabled? If so, disable it - we're resetting the
@@ -162,7 +163,7 @@ static void sl82c105_dma_lost_irq(ide_drive_t *drive) dma_cmd =inb (hwif->dma_base +ATA_DMA_CMD );if (dma_cmd &1 ) {outb (dma_cmd & ~1 , hwif->dma_base +ATA_DMA_CMD ); -printk ("sl82c105: DMA was enabled\n" ); +printk (KERN_INFO "sl82c105: DMA was enabled\n" ); }sl82c105_reset_host (dev);
drivers/ide/tx4938ide.c +2 -3
@@ -130,8 +130,7 @@ static const struct ide_port_info tx4938ide_port_info __initdata = {static int __init tx4938ide_probe (struct platform_device *pdev) { -hw_regs_t hw; -hw_regs_t *hws[] = { &hw,NULL ,NULL ,NULL }; +struct ide_hw 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(struct platform_device *pdev)tx4938ide_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 tx4939ide_port_info __initdata = {static int __init tx4939ide_probe (struct platform_device *pdev) { -hw_regs_t hw; -hw_regs_t *hws[] = { &hw,NULL ,NULL ,NULL }; +struct ide_hw hw, *hws[] = { &hw };struct ide_host *host;struct resource *res;int irq, ret;
@@ -581,7 +580,7 @@ static int __init tx4939ide_probe(struct platform_device *pdev) 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 */
fs/partitions/check.c +32 -10
59 lines not on this page · raw message
include/linux/blkdev.h +2 -0
@@ -1226,6 +1226,8 @@ struct block_device_operations {int (*direct_access) (struct block_device *,sector_t ,void **,unsigned long *);int (*media_changed) (struct gendisk *); +unsigned long long (*set_capacity) (struct gendisk *, +unsigned long long );int (*revalidate_disk) (struct gendisk *);int (*getgeo)(struct block_device *,struct hd_geometry *);struct module *owner;
include/linux/genhd.h +1 -0
@@ -114,6 +114,7 @@ struct hd_struct {#define GENHD_FL_UP 16#define GENHD_FL_SUPPRESS_PARTITION_INFO 32#define GENHD_FL_EXT_DEVT 64/* allow extended devt */ +#define GENHD_FL_NATIVE_CAPACITY 128#define BLK_SCSI_MAX_CMDS (256)#define BLK_SCSI_CMD_PER_LONG (BLK_SCSI_MAX_CMDS / (sizeof(long) * 8))
include/linux/ide.h +20 -26
123 lines not on this page · raw message