aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/st.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-01-06 12:34:07 -0500
committerJames Bottomley <jejb@mulgrave.(none)>2006-01-14 11:54:45 -0500
commit776b23a0363d99ca402edc1aba1db8099b747b33 (patch)
tree20cab193388facc2506e3de2a3d931ab22d81ae4 /drivers/scsi/st.c
parentd4054239929479907f20b9d68c905589125ad343 (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/st.c')
-rw-r--r--drivers/scsi/st.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 6e4a36af58c3..13b1d3aac265 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);
194 194
195static int st_probe(struct device *); 195static int st_probe(struct device *);
196static int st_remove(struct device *); 196static int st_remove(struct device *);
197static int st_init_command(struct scsi_cmnd *);
198 197
199static void do_create_driverfs_files(void); 198static void do_create_driverfs_files(void);
200static void do_remove_driverfs_files(void); 199static void do_remove_driverfs_files(void);
@@ -207,7 +206,6 @@ static struct scsi_driver st_template = {
207 .probe = st_probe, 206 .probe = st_probe,
208 .remove = st_remove, 207 .remove = st_remove,
209 }, 208 },
210 .init_command = st_init_command,
211}; 209};
212 210
213static int st_compression(struct scsi_tape *, int); 211static int st_compression(struct scsi_tape *, int);
@@ -4181,29 +4179,6 @@ static void scsi_tape_release(struct kref *kref)
4181 return; 4179 return;
4182} 4180}
4183 4181
4184static void st_intr(struct scsi_cmnd *SCpnt)
4185{
4186 /*
4187 * The caller should be checking the request's errors
4188 * value.
4189 */
4190 scsi_io_completion(SCpnt, SCpnt->bufflen, 0);
4191}
4192
4193/*
4194 * st_init_command: only called via the scsi_cmd_ioctl (block SG_IO)
4195 * interface for REQ_BLOCK_PC commands.
4196 */
4197static int st_init_command(struct scsi_cmnd *SCpnt)
4198{
4199 if (!(SCpnt->request->flags & REQ_BLOCK_PC))
4200 return 0;
4201
4202 scsi_setup_blk_pc_cmnd(SCpnt);
4203 SCpnt->done = st_intr;
4204 return 1;
4205}
4206
4207static int __init init_st(void) 4182static int __init init_st(void)
4208{ 4183{
4209 validate_options(); 4184 validate_options();