Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101198
b: refs/heads/master
c: dd47087
h: refs/heads/master
v: v3
  • Loading branch information
FUJITA Tomonori authored and Bartlomiej Zolnierkiewicz committed Jul 15, 2008
1 parent fba3d52 commit 1d0b95d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0ef4c4db7faabe4fb8a516e9e991e1e8e87a647f
refs/heads/master: dd47087bc173a84e8c42644b315d38b30dc02263
10 changes: 6 additions & 4 deletions trunk/drivers/ide/ide-disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,20 +617,22 @@ static void idedisk_prepare_flush(struct request_queue *q, struct request *rq)
*/
static int set_multcount(ide_drive_t *drive, int arg)
{
struct request rq;
struct request *rq;
int error;

if (arg < 0 || arg > drive->id->max_multsect)
return -EINVAL;

if (drive->special.b.set_multmode)
return -EBUSY;

ide_init_drive_cmd(&rq);
rq.cmd_type = REQ_TYPE_ATA_TASKFILE;
rq = blk_get_request(drive->queue, READ, __GFP_WAIT);
rq->cmd_type = REQ_TYPE_ATA_TASKFILE;

drive->mult_req = arg;
drive->special.b.set_multmode = 1;
(void)ide_do_drive_cmd(drive, &rq, ide_wait);
error = blk_execute_rq(drive->queue, NULL, rq, 0);
blk_put_request(rq);

return (drive->mult_count == arg) ? 0 : -EIO;
}
Expand Down

0 comments on commit 1d0b95d

Please sign in to comment.