]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: fc: start decoupling fc_block_scsi_eh from scsi_cmnd
authorSteffen Maier <maier@linux.vnet.ibm.com>
Tue, 25 Jul 2017 14:14:24 +0000 (16:14 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 7 Aug 2017 18:04:02 +0000 (14:04 -0400)
commitf52fc0012e76065b6020cad0ee0daf46b33aeac9
treee6e9a24800a7b9f8849380ead98880e96a4d8233
parent4b6a3ba8d4b16752bcc1381b5db62090801c5075
scsi: fc: start decoupling fc_block_scsi_eh from scsi_cmnd

Scsi_cmnd is an unsuitable argument for eh_device_reset_handler(),
eh_target_reset_handler(), and eh_host_reset_handler() which do not have
the scope of one single SCSI command.  These callbacks tend to use
fc_block_scsi_eh() requiring scsi_cmnd.  In order to start decoupling
above eh callbacks from scsi_cmnd, introduce a new variant of the
function called fc_block_rport() taking an fc_rport as argument.
Refactor the old fc_block_scsi_eh() to simply delegate to
fc_block_rport().

Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_transport_fc.c
include/scsi/scsi_transport_fc.h