pdu: dump PDU header on ILLEGAL REQUEST sense
Signed-off-by: Peter Lieven <pl@kamp.de>
This commit is contained in:
@@ -391,6 +391,8 @@ void iscsi_tcp_free_pdu(struct iscsi_context *iscsi, struct iscsi_pdu *pdu);
|
||||
|
||||
int iscsi_service_reconnect_if_loggedin(struct iscsi_context *iscsi);
|
||||
|
||||
void iscsi_dump_pdu_header(struct iscsi_context *iscsi, unsigned char *data);
|
||||
|
||||
struct iscsi_transport {
|
||||
int (*connect)(struct iscsi_context *iscsi, union socket_address *sa, int ai_family);
|
||||
int (*queue_pdu)(struct iscsi_context *iscsi, struct iscsi_pdu *pdu);
|
||||
|
||||
@@ -450,6 +450,9 @@ iscsi_process_scsi_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu,
|
||||
task->sense.key,
|
||||
scsi_sense_ascq_str(task->sense.ascq),
|
||||
task->sense.ascq);
|
||||
if (task->sense.key == SCSI_SENSE_ILLEGAL_REQUEST) {
|
||||
iscsi_dump_pdu_header(iscsi, pdu->outdata.data);
|
||||
}
|
||||
if (pdu->callback) {
|
||||
pdu->callback(iscsi, SCSI_STATUS_CHECK_CONDITION, task,
|
||||
pdu->private_data);
|
||||
|
||||
Reference in New Issue
Block a user