aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/pktcdvd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/pktcdvd.c')
-rw-r--r--drivers/block/pktcdvd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 451b996bba91..a6b2aa67c9b2 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -348,7 +348,7 @@ static int pkt_generic_packet(struct pktcdvd_device *pd, struct packet_command *
348 char sense[SCSI_SENSE_BUFFERSIZE]; 348 char sense[SCSI_SENSE_BUFFERSIZE];
349 request_queue_t *q; 349 request_queue_t *q;
350 struct request *rq; 350 struct request *rq;
351 DECLARE_COMPLETION(wait); 351 DECLARE_COMPLETION_ONSTACK(wait);
352 int err = 0; 352 int err = 0;
353 353
354 q = bdev_get_queue(pd->bdev); 354 q = bdev_get_queue(pd->bdev);
@@ -365,17 +365,17 @@ static int pkt_generic_packet(struct pktcdvd_device *pd, struct packet_command *
365 rq->sense = sense; 365 rq->sense = sense;
366 memset(sense, 0, sizeof(sense)); 366 memset(sense, 0, sizeof(sense));
367 rq->sense_len = 0; 367 rq->sense_len = 0;
368 rq->flags |= REQ_BLOCK_PC | REQ_HARDBARRIER; 368 rq->cmd_type = REQ_TYPE_BLOCK_PC;
369 rq->cmd_flags |= REQ_HARDBARRIER;
369 if (cgc->quiet) 370 if (cgc->quiet)
370 rq->flags |= REQ_QUIET; 371 rq->cmd_flags |= REQ_QUIET;
371 memcpy(rq->cmd, cgc->cmd, CDROM_PACKET_SIZE); 372 memcpy(rq->cmd, cgc->cmd, CDROM_PACKET_SIZE);
372 if (sizeof(rq->cmd) > CDROM_PACKET_SIZE) 373 if (sizeof(rq->cmd) > CDROM_PACKET_SIZE)
373 memset(rq->cmd + CDROM_PACKET_SIZE, 0, sizeof(rq->cmd) - CDROM_PACKET_SIZE); 374 memset(rq->cmd + CDROM_PACKET_SIZE, 0, sizeof(rq->cmd) - CDROM_PACKET_SIZE);
374 rq->cmd_len = COMMAND_SIZE(rq->cmd[0]); 375 rq->cmd_len = COMMAND_SIZE(rq->cmd[0]);
375 376
376 rq->ref_count++; 377 rq->ref_count++;
377 rq->flags |= REQ_NOMERGE; 378 rq->end_io_data = &wait;
378 rq->waiting = &wait;
379 rq->end_io = blk_end_sync_rq; 379 rq->end_io = blk_end_sync_rq;
380 elv_add_request(q, rq, ELEVATOR_INSERT_BACK, 1); 380 elv_add_request(q, rq, ELEVATOR_INSERT_BACK, 1);
381 generic_unplug_device(q); 381 generic_unplug_device(q);