diff options
Diffstat (limited to 'drivers/ide/ide-ioctls.c')
-rw-r--r-- | drivers/ide/ide-ioctls.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/ide/ide-ioctls.c b/drivers/ide/ide-ioctls.c index c1c25ebbaa1f..82f252c3ee6e 100644 --- a/drivers/ide/ide-ioctls.c +++ b/drivers/ide/ide-ioctls.c | |||
@@ -118,7 +118,6 @@ static int ide_cmd_ioctl(ide_drive_t *drive, unsigned long arg) | |||
118 | u8 args[4], xfer_rate = 0; | 118 | u8 args[4], xfer_rate = 0; |
119 | struct ide_cmd cmd; | 119 | struct ide_cmd cmd; |
120 | struct ide_taskfile *tf = &cmd.tf; | 120 | struct ide_taskfile *tf = &cmd.tf; |
121 | u16 *id = drive->id; | ||
122 | 121 | ||
123 | if (NULL == (void *) arg) { | 122 | if (NULL == (void *) arg) { |
124 | struct request *rq; | 123 | struct request *rq; |
@@ -161,14 +160,10 @@ static int ide_cmd_ioctl(ide_drive_t *drive, unsigned long arg) | |||
161 | 160 | ||
162 | if (tf->command == ATA_CMD_SET_FEATURES && | 161 | if (tf->command == ATA_CMD_SET_FEATURES && |
163 | tf->feature == SETFEATURES_XFER && | 162 | tf->feature == SETFEATURES_XFER && |
164 | tf->nsect >= XFER_SW_DMA_0 && | 163 | tf->nsect >= XFER_SW_DMA_0) { |
165 | (id[ATA_ID_UDMA_MODES] || | 164 | xfer_rate = ide_find_dma_mode(drive, XFER_UDMA_6); |
166 | id[ATA_ID_MWDMA_MODES] || | 165 | if (xfer_rate != tf->nsect) { |
167 | id[ATA_ID_SWDMA_MODES])) { | 166 | err = -EINVAL; |
168 | xfer_rate = args[1]; | ||
169 | if (tf->nsect > XFER_UDMA_2 && !eighty_ninty_three(drive)) { | ||
170 | printk(KERN_WARNING "%s: UDMA speeds >UDMA33 cannot " | ||
171 | "be set\n", drive->name); | ||
172 | goto abort; | 167 | goto abort; |
173 | } | 168 | } |
174 | } | 169 | } |
@@ -231,7 +226,6 @@ static int generic_drive_reset(ide_drive_t *drive) | |||
231 | rq->cmd_type = REQ_TYPE_SPECIAL; | 226 | rq->cmd_type = REQ_TYPE_SPECIAL; |
232 | rq->cmd_len = 1; | 227 | rq->cmd_len = 1; |
233 | rq->cmd[0] = REQ_DRIVE_RESET; | 228 | rq->cmd[0] = REQ_DRIVE_RESET; |
234 | rq->cmd_flags |= REQ_SOFTBARRIER; | ||
235 | if (blk_execute_rq(drive->queue, NULL, rq, 1)) | 229 | if (blk_execute_rq(drive->queue, NULL, rq, 1)) |
236 | ret = rq->errors; | 230 | ret = rq->errors; |
237 | blk_put_request(rq); | 231 | blk_put_request(rq); |