]> git.baikalelectronics.ru Git - kernel.git/commit
target: Split transport_send_check_condition_and_sense()
authorBart Van Assche <bart.vanassche@sandisk.com>
Wed, 8 Jul 2015 14:58:51 +0000 (17:58 +0300)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 24 Jul 2015 05:09:28 +0000 (22:09 -0700)
commitbfedf0ed7c3e0bdde392ec1485f18a2694e1f0ab
treea4a1c6a4f79878c412692842c8c278dc29263592
parentcf14a570aec183b075f45c704d2a8ee8ac35fb2c
target: Split transport_send_check_condition_and_sense()

Move the code for translating a sense_reason_t code into a SCSI status
ASC and ASCQ codes from transport_send_check_condition_and_sense() into
the new function translate_sense_reason(). Convert the switch statement
that performs the translation into table-driven code.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_transport.c