]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/ide-floppy.c
ide-floppy: pass packet command in rq->cmd
[linux-2.6-omap-h63xx.git] / drivers / ide / ide-floppy.c
index 44b53896f1052e7c61db7fd044ac8c9400a6afb2..cbf84f2e9cceacac541fe0e95a32bcaa3d8241ff 100644 (file)
@@ -291,6 +291,7 @@ static void idefloppy_queue_pc_head(ide_drive_t *drive, struct ide_atapi_pc *pc,
        rq->cmd_type = REQ_TYPE_SPECIAL;
        rq->cmd_flags |= REQ_PREEMPT;
        rq->rq_disk = floppy->disk;
+       memcpy(rq->cmd, pc->c, 12);
        ide_do_drive_cmd(drive, rq);
 }
 
@@ -573,6 +574,8 @@ static void idefloppy_create_rw_cmd(idefloppy_floppy_t *floppy,
        put_unaligned(cpu_to_be16(blocks), (unsigned short *)&pc->c[7]);
        put_unaligned(cpu_to_be32(block), (unsigned int *) &pc->c[2]);
 
+       memcpy(rq->cmd, pc->c, 12);
+
        pc->rq = rq;
        pc->b_count = cmd == READ ? 0 : rq->bio->bi_size;
        if (rq->cmd_flags & REQ_RW)
@@ -670,6 +673,7 @@ static int idefloppy_queue_pc_tail(ide_drive_t *drive, struct ide_atapi_pc *pc)
        rq = blk_get_request(drive->queue, READ, __GFP_WAIT);
        rq->buffer = (char *) pc;
        rq->cmd_type = REQ_TYPE_SPECIAL;
+       memcpy(rq->cmd, pc->c, 12);
        error = blk_execute_rq(drive->queue, floppy->disk, rq, 0);
        blk_put_request(rq);