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.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
index 3242698832a4..021de41655e6 100644
--- a/drivers/ide/ide-proc.c
+++ b/drivers/ide/ide-proc.c
@@ -195,7 +195,6 @@ ide_devset_get(xfer_rate, current_speed);
195static int set_xfer_rate (ide_drive_t *drive, int arg) 195static int set_xfer_rate (ide_drive_t *drive, int arg)
196{ 196{
197 struct ide_cmd cmd; 197 struct ide_cmd cmd;
198 int err;
199 198
200 if (arg < XFER_PIO_0 || arg > XFER_UDMA_6) 199 if (arg < XFER_PIO_0 || arg > XFER_UDMA_6)
201 return -EINVAL; 200 return -EINVAL;
@@ -206,14 +205,9 @@ static int set_xfer_rate (ide_drive_t *drive, int arg)
206 cmd.tf.nsect = (u8)arg; 205 cmd.tf.nsect = (u8)arg;
207 cmd.valid.out.tf = IDE_VALID_FEATURE | IDE_VALID_NSECT; 206 cmd.valid.out.tf = IDE_VALID_FEATURE | IDE_VALID_NSECT;
208 cmd.valid.in.tf = IDE_VALID_NSECT; 207 cmd.valid.in.tf = IDE_VALID_NSECT;
208 cmd.tf_flags = IDE_TFLAG_SET_XFER;
209 209
210 err = ide_no_data_taskfile(drive, &cmd); 210 return ide_no_data_taskfile(drive, &cmd);
211
212 if (!err) {
213 ide_set_xfer_rate(drive, (u8) arg);
214 ide_driveid_update(drive);
215 }
216 return err;
217} 211}
218 212
219ide_devset_rw(current_speed, xfer_rate); 213ide_devset_rw(current_speed, xfer_rate);