From 7722d1df688c926423e3323b0a865ac665d7e4fb Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Fri, 27 Aug 2004 21:19:40 -0700 Subject: [PATCH] [PATCH] ide: remove /proc/ide/hd?/settings:ide-scsi & HDIO_SET_IDE_SCSI ioctl As noticed by Alan Cox: "It doesn't work now so it clearly isnt being used 8). We hold the lock because its a proc function and we then replace the proc functions in the attach method -> deadlock. It is also incredibly hard to fix without a major rewrite." The same is true for HDIO_SET_IDE_SCSI ioctl. Both were broken 18 months ago in 2.5.63 as a side-effect of locking fixes. Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Linus Torvalds --- drivers/ide/ide.c | 19 ------------------- include/linux/hdreg.h | 5 ++--- include/linux/ide.h | 2 +- 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index e007a0816cf47..39388ed9b4d0c 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -1348,23 +1348,6 @@ static int set_xfer_rate (ide_drive_t *drive, int arg) return err; } -int ide_atapi_to_scsi (ide_drive_t *drive, int arg) -{ - if (drive->media == ide_disk) { - drive->scsi = 0; - return 0; - } - - if (DRIVER(drive)->cleanup(drive)) { - drive->scsi = 0; - return 0; - } - - drive->scsi = (u8) arg; - ata_attach(drive); - return 0; -} - void ide_add_generic_settings (ide_drive_t *drive) { /* @@ -1379,8 +1362,6 @@ void ide_add_generic_settings (ide_drive_t *drive) ide_add_setting(drive, "init_speed", SETTING_RW, -1, -1, TYPE_BYTE, 0, 70, 1, 1, &drive->init_speed, NULL); ide_add_setting(drive, "current_speed", SETTING_RW, -1, -1, TYPE_BYTE, 0, 70, 1, 1, &drive->current_speed, set_xfer_rate); ide_add_setting(drive, "number", SETTING_RW, -1, -1, TYPE_BYTE, 0, 3, 1, 1, &drive->dn, NULL); - if (drive->media != ide_disk) - ide_add_setting(drive, "ide-scsi", SETTING_RW, -1, HDIO_SET_IDE_SCSI, TYPE_BYTE, 0, 1, 1, 1, &drive->scsi, ide_atapi_to_scsi); } int system_bus_clock (void) diff --git a/include/linux/hdreg.h b/include/linux/hdreg.h index 3d53bea7da871..54ad63b1d02c3 100644 --- a/include/linux/hdreg.h +++ b/include/linux/hdreg.h @@ -449,9 +449,8 @@ enum { /* hd/ide ctl's that pass (arg) ptrs to user space are numbered 0x033n/0x033n */ /* 0x330 is reserved - used to be HDIO_GETGEO_BIG */ /* 0x331 is reserved - used to be HDIO_GETGEO_BIG_RAW */ - -#define HDIO_SET_IDE_SCSI 0x0338 -#define HDIO_SET_SCSI_IDE 0x0339 +/* 0x338 is reserved - used to be HDIO_SET_IDE_SCSI */ +/* 0x339 is reserved - used to be HDIO_SET_SCSI_IDE */ #define __NEW_HD_DRIVE_ID diff --git a/include/linux/ide.h b/include/linux/ide.h index 40ddd0d79e8fc..9367900121642 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -756,8 +756,8 @@ typedef struct ide_drive_s { * 2=48-bit doing 28-bit * 3=64-bit */ + unsigned scsi : 1; /* 0=default, 1=ide-scsi emulation */ - u8 scsi; /* 0=default, 1=skip current ide-subdriver for ide-scsi emulation */ u8 quirk_list; /* considered quirky, set for a specific host */ u8 suspend_reset; /* drive suspend mode flag, soft-reset recovers */ u8 init_speed; /* transfer rate set at boot */ -- 2.53.0