]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] fix id computation in scsi_eh_target_reset()
authorJames Bottomley <James.Bottomley@suse.de>
Mon, 25 Oct 2010 20:53:41 +0000 (15:53 -0500)
committerJames Bottomley <James.Bottomley@suse.de>
Tue, 21 Dec 2010 18:23:56 +0000 (12:23 -0600)
commit6a2921333b3cd56a76ad19f23aab66f900283a10
tree8186c195ae339439f45109110afea40fbf833363
parent1394bff92829d61e4192e39fcbb8deb97e68c832
[SCSI] fix id computation in scsi_eh_target_reset()

The current code in scsi_eh_target_reset() has an off by one error
that actually sends spurious extra resets.  Since there's no real need
to reset the targets in numerical order, simply chunk up the command
recovery list doing target resets and pulling matching targets out of
the list (that also makes the loop O(N) instead of O(N^2).

[mike christie found and fixed a list_splice -> list_splice_init problem]

Reported-by: Hillf Danton<dhillf@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/scsi_error.c