]> git.karo-electronics.de Git - mv-sheeva.git/commit
[SCSI] fc_transport: make all rports wait dev_loss_tmo before removing them
authorJames Smart <James.Smart@Emulex.Com>
Fri, 27 Apr 2007 15:53:17 +0000 (11:53 -0400)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Sun, 6 May 2007 14:33:20 +0000 (09:33 -0500)
commit92740b24ce6ddac6534fae985aab602548692186
tree9bee34a7786a0c0b796770b89688cfae70b86ec0
parentac09c349080008fdd54a15616a1b14771772d867
[SCSI] fc_transport: make all rports wait dev_loss_tmo before removing them

Per the comment in the change - it's not always prudent to immediately
remove the rport upon first notice of a disconnect. Make all rports
wait dev_loss_tmo before being deleted (and each could have a separate
dev_loss_tmo value).

The original post was:
http://marc.info/?l=linux-scsi&m=117392196006703&w=2

The repost contains the following changes:
 - Bug fix in fc_starget_delete(). Dev_loss_tmo_callbk() was called prior to
   tearing down the target. The callback is to be the last thing called, as
   it tells the LLDD that the rport is completely finished and can be torn
   down.  Rework so that terminate_rport_io() is called to terminate the
   outstanding io. Isolated work so it's is simply "starget" work.
 - Fix holes in original patch. There were code paths that did not expect
   the dev_loss_tmo timer to be running for the non-fcp rports.
 - Bug Fix: the transport wasn't protecting against a LLDD calling
   fc_remote_port_delete() back-to-back. Thus, the dev_loss_tmo timer
   could be restarted such that it fires after the rport had been deleted.
   Validate rport state before starting the timer.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/scsi_transport_fc.c