aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hosts.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-11-04 14:10:55 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-11-15 15:14:20 -0500
commit3b00315799d78f76531b71435fbc2643cd71ae4c (patch)
tree82f4041632d24e90c18482ffffa6511207978636 /drivers/scsi/hosts.c
parent2dc611de5a3fd955cd0298c50691d4c05046db97 (diff)
[SCSI] untangle scsi_prep_fn
I wanted to add some BUG checks to scsi_prep_fn to make sure no one sends us a non-sg command, but this function is a horrible mess. So I decided to detangle the function and document what the valid cases are. While doing that I found that REQ_TYPE_SPECIAL commands aren't used by the SCSI layer anymore and we can get rid of the code handling them. The new structure of scsi_prep_fn is: (1) check if we're allowed to send this command (2) big switch on cmd_type. For the two valid types call into a function to set the command up, else error (3) code to handle error cases Because FS and BLOCK_PC commands are handled entirely separate after the patch this introduces a tiny amount of code duplication. This improves readabiulity though and will help to avoid the bidi command overhead for FS commands so it's a good thing. I've tested this on both sata and mptsas. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/hosts.c')
0 files changed, 0 insertions, 0 deletions