summaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_spc.c
Commit message (Collapse)AuthorAgeFilesLines
* target: Move MAINTENANCE_[IN,OUT] from pscsi_parse_cdb -> spc_parse_cdbNicholas Bellinger2012-06-121-1/+41
| | | | | | | | | The MAINTENANCE_[IN,OUT] CDB parsing required for generic ALUA emulation needs to be in spc_parse_cdb() to function for virtual TYPE_DISK exports, instead of in backend pscsi_parse_cdb() code used only for passthrough ops. Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target: move code for CDB emulationChristoph Hellwig2012-06-121-11/+905
| | | | | | | | Move the existing code in target_core_cdb.c into the files for the command sets that the emulations implement. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target: add a parse_cdb method to the backend driversChristoph Hellwig2012-06-121-0/+1
| | | | | | | | | | | | | | | | Instead of trying to handle all SCSI command sets in one function (transport_generic_cmd_sequencer) call out to the backend driver to perform this functionality. For pSCSI a copy of the existing code is used, but for all virtual backends we can use a new parse_sbc_cdb helper is used to provide a simple SBC emulation. For now this setups means a fair amount of duplication between pSCSI and the SBC library, but patches later in this series will sort out that problem. (nab: Fix up build failure in target_core_pscsi.c) Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target: split parsing of SPC commands into a separate helperChristoph Hellwig2012-06-121-0/+169
(nab: Add EXPORT_SYMBOL usage for spc_parse_cdb) Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>