target/loop: Enable VARLEN CDB support
Field shost->max_cmd_len is used to inform Linux / the SCSI midlayer of the maximum CDB size an LLD is capable of handling. Set this field to SCSI_MAX_VARLEN_CDB_SIZE for target, to enable support for variable-sized CDBs (0x7E). Also remove the definition of TL_SCSI_MAX_CMD_LEN since it is now redundant. Signed-off-by: Ilias Tsitsimpis <iliastsi@arrikto.com> Signed-off-by: Vangelis Koukis <vkoukis@arrikto.com> Reviewed-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
Родитель
2bc396a252
Коммит
9736f4ad7c
|
@ -409,7 +409,7 @@ static int tcm_loop_driver_probe(struct device *dev)
|
||||||
sh->max_id = 2;
|
sh->max_id = 2;
|
||||||
sh->max_lun = 0;
|
sh->max_lun = 0;
|
||||||
sh->max_channel = 0;
|
sh->max_channel = 0;
|
||||||
sh->max_cmd_len = TL_SCSI_MAX_CMD_LEN;
|
sh->max_cmd_len = SCSI_MAX_VARLEN_CDB_SIZE;
|
||||||
|
|
||||||
host_prot = SHOST_DIF_TYPE1_PROTECTION | SHOST_DIF_TYPE2_PROTECTION |
|
host_prot = SHOST_DIF_TYPE1_PROTECTION | SHOST_DIF_TYPE2_PROTECTION |
|
||||||
SHOST_DIF_TYPE3_PROTECTION | SHOST_DIX_TYPE1_PROTECTION |
|
SHOST_DIF_TYPE3_PROTECTION | SHOST_DIX_TYPE1_PROTECTION |
|
||||||
|
|
|
@ -2,11 +2,6 @@
|
||||||
#define TL_WWN_ADDR_LEN 256
|
#define TL_WWN_ADDR_LEN 256
|
||||||
#define TL_TPGS_PER_HBA 32
|
#define TL_TPGS_PER_HBA 32
|
||||||
|
|
||||||
/*
|
|
||||||
* Used in tcm_loop_driver_probe() for struct Scsi_Host->max_cmd_len
|
|
||||||
*/
|
|
||||||
#define TL_SCSI_MAX_CMD_LEN 32
|
|
||||||
|
|
||||||
struct tcm_loop_cmd {
|
struct tcm_loop_cmd {
|
||||||
/* State of Linux/SCSI CDB+Data descriptor */
|
/* State of Linux/SCSI CDB+Data descriptor */
|
||||||
u32 sc_cmd_state;
|
u32 sc_cmd_state;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче