[SCSI] ibmvfc: Fix target initialization failure retry handling
authorBrian King <brking@linux.vnet.ibm.com>
Wed, 29 Oct 2008 13:46:45 +0000 (08:46 -0500)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 29 Dec 2008 17:24:13 +0000 (11:24 -0600)
commit10e794996ed00a0f09ff0745f87e3a3dd5de4606
treec5bb008170708e1d63e09e813e30257c5fcac7ce
parentad8dcffaf9bc1d7eb86dabf591e95f4ffb86cf1b
[SCSI] ibmvfc: Fix target initialization failure retry handling

If the ibmvfc driver is in discovery attempting to log into a target
and it encounters an error, the command may get retried one or more
times, depending on the error received. If the retries are
unsuccessful such that the discovery thread gives up on discovery to
that target, the target ends up in a state where, if SCSI core had
previously known about the device, the host will get unblocked but the
host will not be logged into the target, causing any commands sent to
the target to fail. This patch fixes this so that if this occurs, the
target is deleted such that the normal dev_loss processing can occur
instead.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/ibmvscsi/ibmvfc.c
drivers/scsi/ibmvscsi/ibmvfc.h