From: James Smart Date: Tue, 7 Apr 2015 19:07:13 +0000 (-0400) Subject: lpfc: Fix host reset escalation killing all IOs. X-Git-Tag: omap-for-v4.1/fixes-rc1~120^2~32 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea4142f6b10585f271a40ee52eec2f55e48aeccf;p=pandora-kernel.git lpfc: Fix host reset escalation killing all IOs. Fix host reset escalation killing all IOs. SLI-3 adapters will use a new host template. The template differs from SLI-4 adapters in that it does not have an eh_host_reset_handler. Lpfc has traditionally never had a host_reset. The host reset handler was added when we ran into a stuck hardware condition on a SLI-4 adapter. The host_reset will reset and reinit the pci function, clearing the hardware condition. Unfortunately, the host reset handler uses attach/detach code paths, which makes scsi_add_host() and scsi_remove_host() calls. Meaning, a host_reset will completely remove the scsi_host from the system. As a new call to scsi_add_host() is made, the shost# changes, which results in completely new scsi_devices and device names. All the older scsi devices on the old shost# are now orphaned and unrecoverable. We realize we need to re-implement the host_reset_handler so the scsi_host stays registered across the host_reset, but that will be a rather lengthy effort. In the short term, we had an immediate need to restore the SLI-3 devices to their working behavior, with the easiest path being to remove their host_reset handler. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: James Bottomley --- Reading git-diff-tree failed