From 776b23a0363d99ca402edc1aba1db8099b747b33 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Fri, 6 Jan 2006 18:34:07 +0100 Subject: [SCSI] always handle REQ_BLOCK_PC requests in common code LLDDs should never see REQ_BLOCK_PC requests, we can handle them just fine in the core code. There is a small behaviour change in that some check in sr's rw_intr are bypassed, but I consider the old behaviour a bug. Mike found this cleanup opportunity and provdided early patches, so all the credit goes to him, even if I redid the patches from scratch beause that was easier than forward-porting the old patches. Signed-off-by: Christoph Hellwig Signed-off-by: James Bottomley --- drivers/scsi/sr.c | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'drivers/scsi/sr.c') diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index 18a3b756c63..dd8050392d0 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c @@ -238,8 +238,6 @@ static void rw_intr(struct scsi_cmnd * SCpnt) case ILLEGAL_REQUEST: if (!(SCpnt->sense_buffer[0] & 0x90)) break; - if (!blk_fs_request(SCpnt->request)) - break; error_sector = (SCpnt->sense_buffer[3] << 24) | (SCpnt->sense_buffer[4] << 16) | (SCpnt->sense_buffer[5] << 8) | @@ -317,23 +315,6 @@ static int sr_init_command(struct scsi_cmnd * SCpnt) return 0; } - /* - * these are already setup, just copy cdb basically - */ - if (SCpnt->request->flags & REQ_BLOCK_PC) { - scsi_setup_blk_pc_cmnd(SCpnt); - - if (SCpnt->timeout_per_command) - timeout = SCpnt->timeout_per_command; - - goto queue; - } - - if (!(SCpnt->request->flags & REQ_CMD)) { - blk_dump_rq_flags(SCpnt->request, "sr unsup command"); - return 0; - } - /* * we do lazy blocksize switching (when reading XA sectors, * see CDROMREADMODE2 ioctl) @@ -422,8 +403,6 @@ static int sr_init_command(struct scsi_cmnd * SCpnt) */ SCpnt->transfersize = cd->device->sector_size; SCpnt->underflow = this_count << 9; - -queue: SCpnt->allowed = MAX_RETRIES; SCpnt->timeout_per_command = timeout; -- cgit v1.2.3