On Wed, 2017-12-13 at 20:40 -0500, Douglas Gilbert wrote: > + {0, 0x7f, 0x11, F_SA_HIGH | F_D_OUT | FF_MEDIA_IO, resp_write_scat, > + NULL, {32, 0xc7, 0, 0, 0, 0, 0x3f, 0x18, 0x0, 0x11, 0xf8, > + 0, 0xff, 0xff, 0x0, 0x0} }, /* WRITE SCATTERED(32) */ I know this is consistent with other command declarations in the scsi_debug driver, but it seems weird to me to report to the initiator that only some bits of the ADDITIONAL CDB LENGTH fields are supported (0x18)? From SPC-5: The CDB USAGE DATA field contains information about the CDB for the command being queried. The first byte of the CDB USAGE DATA field shall contain the operation code for the command being queried. If the command being queried contains a service action, then that service action code shall be placed in the CDB USAGE DATA field in the same location as the SERVICE ACTION field of the command CDB. All other bytes of the CDB USAGE DATA field shall contain a usage map for bits in the CDB for the command being queried. > + lrdp = kzalloc(lbdof_blen, GFP_ATOMIC); > + if (lrdp == NULL) { > + mk_sense_buffer(scp, ILLEGAL_REQUEST, INSUFF_RES_ASC, > + INSUFF_RES_ASCQ); > + return illegal_condition_result; > + } It seems weird to me to report a fatal error to the initiator if a memory allocation fails? I think other SCSI LLDs return SCSI_MLQUEUE_HOST_BUSY if a memory allocation fails. Thanks, Bart.