]> git.baikalelectronics.ru Git - kernel.git/commit
scsi_debug: change SCSI command parser to table driven
authorDouglas Gilbert <dgilbert@interlog.com>
Tue, 25 Nov 2014 01:46:29 +0000 (20:46 -0500)
committerChristoph Hellwig <hch@lst.de>
Tue, 25 Nov 2014 14:42:57 +0000 (15:42 +0100)
commitcbc8fdc1599658aed1960af54f90556ed64dd32d
tree73117721a14603545743fecc6294ef65321958a5
parentf39e08fcc2f0dc02f4f1e4f321f26b4419f64a44
scsi_debug: change SCSI command parser to table driven

The existing 'big switch' parser in queuecommand() is changed to
a table driven parser. The old and new queuecommand() were moved
in the source so diff would not shuffle them. Apart from the new
tables most other changes are refactoring existing response code
to be more easily called out of the table parser. The 'strict'
parameter is added so that cdb_s can be checked for non-zero
values in parts of the cdb that are reserved. Some other changes
include: tweak request sense response when D_SENSE differs; support
NDOB in Write Same(16); and fix crash in Get LBA Status when LBP
was inactive.

Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/scsi_debug.c