diff options
author | Christoph Hellwig <hch@lst.de> | 2006-01-06 12:34:07 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2006-01-14 11:54:45 -0500 |
commit | 776b23a0363d99ca402edc1aba1db8099b747b33 (patch) | |
tree | 20cab193388facc2506e3de2a3d931ab22d81ae4 /drivers/scsi/sr.c | |
parent | d4054239929479907f20b9d68c905589125ad343 (diff) |
[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 <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/sr.c')
-rw-r--r-- | drivers/scsi/sr.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index 18a3b756c63c..dd8050392d01 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c | |||
@@ -238,8 +238,6 @@ static void rw_intr(struct scsi_cmnd * SCpnt) | |||
238 | case ILLEGAL_REQUEST: | 238 | case ILLEGAL_REQUEST: |
239 | if (!(SCpnt->sense_buffer[0] & 0x90)) | 239 | if (!(SCpnt->sense_buffer[0] & 0x90)) |
240 | break; | 240 | break; |
241 | if (!blk_fs_request(SCpnt->request)) | ||
242 | break; | ||
243 | error_sector = (SCpnt->sense_buffer[3] << 24) | | 241 | error_sector = (SCpnt->sense_buffer[3] << 24) | |
244 | (SCpnt->sense_buffer[4] << 16) | | 242 | (SCpnt->sense_buffer[4] << 16) | |
245 | (SCpnt->sense_buffer[5] << 8) | | 243 | (SCpnt->sense_buffer[5] << 8) | |
@@ -318,23 +316,6 @@ static int sr_init_command(struct scsi_cmnd * SCpnt) | |||
318 | } | 316 | } |
319 | 317 | ||
320 | /* | 318 | /* |
321 | * these are already setup, just copy cdb basically | ||
322 | */ | ||
323 | if (SCpnt->request->flags & REQ_BLOCK_PC) { | ||
324 | scsi_setup_blk_pc_cmnd(SCpnt); | ||
325 | |||
326 | if (SCpnt->timeout_per_command) | ||
327 | timeout = SCpnt->timeout_per_command; | ||
328 | |||
329 | goto queue; | ||
330 | } | ||
331 | |||
332 | if (!(SCpnt->request->flags & REQ_CMD)) { | ||
333 | blk_dump_rq_flags(SCpnt->request, "sr unsup command"); | ||
334 | return 0; | ||
335 | } | ||
336 | |||
337 | /* | ||
338 | * we do lazy blocksize switching (when reading XA sectors, | 319 | * we do lazy blocksize switching (when reading XA sectors, |
339 | * see CDROMREADMODE2 ioctl) | 320 | * see CDROMREADMODE2 ioctl) |
340 | */ | 321 | */ |
@@ -422,8 +403,6 @@ static int sr_init_command(struct scsi_cmnd * SCpnt) | |||
422 | */ | 403 | */ |
423 | SCpnt->transfersize = cd->device->sector_size; | 404 | SCpnt->transfersize = cd->device->sector_size; |
424 | SCpnt->underflow = this_count << 9; | 405 | SCpnt->underflow = this_count << 9; |
425 | |||
426 | queue: | ||
427 | SCpnt->allowed = MAX_RETRIES; | 406 | SCpnt->allowed = MAX_RETRIES; |
428 | SCpnt->timeout_per_command = timeout; | 407 | SCpnt->timeout_per_command = timeout; |
429 | 408 | ||