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/st.c | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'drivers/scsi/st.c') diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 6e4a36af58c..13b1d3aac26 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -194,7 +194,6 @@ static int sgl_unmap_user_pages(struct scatterlist *, const unsigned int, int); static int st_probe(struct device *); static int st_remove(struct device *); -static int st_init_command(struct scsi_cmnd *); static void do_create_driverfs_files(void); static void do_remove_driverfs_files(void); @@ -207,7 +206,6 @@ static struct scsi_driver st_template = { .probe = st_probe, .remove = st_remove, }, - .init_command = st_init_command, }; static int st_compression(struct scsi_tape *, int); @@ -4181,29 +4179,6 @@ static void scsi_tape_release(struct kref *kref) return; } -static void st_intr(struct scsi_cmnd *SCpnt) -{ - /* - * The caller should be checking the request's errors - * value. - */ - scsi_io_completion(SCpnt, SCpnt->bufflen, 0); -} - -/* - * st_init_command: only called via the scsi_cmd_ioctl (block SG_IO) - * interface for REQ_BLOCK_PC commands. - */ -static int st_init_command(struct scsi_cmnd *SCpnt) -{ - if (!(SCpnt->request->flags & REQ_BLOCK_PC)) - return 0; - - scsi_setup_blk_pc_cmnd(SCpnt); - SCpnt->done = st_intr; - return 1; -} - static int __init init_st(void) { validate_options(); -- cgit v1.2.3