[PATCH] IDE update for 2.6.3 (7/9)

From: Bartlomiej Zolnierkiewicz
Date: Thu Feb 19 2004 - 10:17:12 EST



[IDE] remove dead/unfinished taskfile version of ide_cmd_ioctl()

linux-2.6.3-root/drivers/ide/ide-taskfile.c | 65 ----------------------------
1 files changed, 65 deletions(-)

diff -puN drivers/ide/ide-taskfile.c~ide_cmd_ioctl drivers/ide/ide-taskfile.c
--- linux-2.6.3/drivers/ide/ide-taskfile.c~ide_cmd_ioctl 2004-02-19 02:11:21.212111024 +0100
+++ linux-2.6.3-root/drivers/ide/ide-taskfile.c 2004-02-19 02:11:21.218110112 +0100
@@ -1669,7 +1669,6 @@ EXPORT_SYMBOL(ide_wait_cmd);
*/
int ide_cmd_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
{
-#if 1
int err = 0;
u8 args[4], *argbuf = args;
u8 xfer_rate = 0;
@@ -1720,70 +1719,6 @@ abort:
if (argsize > 4)
kfree(argbuf);
return err;
-
-#else
-
- int err = -EIO;
- u8 args[4], *argbuf = args;
- u8 xfer_rate = 0;
- int argsize = 0;
- ide_task_t tfargs;
-
- if (NULL == (void *) arg) {
- struct request rq;
- ide_init_drive_cmd(&rq);
- return ide_do_drive_cmd(drive, &rq, ide_wait);
- }
-
- if (copy_from_user(args, (void *)arg, 4))
- return -EFAULT;
-
- memset(&tfargs, 0, sizeof(ide_task_t));
- tfargs.tfRegister[IDE_FEATURE_OFFSET] = args[2];
- tfargs.tfRegister[IDE_NSECTOR_OFFSET] = args[3];
- tfargs.tfRegister[IDE_SECTOR_OFFSET] = args[1];
- tfargs.tfRegister[IDE_LCYL_OFFSET] = 0x00;
- tfargs.tfRegister[IDE_HCYL_OFFSET] = 0x00;
- tfargs.tfRegister[IDE_SELECT_OFFSET] = 0x00;
- tfargs.tfRegister[IDE_COMMAND_OFFSET] = args[0];
-
- if (args[3]) {
- argsize = (SECTOR_WORDS * 4 * args[3]);
- argbuf = kmalloc(argsize, GFP_KERNEL);
- if (argbuf == NULL)
- return -ENOMEM;
- }
-
- if (set_transfer(drive, &tfargs)) {
- xfer_rate = args[1];
- if (ide_ata66_check(drive, &tfargs))
- goto abort;
- }
-
- tfargs.command_type = ide_cmd_type_parser(&tfargs);
- err = ide_raw_taskfile(drive, &tfargs, argbuf);
-
- if (!err && xfer_rate) {
- /* active-retuning-calls future */
- ide_set_xfer_rate(driver, xfer_rate);
- ide_driveid_update(drive);
- }
-abort:
- args[0] = tfargs.tfRegister[IDE_COMMAND_OFFSET];
- args[1] = tfargs.tfRegister[IDE_FEATURE_OFFSET];
- args[2] = tfargs.tfRegister[IDE_NSECTOR_OFFSET];
- args[3] = 0;
-
- if (copy_to_user((void *)arg, argbuf, 4))
- err = -EFAULT;
- if (argbuf != NULL) {
- if (copy_to_user((void *)arg, argbuf + 4, argsize))
- err = -EFAULT;
- kfree(argbuf);
- }
- return err;
-
-#endif
}

EXPORT_SYMBOL(ide_cmd_ioctl);

_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/