Fix buffer_offset set to 0 in the last Data-IN carrying status

The same function was called both for setting residual counts
in data_in with status and scsi_response pdus. Bi-directional
status, being set to 0 for scsi_response when data_in is actually
passed, resets buffer_offset field inadvertently.

This precluded formatting LUNs exported thru iSCSI to a Windows
initiator.

The fix is to separate these cases and to call a specialized
function for residual count carried in data_in with status.

Signed-off-by: Alexander Nezhinsky <nezhinsky@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Create tx pdu by explicit scsi cmd dir (none, rd,wr,bidir)

Differentiating between various possible cases for tx pdus
(r2t, data-in and scsi_response) has been made using a set of
predicates, some of which are relevant only for a specific
cmd direction types.
Although possibly correct when all counters and flags used
are up-to-date, this may be dangerous and hard to debug.
Explicit check of cmd type allows discriminating only between
the choices feasible for each cmd type.

Alexander Nezhinsky <nezhinsky@gmail.com>
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>