IDE updates #3
Subsystems (5)
* Bugfix for IRQ masking prior to setting transfer mode on the device. (Sergei Shtylyov)
* PM support for delkin_cb host driver (fixes bugzilla bug #11735).
* ide-cd fixups and debug log enhancements. (Borislav Petkov)
* Fix compile warning in hpt366 (Sergei/me) and scc_pata (Sergei).
* Generic ATA/ATAPI disk driver (ide-gd) replacing ide-{disk,floppy} drivers. This makes the code more maintainable and easier to extend.
There are also some immediate benefits:
- driver specific debugging support for ATA devices
- extended device numbers support for ATAPI devices
- driver specific PM support for ATAPI devices
* Removal of the broken/dead hpt34x host driver (proper support for HPT343/345 is provided by pata_hpt3x3 host driver from Alan Cox).
* Misc fixes/cleanups.
Linus, please pull from:
master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git/
to receive the following updates:
arch/arm/mach-sa1100/include/mach/ide.h | 75 ------ drivers/ide/Kconfig | 88 +++----- drivers/ide/Makefile | 19 +- drivers/ide/ide-atapi.c | 2 +- drivers/ide/ide-cd.c | 61 +++-- drivers/ide/ide-cd_ioctl.c | 8 +- drivers/ide/ide-disk.c | 382 +++++------------------------- drivers/ide/ide-disk.h | 21 +- drivers/ide/ide-disk_ioctl.c | 4 +- drivers/ide/ide-disk_proc.c | 2 +- drivers/ide/ide-dma-sff.c | 2 +- drivers/ide/ide-floppy.c | 357 ++++------------------------ drivers/ide/ide-floppy.h | 41 +--- drivers/ide/ide-floppy_ioctl.c | 23 +- drivers/ide/ide-floppy_proc.c | 2 +- drivers/ide/ide-gd.c | 398 +++++++++++++++++++++++++++++++ drivers/ide/ide-gd.h | 44 ++++ drivers/ide/ide-iops.c | 2 +- drivers/ide/ide-probe.c | 1 + drivers/ide/ide-proc.c | 6 +- drivers/ide/ide-tape.c | 16 +- drivers/ide/pci/Makefile | 1 - drivers/ide/pci/delkin_cb.c | 63 +++++- drivers/ide/pci/hpt34x.c | 193 --------------- drivers/ide/pci/hpt366.c | 35 ++-- drivers/ide/pci/scc_pata.c | 4 - drivers/ide/pci/sgiioc4.c | 49 +--- drivers/leds/Kconfig | 2 +- drivers/scsi/ide-scsi.c | 26 ++- include/asm-frv/ide.h | 10 +- include/asm-m68k/ide.h | 9 - include/asm-parisc/ide.h | 4 - include/linux/ide.h | 36 ++- 33 files changed, 815 insertions(+), 1171 deletions(-) delete mode 100644 arch/arm/mach-sa1100/include/mach/ide.h create mode 100644 drivers/ide/ide-gd.c create mode 100644 drivers/ide/ide-gd.h delete mode 100644 drivers/ide/pci/hpt34x.c
Bartlomiej Zolnierkiewicz (27):
ide-disk: fix IDE_DFLAG_LBA48 handling on resume
ide-disk: lock media before checking for media change
ide-floppy: use alloc_disk_node()
ide-disk: use to_ide_drv() and ide_drv_g()
ide-disk: move IDE_DFLAG_DOORLOCKING flag handling to idedisk_set_doorlock() ide-{disk,floppy}: set IDE_DFLAG_ATTACH in *_setup()
ide-floppy: drop 'floppy' argument from idefloppy_setup()
ide-floppy: use drive->capacity64 for caching current capacity
ide: IDE_AFLAG_MEDIA_CHANGED -> IDE_DFLAG_MEDIA_CHANGED
ide: IDE_AFLAG_WP -> IDE_DFLAG_WP
ide: IDE_AFLAG_FORMAT_IN_PROGRESS -> IDE_DFLAG_FORMAT_IN_PROGRESS
ide: remove IDE_AFLAG_NO_DOORLOCKING
ide-disk: factor out generic disk handling code to ide-gd.c
ide-disk: use IDE_DFLAG_MEDIA_CHANGED
ide-floppy: factor out generic disk handling code to ide-gd-floppy.c
ide: prepare for merging ide-gd-floppy.c with ide-gd.c
ide: allow device drivers to specify per-device type /proc settings
ide: add generic ATA/ATAPI disk driver
ide: fix support for IDE PCI controllers using MMIO on frv
ide: remove dead <asm-arm/arch-sa1100/ide.h>
ide: remove M68K_IDE_SWAPW define from <asm-m68k/ide.h>
ide: remove unused macros from <asm-parisc/ide.h>
hpt366: fix compile warning
ide-floppy: remove idefloppy_floppy_t typedef
ide: remove broken hpt34x driver
delkin_cb: add PM support
ide: re-add TRM290 fix lost during ide_build_dmatable() cleanup
Borislav Petkov (3):
ide-cd: debug log enhancements
ide-cd: small drive type print fix
ide-cd: remove stale comment
Sergei Shtylyov (6):
ide: mask interrupt in ide_config_drive_speed()
hpt366: cleanup maskproc() method
sgiioc4: remove maskproc() method
sgiioc4: kill useless address checks
sgiioc4: kill duplicate ioremap()
scc_pata: kill unused variables
arch/arm/mach-sa1100/include/mach/ide.h deleted +0 -75
@@ -1,75 +0,0 @@ -/* -* arch/arm/mach-sa1100/include/mach/ide.h -* -* Copyright (c) 1998 Hugo Fiennes & Nicolas Pitre -* -* 18-aug-2000: Cleanup by Erik Mouw ([email protected]) -* Get rid of the special ide_init_hwif_ports() functions -* and make a generalised function that can be used by all -* architectures. -*/ - -#include <asm/irq.h> -#include <mach/hardware.h> -#include <asm/mach-types.h> - -#error "This code is broken and needs update to match with current ide support" - - -/* -* Set up a hw structure for a specified data port, control port and IRQ. -* This should follow whatever the default interface uses. -*/ -static inline void ide_init_hwif_ports (hw_regs_t *hw,unsigned long data_port, -unsigned long ctrl_port,int *irq) -{ -unsigned long reg = data_port; -int i; -int regincr =1 ; - -/* The Empeg board has the first two address lines unused */ -if (machine_is_empeg ()) - regincr =1 <<2 ; - -/* The LART doesn't use A0 for IDE */ -if (machine_is_lart ()) - regincr =1 <<1 ; - -memset (hw,0 ,sizeof (*hw)); - -for (i =0 ; i <=7 ; i++) { - hw->io_ports_array[i] = reg; - reg += regincr; - } - - hw->io_ports.ctl_addr = ctrl_port; - -if (irq) - *irq =0 ; -} - -/* -* This registers the standard ports for this architecture with the IDE -* driver. -*/ -static __inline__void -ide_init_default_hwifs (void ) -{ -if (machine_is_lart ()) { -#ifdef CONFIG_SA1100_LART -hw_regs_t hw; - -/* Enable GPIO as interrupt line */ -GPDR &= ~LART_GPIO_IDE ; -set_irq_type (LART_IRQ_IDE ,IRQ_TYPE_EDGE_RISING ); - -/* set PCMCIA interface timing */ -MECR =0x00060006 ; - -/* init the interface */ -ide_init_hwif_ports (&hw,PCMCIA_IO_0_BASE +0x0000 ,PCMCIA_IO_0_BASE +0x1000 ,NULL ); - hw.irq =LART_IRQ_IDE ; -ide_register_hw (&hw); -#endif - } -}
drivers/ide/Kconfig +31 -57
116 lines not on this page · raw message
drivers/ide/Makefile +13 -6
@@ -37,18 +37,25 @@ obj-$(CONFIG_IDE_H8300) += h8300/ obj-$(CONFIG_IDE_GENERIC) += ide-generic.o obj-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o -ide-disk_mod-y += ide-disk.o ide-disk_ioctl.o +ide-gd_mod-y += ide-gd.o ide-cd_mod-y += ide-cd.o ide-cd_ioctl.o ide-cd_verbose.o -ide-floppy_mod-y += ide-floppy.o ide-floppy_ioctl.o +ifeq ($(CONFIG_IDE_GD_ATA), y) + ide-gd_mod-y += ide-disk.o ide-disk_ioctl.o ifeq ($(CONFIG_IDE_PROC_FS), y) - ide-disk_mod-y += ide-disk_proc.o - ide-floppy_mod-y += ide-floppy_proc.o + ide-gd_mod-y += ide-disk_proc.o +endif +endif + +ifeq ($(CONFIG_IDE_GD_ATAPI), y) + ide-gd_mod-y += ide-floppy.o ide-floppy_ioctl.o +ifeq ($(CONFIG_IDE_PROC_FS), y) + ide-gd_mod-y += ide-floppy_proc.o +endif endif -obj-$(CONFIG_BLK_DEV_IDEDISK) += ide-disk_mod.o +obj-$(CONFIG_IDE_GD) += ide-gd_mod.o obj-$(CONFIG_BLK_DEV_IDECD) += ide-cd_mod.o -obj-$(CONFIG_BLK_DEV_IDEFLOPPY) += ide-floppy_mod.o obj-$(CONFIG_BLK_DEV_IDETAPE) += ide-tape.o ifeq ($(CONFIG_BLK_DEV_IDECS), y)
drivers/ide/ide-atapi.c +1 -1
@@ -191,7 +191,7 @@ int ide_set_media_lock(ide_drive_t *drive, struct gendisk *disk, int on) {struct ide_atapi_pc pc; -if (drive->atapi_flags &IDE_AFLAG_NO_DOORLOCK ) +if ((drive->dev_flags &IDE_DFLAG_DOORLOCKING ) ==0 )return 0 ;ide_init_pc (&pc);
drivers/ide/ide-cd.c +38 -23
153 lines not on this page · raw message
drivers/ide/ide-cd_ioctl.c +4 -4
@@ -86,8 +86,8 @@ int ide_cdrom_check_media_change_real(struct cdrom_device_info *cdi,if (slot_nr ==CDSL_CURRENT ) { (void )cdrom_check_status (drive,NULL ); - retval = (drive->atapi_flags &IDE_AFLAG_MEDIA_CHANGED ) ?1 :0 ; - drive->atapi_flags &= ~IDE_AFLAG_MEDIA_CHANGED ; + retval = (drive->dev_flags &IDE_DFLAG_MEDIA_CHANGED ) ?1 :0 ; + drive->dev_flags &= ~IDE_DFLAG_MEDIA_CHANGED ;return retval; }else {return -EINVAL ;
@@ -136,7 +136,7 @@ int ide_cd_lockdoor(ide_drive_t *drive, int lockflag, sense = &my_sense;/* If the drive cannot lock the door, just pretend. */ -if (drive->atapi_flags &IDE_AFLAG_NO_DOORLOCK ) { +if ((drive->dev_flags &IDE_DFLAG_DOORLOCKING ) ==0 ) { stat =0 ; }else {unsigned char cmd[BLK_MAX_CDB ];
@@ -157,7 +157,7 @@ int ide_cd_lockdoor(ide_drive_t *drive, int lockflag, (sense->asc == 0x24 || sense->asc == 0x20)) {printk (KERN_ERR "%s: door locking not supported\n" , drive->name); - drive->atapi_flags |=IDE_AFLAG_NO_DOORLOCK ; + drive->dev_flags &= ~IDE_DFLAG_DOORLOCKING ; stat =0 ; }
drivers/ide/ide-disk.c +62 -320
458 lines not on this page · raw message
drivers/ide/ide-disk.h +9 -12
@@ -1,19 +1,11 @@#ifndef __IDE_DISK_H#define __IDE_DISK_H -struct ide_disk_obj { -ide_drive_t *drive; -ide_driver_t *driver; -struct gendisk *disk; -struct kref kref; -unsigned int openers;/* protected by BKL for now */ -}; - -#define ide_disk_g (disk) \ - container_of((disk)->private_data, struct ide_disk_obj, driver) +#include "ide-gd.h" +#ifdef CONFIG_IDE_GD_ATA /* ide-disk.c */ -sector_t ide_disk_capacity (ide_drive_t *); +extern const struct ide_disk_ops ide_ata_disk_ops;ide_decl_devset (address);ide_decl_devset (multcount);ide_decl_devset (nowerr);
@@ -21,12 +13,17 @@ ide_decl_devset(wcache);ide_decl_devset (acoustic);/* ide-disk_ioctl.c */ -int ide_disk_ioctl (struct inode *,struct file *,unsigned int ,unsigned long ); +int ide_disk_ioctl (ide_drive_t *,struct inode *,struct file *,unsigned int , +unsigned long );#ifdef CONFIG_IDE_PROC_FS /* ide-disk_proc.c */ extern ide_proc_entry_t ide_disk_proc[];extern const struct ide_proc_devset ide_disk_settings[];#endif +#else +#define ide_disk_proc NULL +#define ide_disk_settings NULL +#endif #endif /* __IDE_DISK_H */
drivers/ide/ide-disk_ioctl.c +1 -3
@@ -13,12 +13,10 @@ static const struct ide_ioctl_devset ide_disk_ioctl_settings[] = { { 0 } }; -int ide_disk_ioctl (struct inode *inode,struct file *file, +int ide_disk_ioctl (ide_drive_t *drive,struct inode *inode,struct file *file,unsigned int cmd,unsigned long arg) {struct block_device *bdev = inode->i_bdev; -struct ide_disk_obj *idkp =ide_disk_g (bdev->bd_disk); -ide_drive_t *drive = idkp->drive;int err; err =ide_setting_ioctl (drive, bdev, cmd, arg, ide_disk_ioctl_settings);
drivers/ide/ide-disk_proc.c +1 -1
@@ -56,7 +56,7 @@ static int proc_idedisk_read_capacityide_drive_t *drive = (ide_drive_t *)data;int len; - len =sprintf (page,"%llu\n" , (long long )ide_disk_capacity (drive)); + len =sprintf (page,"%llu\n" , (long long )ide_gd_capacity (drive));PROC_IDE_READ_RETURN (page, start, off, count, eof, len); }
drivers/ide/ide-dma-sff.c +1 -1
@@ -130,7 +130,7 @@ int ide_build_dmatable(ide_drive_t *drive, struct request *rq) xcount = bcount &0xffff ;if (is_trm290) xcount = ((xcount >>2 ) -1 ) <<16 ; -if (xcount ==0x0000 ) { +else if (xcount ==0x0000 ) {if (count++ >=PRD_ENTRIES ) goto use_pio_instead; *table++ =cpu_to_le32 (0x8000 );
drivers/ide/ide-floppy.c +46 -311
519 lines not on this page · raw message
drivers/ide/ide-floppy.h +9 -32
63 lines not on this page · raw message
drivers/ide/ide-floppy_ioctl.c +10 -13
@@ -33,7 +33,7 @@static int ide_floppy_get_format_capacities (ide_drive_t *drive,int __user *arg) { -struct ide_floppy_obj *floppy = drive->driver_data; +struct ide_disk_obj *floppy = drive->driver_data;struct ide_atapi_pc pc;u8 header_len, desc_cnt;int i, blocks, length, u_array_size, u_index;
@@ -113,7 +113,7 @@ static void ide_floppy_create_format_unit_cmd(struct ide_atapi_pc *pc, int b,static int ide_floppy_get_sfrp_bit (ide_drive_t *drive) { -idefloppy_floppy_t *floppy = drive->driver_data; +struct ide_disk_obj *floppy = drive->driver_data;struct ide_atapi_pc pc; drive->atapi_flags &= ~IDE_AFLAG_SRFP ;
@@ -132,17 +132,17 @@ static int ide_floppy_get_sfrp_bit(ide_drive_t *drive)static int ide_floppy_format_unit (ide_drive_t *drive,int __user *arg) { -idefloppy_floppy_t *floppy = drive->driver_data; +struct ide_disk_obj *floppy = drive->driver_data;struct ide_atapi_pc pc;int blocks, length, flags, err =0 ;if (floppy->openers >1 ) {/* Don't format if someone is using the disk */ - drive->atapi_flags &= ~IDE_AFLAG_FORMAT_IN_PROGRESS ; + drive->dev_flags &= ~IDE_DFLAG_FORMAT_IN_PROGRESS ;return -EBUSY ; } - drive->atapi_flags |=IDE_AFLAG_FORMAT_IN_PROGRESS ; + drive->dev_flags |=IDE_DFLAG_FORMAT_IN_PROGRESS ;/* * Send ATAPI_FORMAT_UNIT to the drive.
@@ -174,7 +174,7 @@ static int ide_floppy_format_unit(ide_drive_t *drive, int __user *arg) out:if (err) - drive->atapi_flags &= ~IDE_AFLAG_FORMAT_IN_PROGRESS ; + drive->dev_flags &= ~IDE_DFLAG_FORMAT_IN_PROGRESS ;return err; }
@@ -190,7 +190,7 @@ out:static int ide_floppy_get_format_progress (ide_drive_t *drive,int __user *arg) { -idefloppy_floppy_t *floppy = drive->driver_data; +struct ide_disk_obj *floppy = drive->driver_data;struct ide_atapi_pc pc;int progress_indication =0x10000 ;
@@ -226,7 +226,7 @@ static int ide_floppy_get_format_progress(ide_drive_t *drive, int __user *arg)static int ide_floppy_lockdoor (ide_drive_t *drive,struct ide_atapi_pc *pc,unsigned long arg,unsigned int cmd) { -idefloppy_floppy_t *floppy = drive->driver_data; +struct ide_disk_obj *floppy = drive->driver_data;struct gendisk *disk = floppy->disk;int prevent = (arg && cmd !=CDROMEJECT ) ?1 :0 ;
@@ -260,13 +260,10 @@ static int ide_floppy_format_ioctl(ide_drive_t *drive, struct file *file, } } -int ide_floppy_ioctl (struct inode *inode,struct file *file, -unsigned int cmd,unsigned long arg) +int ide_floppy_ioctl (ide_drive_t *drive,struct inode *inode, +struct file *file,unsigned int cmd,unsigned long arg) {struct block_device *bdev = inode->i_bdev; -struct ide_floppy_obj *floppy =ide_drv_g (bdev->bd_disk, - ide_floppy_obj); -ide_drive_t *drive = floppy->drive;struct ide_atapi_pc pc;void __user *argp = (void __user *)arg;int err;
drivers/ide/ide-floppy_proc.c +1 -1
@@ -9,7 +9,7 @@ static int proc_idefloppy_read_capacity(char *page, char **start, off_t off,ide_drive_t *drive = (ide_drive_t *)data;int len; - len =sprintf (page,"%llu\n" , (long long )ide_floppy_capacity (drive)); + len =sprintf (page,"%llu\n" , (long long )ide_gd_capacity (drive));PROC_IDE_READ_RETURN (page, start, off, count, eof, len); }
drivers/ide/ide-gd.c new file +398 -0
398 lines not on this page · raw message
drivers/ide/ide-gd.h new file +44 -0
44 lines not on this page · raw message
drivers/ide/ide-iops.c +1 -1
@@ -755,7 +755,7 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed)udelay (1 );SELECT_DRIVE (drive); -SELECT_MASK (drive,0 ); +SELECT_MASK (drive,1 );udelay (1 ); tp_ops->set_irq (hwif,0 );
drivers/ide/ide-probe.c +1 -0
@@ -208,6 +208,7 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd) drive->ready_stat =0 ;if (ata_id_cdb_intr (id)) drive->atapi_flags |=IDE_AFLAG_DRQ_INTERRUPT ; + drive->dev_flags |=IDE_DFLAG_DOORLOCKING ;/* we don't do head unloading on ATAPI devices */ drive->dev_flags |=IDE_DFLAG_NO_UNLOAD ;return ;
drivers/ide/ide-proc.c +3 -3
@@ -567,10 +567,10 @@ static void ide_remove_proc_entries(struct proc_dir_entry *dir, ide_proc_entry_tvoid ide_proc_register_driver (ide_drive_t *drive,ide_driver_t *driver) {mutex_lock (&ide_setting_mtx); - drive->settings = driver->settings; + drive->settings = driver->proc_devsets (drive);mutex_unlock (&ide_setting_mtx); -ide_add_proc_entries (drive->proc, driver->proc, drive); +ide_add_proc_entries (drive->proc, driver->proc_entries (drive), drive); }EXPORT_SYMBOL (ide_proc_register_driver);
@@ -591,7 +591,7 @@ void ide_proc_unregister_driver(ide_drive_t *drive, ide_driver_t *driver) {unsigned long flags; -ide_remove_proc_entries (drive->proc, driver->proc); +ide_remove_proc_entries (drive->proc, driver->proc_entries (drive));mutex_lock (&ide_setting_mtx);spin_lock_irqsave (&ide_lock, flags);
drivers/ide/ide-tape.c +13 -3
@@ -2108,7 +2108,7 @@ static void idetape_get_mode_sense_results(ide_drive_t *drive)/* device lacks locking support according to capabilities page */ if ((caps[6 ] &1 ) ==0 ) - drive->atapi_flags |=IDE_AFLAG_NO_DOORLOCK ; + drive->dev_flags &= ~IDE_DFLAG_DOORLOCKING ;if (caps[7 ] &0x02 ) tape->blk_size =512 ;
@@ -2298,6 +2298,16 @@ static ide_proc_entry_t idetape_proc[] = { { "name", S_IFREG|S_IRUGO, proc_idetape_read_name, NULL }, { NULL, 0, NULL, NULL } }; + +static ide_proc_entry_t *ide_tape_proc_entries(ide_drive_t *drive) +{ + return idetape_proc; +} + +static const struct ide_proc_devset *ide_tape_proc_devsets(ide_drive_t *drive) +{ + return idetape_settings; +} #endif static int ide_tape_probe(ide_drive_t *);
@@ -2315,8 +2325,8 @@ static ide_driver_t idetape_driver = { .end_request = idetape_end_request, .error = __ide_error, #ifdef CONFIG_IDE_PROC_FS - .proc = idetape_proc, - .settings = idetape_settings, + .proc_entries = ide_tape_proc_entries, + .proc_devsets = ide_tape_proc_devsets,#endif };
drivers/ide/pci/Makefile +0 -1
@@ -11,7 +11,6 @@ obj-$(CONFIG_BLK_DEV_CS5535) += cs5535.o obj-$(CONFIG_BLK_DEV_SC1200) += sc1200.o obj-$(CONFIG_BLK_DEV_CY82C693) += cy82c693.o obj-$(CONFIG_BLK_DEV_DELKIN) += delkin_cb.o -obj-$(CONFIG_BLK_DEV_HPT34X) += hpt34x.o obj-$(CONFIG_BLK_DEV_HPT366) += hpt366.o obj-$(CONFIG_BLK_DEV_IT8213) += it8213.o obj-$(CONFIG_BLK_DEV_IT821X) += it821x.o
drivers/ide/pci/delkin_cb.c +56 -7
97 lines not on this page · raw message
drivers/ide/pci/hpt34x.c deleted +0 -193
193 lines not on this page · raw message
drivers/ide/pci/hpt366.c +16 -19
@@ -3,7 +3,7 @@* Portions Copyright (C) 2001 Sun Microsystems, Inc. * Portions Copyright (C) 2003 Red Hat Inc * Portions Copyright (C) 2007 Bartlomiej Zolnierkiewicz -* Portions Copyright (C) 2005-2007 MontaVista Software, Inc. +* Portions Copyright (C) 2005-2008 MontaVista Software, Inc. * * Thanks to HighPoint Technologies for their assistance, and hardware. * Special Thanks to Jon Burchmore in SanDiego for the deep pockets, his
@@ -748,26 +748,24 @@ static void hpt3xx_maskproc(ide_drive_t *drive, int mask)struct pci_dev *dev =to_pci_dev (hwif->dev);struct hpt_info *info =hpt3xx_get_info (hwif->dev); -if (drive->quirk_list) { -if (info->chip_type >=HPT370 ) { -u8 scr1 =0 ; - -pci_read_config_byte (dev,0x5a , &scr1); -if (((scr1 &0x10 ) >>4 ) != mask) { -if (mask) - scr1 |=0x10 ; -else - scr1 &= ~0x10 ; -pci_write_config_byte (dev,0x5a , scr1); - } - }else { +if (drive->quirk_list ==0 ) +return ; + +if (info->chip_type >=HPT370 ) { +u8 scr1 =0 ; + +pci_read_config_byte (dev,0x5a , &scr1); +if (((scr1 &0x10 ) >>4 ) != mask) {if (mask) -disable_irq (hwif->irq); + scr1 |=0x10 ;else -enable_irq (hwif->irq); + scr1 &= ~0x10 ; +pci_write_config_byte (dev,0x5a , scr1); } - }else -outb (ATA_DEVCTL_OBS | (mask ?2 :0 ), hwif->io_ports.ctl_addr); + }else if (mask) +disable_irq (hwif->irq); +else +enable_irq (hwif->irq); }/*
@@ -1289,7 +1287,6 @@ static u8 hpt3xx_cable_detect(ide_hwif_t *hwif)static void __devinit init_hwif_hpt366 (ide_hwif_t *hwif) { -struct pci_dev *dev =to_pci_dev (hwif->dev);struct hpt_info *info =hpt3xx_get_info (hwif->dev);int serialize =HPT_SERIALIZE_IO ;u8 chip_type = info->chip_type;
drivers/ide/pci/scc_pata.c +0 -4
@@ -617,7 +617,6 @@ static int __devinit init_setup_scc(struct pci_dev *dev,unsigned long intmask_port;unsigned long mode_port;unsigned long ecmode_port; -unsigned long dma_status_port;u32 reg =0 ;struct scc_ports *ports;int rc;
@@ -637,7 +636,6 @@ static int __devinit init_setup_scc(struct pci_dev *dev, intmask_port = dma_base +0x010 ; mode_port = ctl_base +0x024 ; ecmode_port = ctl_base +0xf00 ; - dma_status_port = dma_base +0x004 ;/* controller initialization */ reg =0 ;
@@ -843,8 +841,6 @@ static u8 scc_cable_detect(ide_hwif_t *hwif)static void __devinit init_hwif_scc (ide_hwif_t *hwif) { -struct scc_ports *ports =ide_get_hwifdata (hwif); -/* PTERADD */ out_be32 ((void __iomem *)(hwif->dma_base +0x018 ), hwif->dmatable_dma);
drivers/ide/pci/sgiioc4.c +11 -38
89 lines not on this page · raw message
drivers/leds/Kconfig +1 -1
@@ -179,7 +179,7 @@ config LEDS_TRIGGER_TIMER config LEDS_TRIGGER_IDE_DISK bool "LED IDE Disk Trigger" - depends on LEDS_TRIGGERS && BLK_DEV_IDEDISK + depends on LEDS_TRIGGERS && IDE_GD_ATA help This allows LEDs to be controlled by IDE disk activity. If unsure, say Y.
drivers/scsi/ide-scsi.c +17 -9
@@ -343,6 +343,11 @@ static ide_startstop_t idescsi_do_request (ide_drive_t *drive, struct request *r }#ifdef CONFIG_IDE_PROC_FS +static ide_proc_entry_t idescsi_proc[] = { + {"capacity" ,S_IFREG |S_IRUGO , proc_ide_read_capacity,NULL }, + {NULL ,0 ,NULL ,NULL } +}; +#define ide_scsi_devset_get (name, field) \ static int get_##name(ide_drive_t *drive) \ { \
@@ -378,6 +383,16 @@ static const struct ide_proc_devset idescsi_settings[] = {IDE_PROC_DEVSET (transform,0 ,3 ), { 0 }, }; + +static ide_proc_entry_t *ide_scsi_proc_entries (ide_drive_t *drive) +{ +return idescsi_proc; +} + +static const struct ide_proc_devset *ide_scsi_proc_devsets (ide_drive_t *drive) +{ +return idescsi_settings; +}#endif /*
@@ -419,13 +434,6 @@ static void ide_scsi_remove(ide_drive_t *drive)static int ide_scsi_probe (ide_drive_t *); -#ifdef CONFIG_IDE_PROC_FS -static ide_proc_entry_t idescsi_proc[] = { - {"capacity" ,S_IFREG |S_IRUGO , proc_ide_read_capacity,NULL }, - {NULL ,0 ,NULL ,NULL } -}; -#endif -static ide_driver_t idescsi_driver = { .gen_driver = { .owner =THIS_MODULE ,
@@ -439,8 +447,8 @@ static ide_driver_t idescsi_driver = { .end_request = idescsi_end_request, .error = idescsi_atapi_error, #ifdef CONFIG_IDE_PROC_FS - .proc = idescsi_proc, - .settings = idescsi_settings, + .proc_entries = ide_scsi_proc_entries, + .proc_devsets = ide_scsi_proc_devsets,#endif };
include/asm-frv/ide.h +1 -9
@@ -18,15 +18,7 @@#include <asm/io.h> #include <asm/irq.h> -/****************************************************************************/ -/* -* some bits needed for parts of the IDE subsystem to compile -*/ -#define __ide_mm_insw (port, addr, n) insw((unsigned long) (port), addr, n) -#define __ide_mm_insl (port, addr, n) insl((unsigned long) (port), addr, n) -#define __ide_mm_outsw (port, addr, n) outsw((unsigned long) (port), addr, n) -#define __ide_mm_outsl (port, addr, n) outsl((unsigned long) (port), addr, n) - +#include <asm-generic/ide_iops.h> #endif /* __KERNEL__ */ #endif /* _ASM_IDE_H */
include/asm-m68k/ide.h +0 -9
@@ -92,15 +92,6 @@#define outsw_swapw (port, addr, n) raw_outsw_swapw((u16 *)port, addr, n)#endif - -/* Q40 and Atari have byteswapped IDE busses and since many interesting -* values in the identification string are text, chars and words they -* happened to be almost correct without swapping.. However *_capacity -* is needed for drives over 8 GB. RZ */ -#if defined(CONFIG_Q40 ) || defined(CONFIG_ATARI ) -#define M68K_IDE_SWAPW (MACH_IS_Q40 || MACH_IS_ATARI) -#endif -#ifdef CONFIG_BLK_DEV_FALCON_IDE #define IDE_ARCH_LOCK
include/asm-parisc/ide.h +0 -4
@@ -13,10 +13,6 @@#ifdef __KERNEL__ -#define ide_request_irq (irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id)) -#define ide_free_irq (irq,dev_id) free_irq((irq), (dev_id)) -#define ide_request_region (from,extent,name) request_region((from), (extent), (name)) -#define ide_release_region (from,extent) release_region((from), (extent))/* Generic I/O and MEMIO string operations. */ #define __ide_insw insw
include/linux/ide.h +26 -10
@@ -461,12 +461,26 @@ struct ide_acpi_drive_link;struct ide_acpi_hwif_link ;#endif +struct ide_drive_s ; + +struct ide_disk_ops { +int (*check)(struct ide_drive_s *,const char *); +int (*get_capacity)(struct ide_drive_s *); +void (*setup)(struct ide_drive_s *); +void (*flush)(struct ide_drive_s *); +int (*init_media)(struct ide_drive_s *,struct gendisk *); +int (*set_doorlock)(struct ide_drive_s *,struct gendisk *, +int ); +ide_startstop_t (*do_request)(struct ide_drive_s *,struct request *, +sector_t ); +int (*end_request)(struct ide_drive_s *,int ,int ); +int (*ioctl)(struct ide_drive_s *,struct inode *, +struct file *,unsigned int ,unsigned long ); +}; +/* ATAPI device flags */ enum {IDE_AFLAG_DRQ_INTERRUPT = (1 <<0 ), -IDE_AFLAG_MEDIA_CHANGED = (1 <<1 ), -/* Drive cannot lock the door. */ -IDE_AFLAG_NO_DOORLOCK = (1 <<2 ),/* ide-cd */ /* Drive cannot eject the disc. */
@@ -498,14 +512,10 @@ enum {IDE_AFLAG_LE_SPEED_FIELDS = (1 <<17 ),/* ide-floppy */ -/* Format in progress */ -IDE_AFLAG_FORMAT_IN_PROGRESS = (1 <<18 ),/* Avoid commands not supported in Clik drive */ IDE_AFLAG_CLIK_DRIVE = (1 <<19 ),/* Requires BH algorithm for packets */ IDE_AFLAG_ZIP_DRIVE = (1 <<20 ), -/* Write protect */ -IDE_AFLAG_WP = (1 <<21 ),/* Supports format progress report */ IDE_AFLAG_SRFP = (1 << 22),
@@ -578,7 +588,11 @@ enum {/* don't unload heads */ IDE_DFLAG_NO_UNLOAD = (1 <<27 ),/* heads unloaded, please don't reset port */ -IDE_DFLAG_PARKED = (1 <<28 ) +IDE_DFLAG_PARKED = (1 <<28 ), +IDE_DFLAG_MEDIA_CHANGED = (1 <<29 ), +/* write protect */ +IDE_DFLAG_WP = (1 <<30 ), + IDE_DFLAG_FORMAT_IN_PROGRESS = (1 << 31), }; struct ide_drive_s {
@@ -597,6 +611,8 @@ struct ide_drive_s {#endif struct hwif_s *hwif;/* actually (ide_hwif_t *) */ +const struct ide_disk_ops *disk_ops; +unsigned long dev_flags;unsigned long sleep;/* sleep until this time */
@@ -1123,8 +1139,8 @@ struct ide_driver_s {void (*resume)(ide_drive_t *);void (*shutdown)(ide_drive_t *);#ifdef CONFIG_IDE_PROC_FS -ide_proc_entry_t *proc; -const struct ide_proc_devset *settings; +ide_proc_entry_t * (*proc_entries)(ide_drive_t *); +const struct ide_proc_devset * (*proc_devsets)(ide_drive_t *);#endif };