summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/st.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-01-06 18:34:07 +0100
committerJames Bottomley <jejb@mulgrave.(none)>2006-01-14 10:54:45 -0600
commit776b23a0363d99ca402edc1aba1db8099b747b33 (patch)
tree20cab193388facc2506e3de2a3d931ab22d81ae4 /drivers/scsi/st.c
parentd4054239929479907f20b9d68c905589125ad343 (diff)
downloadop-kernel-dev-776b23a0363d99ca402edc1aba1db8099b747b33.zip
op-kernel-dev-776b23a0363d99ca402edc1aba1db8099b747b33.tar.gz
[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 6e4a36a..13b1d3a 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();
OpenPOWER on IntegriCloud