aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-08-10 02:44:47 -0400
committerJens Axboe <axboe@nelson.home.kernel.dk>2006-09-30 14:23:37 -0400
commit4aff5e2333c9a1609662f2091f55c3f6fffdad36 (patch)
treeb73d8c2b7c1bdc03d3313c108da7dfc95ee95525 /drivers/scsi/sd.c
parent77ed74da26f50fa28471571ee7a2251b77526d84 (diff)
[PATCH] Split struct request ->flags into two parts
Right now ->flags is a bit of a mess: some are request types, and others are just modifiers. Clean this up by splitting it into ->cmd_type and ->cmd_flags. This allows introduction of generic Linux block message types, useful for sending generic Linux commands to block devices. Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r--drivers/scsi/sd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 638cff41d436..10bc99c911fa 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -443,8 +443,7 @@ static int sd_init_command(struct scsi_cmnd * SCpnt)
443 SCpnt->cmnd[0] = READ_6; 443 SCpnt->cmnd[0] = READ_6;
444 SCpnt->sc_data_direction = DMA_FROM_DEVICE; 444 SCpnt->sc_data_direction = DMA_FROM_DEVICE;
445 } else { 445 } else {
446 printk(KERN_ERR "sd: Unknown command %lx\n", rq->flags); 446 printk(KERN_ERR "sd: Unknown command %x\n", rq->cmd_flags);
447/* overkill panic("Unknown sd command %lx\n", rq->flags); */
448 return 0; 447 return 0;
449 } 448 }
450 449
@@ -840,7 +839,7 @@ static int sd_issue_flush(struct device *dev, sector_t *error_sector)
840static void sd_prepare_flush(request_queue_t *q, struct request *rq) 839static void sd_prepare_flush(request_queue_t *q, struct request *rq)
841{ 840{
842 memset(rq->cmd, 0, sizeof(rq->cmd)); 841 memset(rq->cmd, 0, sizeof(rq->cmd));
843 rq->flags |= REQ_BLOCK_PC; 842 rq->cmd_type = REQ_TYPE_BLOCK_PC;
844 rq->timeout = SD_TIMEOUT; 843 rq->timeout = SD_TIMEOUT;
845 rq->cmd[0] = SYNCHRONIZE_CACHE; 844 rq->cmd[0] = SYNCHRONIZE_CACHE;
846 rq->cmd_len = 10; 845 rq->cmd_len = 10;