ide: remove dead/obsolete ->busproc method
PATCH 1/1 ide: remove dead/obsolete ->busproc method
->busproc method is used by HDIO_SET_BUSSTATE ioctl but it has no chance of working as intended (in 2.4.x days) because to issue an ioctl there is a device node needed and:
- for BUSSTATE_TRISTATE+OFF it is too late (devices are already gone)
- for BUSSTATE_TRISTATE+ON it is too early (devices are not registered yet)
Just remove ->busproc method for now (it was only implemented by hpt366, siimage and tc86c001 host drivers).
Cc Sergei Shtylyov <[email protected]>
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>
---
This patch goes before "ide: add warm-plug support for IDE devices" in the IDE quilt tree.
drivers/ide/ide.c | 3 -- drivers/ide/pci/hpt366.c | 59 --------------------------------------------- drivers/ide/pci/sgiioc4.c | 1 drivers/ide/pci/siimage.c | 43 -------------------------------- drivers/ide/pci/tc86c001.c | 36 --------------------------- include/linux/ide.h | 2 - 6 files changed, 144 deletions(-)
drivers/ide/ide.c +0 -3
@@ -418,7 +418,6 @@ static void ide_hwif_restore(ide_hwif_t hwif->resetproc = tmp_hwif->resetproc; hwif->maskproc = tmp_hwif->maskproc; hwif->quirkproc = tmp_hwif->quirkproc; - hwif->busproc = tmp_hwif->busproc; hwif->ata_input_data = tmp_hwif->ata_input_data; hwif->ata_output_data = tmp_hwif->ata_output_data;
@@ -1083,8 +1082,6 @@ int generic_ide_ioctl(ide_drive_t *drivecase HDIO_SET_BUSSTATE :if (!capable (CAP_SYS_ADMIN ))return -EACCES ; -if (HWIF (drive)->busproc) -return HWIF (drive)->busproc (drive, (int )arg);return -EOPNOTSUPP ;default :return -EINVAL ;
drivers/ide/pci/hpt366.c +0 -59
71 lines not on this page · raw message
drivers/ide/pci/sgiioc4.c +0 -1
@@ -562,7 +562,6 @@ ide_init_sgiioc4(ide_hwif_t * hwif)clear interrupts */ hwif->maskproc = &sgiioc4_maskproc;/* Mask on/off NIEN register */ hwif->quirkproc =NULL ; - hwif->busproc =NULL ; hwif->INB = &sgiioc4_INB;
drivers/ide/pci/siimage.c +0 -43
55 lines not on this page · raw message
drivers/ide/pci/tc86c001.c +0 -36
@@ -126,40 +126,6 @@ static void tc86c001_dma_start(ide_driveide_dma_start (drive); } -static int tc86c001_busproc (ide_drive_t *drive,int state) -{ -ide_hwif_t *hwif =HWIF (drive); -unsigned long sc_base = hwif->config_data; -u16 scr1; - -/* System Control 1 Register bit 11 (ATA Hard Reset) read */ - scr1 =inw (sc_base +0x00 ); - -switch (state) { -case BUSSTATE_ON : -if (!(scr1 &0x0800 )) -return 0 ; - scr1 &= ~0x0800 ; - - hwif->drives[0 ].failures = hwif->drives[1 ].failures =0 ; -break ; -case BUSSTATE_OFF : -if (scr1 &0x0800 ) -return 0 ; - scr1 |=0x0800 ; - - hwif->drives[0 ].failures = hwif->drives[0 ].max_failures +1 ; - hwif->drives[1 ].failures = hwif->drives[1 ].max_failures +1 ; -break ; -default : -return -EINVAL ; - } - -/* System Control 1 Register bit 11 (ATA Hard Reset) write */ -outw (scr1, sc_base +0x00 ); -return 0 ; -} -static u8 __devinit tc86c001_cable_detect (ide_hwif_t *hwif) {struct pci_dev *dev =to_pci_dev (hwif->dev);
@@ -194,8 +160,6 @@ static void __devinit init_hwif_tc86c001 hwif->set_pio_mode = &tc86c001_set_pio_mode; hwif->set_dma_mode = &tc86c001_set_mode; - hwif->busproc = &tc86c001_busproc; - hwif->cable_detect = tc86c001_cable_detect;if (!hwif->dma_base)
include/linux/ide.h +0 -2
@@ -502,8 +502,6 @@ typedef struct hwif_s {void (*maskproc)(ide_drive_t *,int );/* check host's drive quirk list */ void (*quirkproc)(ide_drive_t *); -/* driver soft-power interface */ -int (*busproc)(ide_drive_t *,int );#endif u8 (*mdma_filter)(ide_drive_t *);u8 (*udma_filter)(ide_drive_t *);