aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-proc.c')
-rw-r--r--drivers/ide/ide-proc.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
index a4007d30da52..aa663e7f46f2 100644
--- a/drivers/ide/ide-proc.c
+++ b/drivers/ide/ide-proc.c
@@ -346,14 +346,20 @@ static int ide_write_setting(ide_drive_t *drive, ide_settings_t *setting, int va
346 346
347static int set_xfer_rate (ide_drive_t *drive, int arg) 347static int set_xfer_rate (ide_drive_t *drive, int arg)
348{ 348{
349 ide_task_t task;
349 int err; 350 int err;
350 351
351 if (arg < 0 || arg > 70) 352 if (arg < 0 || arg > 70)
352 return -EINVAL; 353 return -EINVAL;
353 354
354 err = ide_wait_cmd(drive, 355 memset(&task, 0, sizeof(task));
355 WIN_SETFEATURES, (u8) arg, 356 task.tf.command = WIN_SETFEATURES;
356 SETFEATURES_XFER, 0, NULL); 357 task.tf.feature = SETFEATURES_XFER;
358 task.tf.nsect = (u8)arg;
359 task.tf_flags = IDE_TFLAG_OUT_FEATURE | IDE_TFLAG_OUT_NSECT |
360 IDE_TFLAG_IN_NSECT;
361
362 err = ide_no_data_taskfile(drive, &task);
357 363
358 if (!err && arg) { 364 if (!err && arg) {
359 ide_set_xfer_rate(drive, (u8) arg); 365 ide_set_xfer_rate(drive, (u8) arg);