• Douglas Gilbert's avatar
    scsi_debug: change SCSI command parser to table driven · c2248fc9
    Douglas Gilbert authored
    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: default avatarDouglas Gilbert <dgilbert@interlog.com>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    c2248fc9
scsi_debug.c 148 KB