From: Alexander Nezhinsky <alexandern@xxxxxxxxxxxx> These patches fix data-in buffer generation for SPC and SPC-like commands, correctly accounting for allocation length, introduce explicit transfer length reporting by SCSI layer, fix and unify residual count caclulation for over/underflow conditions by iscsi and iser LLDs. For an extensive comment please see patch: "transfer_len for scsi_cmd, set together with resid..." Alexander Nezhinsky (13): transfer_len for scsi_cmd, set together with resid; unified resid handling for iscsi/iser mem_copy_n32: safe memcpy, accumulates copied count, tracks remaining space spc: fix data-in buffer generation for INQUIRY cmd spc: fix data-in buffer generation for REPORT_LUNS cmd spc: fix data-in buffer generation for REPORT_SUPPORTED_OPERATION_CODES cmd spc: fix data-in buffer generation for MOD_SENSE cmd spc: fix data-in buffer generation for READ_KEYS action of PERSISTENT_RESERVE_IN spc: fix data-in buffer generation for READ_RESERVATION of PERSISTENT_RESERVE_IN spc: fix data-in buffer generation for REPORT_CAPABILITIES of PERSISTENT_RESERVE_IN spc: fix data-in buffer generation for REQUEST_SENSE cmd sbc: fix data-in buffer generation for READ_CAPACITY(16) sbc: fix data-in buffer generation for GET_LBA_STATUS bs_sg: fix residual count handling for sg and bsg, account for direction usr/bs_sg.c | 30 ++++-- usr/iscsi/iscsid.c | 91 ++++++++-------- usr/iscsi/iscsid.h | 1 + usr/iscsi/iser.c | 46 +------- usr/sbc.c | 110 ++++++++++--------- usr/scsi_cmnd.h | 39 +++++-- usr/spc.c | 305 ++++++++++++++++++++++++++-------------------------- usr/target.c | 7 ++ usr/util.c | 31 ++++++ usr/util.h | 4 + 10 files changed, 352 insertions(+), 312 deletions(-) -- 1.7.9.6 -- To unsubscribe from this list: send the line "unsubscribe stgt" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html