David Jeffery
78c9672f78
SCSI: qla2xxx: Test and clear FCPORT_UPDATE_NEEDED atomically.
...
commit a394aac885 upstream.
When the qla2xxx driver loses access to multiple, remote ports, there is a race
condition which can occur which will keep the request stuck on a scsi request
queue indefinitely.
This bad state occurred do to a race condition with how the FCPORT_UPDATE_NEEDED
bit is set in qla2x00_schedule_rport_del(), and how it is cleared in
qla2x00_do_dpc(). The problem port has its drport pointer set, but it has never
been processed by the driver to inform the fc transport that the port has been
lost. qla2x00_schedule_rport_del() sets drport, and then sets the
FCPORT_UPDATE_NEEDED bit. In qla2x00_do_dpc(), the port lists are walked and
any drport pointer is handled and the fc transport informed of the port loss,
then the FCPORT_UPDATE_NEEDED bit is cleared. This leaves a race where the
dpc thread is processing one port removal, another port removal is marked
with a call to qla2x00_schedule_rport_del(), and the dpc thread clears the
bit for both removals, even though only the first removal was actually
handled. Until another event occurs to set FCPORT_UPDATE_NEEDED, the later
port removal is never finished and qla2xxx stays in a bad state which causes
requests to become stuck on request queues.
This patch updates the driver to test and clear FCPORT_UPDATE_NEEDED
atomically. This ensures the port state changes are processed and not lost.
Signed-off-by: David Jeffery <djeffery@redhat.com >
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com >
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com >
Signed-off-by: James Bottomley <JBottomley@Parallels.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2013-01-17 08:43:54 -08:00
..
2011-11-26 09:09:52 -08:00
2011-05-10 10:16:21 +02:00
2011-03-31 11:26:23 -03:00
2011-05-24 13:08:39 -04:00
2011-05-01 16:32:23 -05:00
2011-03-31 11:26:23 -03:00
2011-05-23 09:12:26 -07:00
2011-05-24 12:38:02 -04:00
2011-10-03 11:41:05 -07:00
2012-10-02 09:47:26 -07:00
2012-02-13 11:06:13 -08:00
2012-10-07 08:27:27 -07:00
2011-03-31 11:26:23 -03:00
2012-01-06 14:13:47 -08:00
2011-03-31 11:26:23 -03:00
2012-10-07 08:27:26 -07:00
2012-12-03 12:59:13 -08:00
2011-10-03 11:40:48 -07:00
2012-08-09 08:27:34 -07:00
2011-10-03 11:41:00 -07:00
2012-09-14 10:00:50 -07:00
2012-10-02 09:47:26 -07:00
2013-01-17 08:43:54 -08:00
2012-03-12 10:32:57 -07:00
2011-05-24 13:28:35 -07:00
2011-04-26 10:22:59 +02:00
2013-01-17 08:43:54 -08:00
2011-05-27 19:52:57 -07:00
2012-01-25 17:24:59 -08:00
2011-10-03 11:41:09 -07:00
2011-03-31 11:26:23 -03:00
2010-11-16 13:33:23 -08:00
2009-12-04 12:00:51 -06:00
2010-11-16 13:33:23 -08:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2010-11-16 13:33:23 -08:00
2011-03-31 11:26:23 -03:00
2010-12-22 18:57:02 +01:00
2010-05-26 19:51:08 +02:00
2010-05-26 19:51:07 +02:00
2010-05-26 19:51:08 +02:00
2010-05-26 19:51:07 +02:00
2010-05-26 19:51:09 +02:00
2011-03-31 11:26:23 -03:00
2010-11-16 13:33:23 -08:00
2010-11-16 13:33:23 -08:00
2010-11-16 13:33:23 -08:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2010-11-16 13:33:23 -08:00
2012-10-13 05:28:03 +09:00
2010-11-16 13:33:23 -08:00
2010-11-16 13:33:23 -08:00
2010-03-30 22:02:32 +09:00
2010-10-22 10:52:56 -07:00
2011-05-23 09:12:26 -07:00
2011-05-01 10:22:40 -05:00
2011-03-31 11:26:23 -03:00
2009-12-04 23:41:47 +01:00
2011-05-01 10:22:40 -05:00
2010-11-16 13:33:23 -08:00
2010-11-16 13:33:23 -08:00
2011-05-01 10:22:40 -05:00
2011-05-01 10:22:40 -05:00
2011-05-23 09:12:26 -07:00
2008-08-29 02:13:10 -07:00
2010-11-16 13:33:23 -08:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2010-11-16 13:33:23 -08:00
2010-01-18 10:48:16 -06:00
2010-12-31 09:50:09 -06:00
2010-01-18 10:48:16 -06:00
2010-12-31 09:50:09 -06:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2010-05-26 19:51:08 +02:00
2011-11-11 09:37:02 -08:00
2011-05-17 11:07:01 +04:00
2012-10-07 08:27:26 -07:00
2011-08-04 21:58:36 -07:00
2010-11-16 13:33:23 -08:00
2009-10-02 09:45:22 -05:00
2010-11-16 13:33:23 -08:00
2011-03-31 11:26:23 -03:00
2011-05-26 13:19:00 -07:00
2010-11-16 13:33:23 -08:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-11-11 09:35:24 -08:00
2011-05-01 12:10:34 -05:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2010-08-06 10:45:07 -05:00
2011-10-03 11:40:42 -07:00
2011-02-24 12:41:10 -05:00
2010-03-30 22:02:32 +09:00
2011-07-03 04:04:45 -07:00
2010-03-30 22:02:32 +09:00
2011-10-03 11:41:02 -07:00
2011-02-24 12:41:08 -05:00
2010-03-30 22:02:32 +09:00
2010-11-16 13:33:23 -08:00
2010-03-30 22:02:32 +09:00
2008-12-28 20:00:03 +01:00
2011-10-03 11:41:10 -07:00
2011-05-01 10:22:40 -05:00
2011-03-31 11:26:23 -03:00
2011-05-01 10:22:40 -05:00
2010-03-30 22:02:32 +09:00
2010-05-26 19:51:07 +02:00
2010-05-02 15:55:03 -04:00
2011-05-01 10:22:40 -05:00
2010-11-16 13:33:23 -08:00
2011-03-31 11:26:23 -03:00
2010-11-16 13:33:23 -08:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2011-05-10 10:16:21 +02:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-05-24 13:09:41 -04:00
2011-03-31 11:26:23 -03:00
2010-11-16 13:33:23 -08:00
2011-08-04 21:58:36 -07:00
2011-05-26 13:19:00 -07:00
2010-11-16 13:33:23 -08:00
2010-11-16 13:33:23 -08:00
2011-05-01 10:22:40 -05:00
2009-05-20 17:21:13 -05:00
2010-11-16 13:33:23 -08:00
2010-11-16 13:33:23 -08:00
2011-05-18 12:32:23 -06:00
2010-08-06 09:25:50 -06:00
2010-03-03 21:17:06 +05:30
2011-03-31 11:26:23 -03:00
2011-08-04 21:58:35 -07:00
2012-09-14 10:00:50 -07:00
2009-12-04 12:01:33 -06:00
2009-12-04 12:01:30 -06:00
2012-08-09 08:27:34 -07:00
2011-03-31 11:26:23 -03:00
2012-02-29 16:34:30 -08:00
2012-02-29 16:34:30 -08:00
2011-05-28 23:12:11 -07:00
2010-02-08 17:15:19 -06:00
2012-09-14 10:00:50 -07:00
2009-11-18 08:37:40 -08:00
2012-10-07 08:27:27 -07:00
2010-10-22 10:52:56 -07:00
2011-05-01 10:20:10 -05:00
2008-07-27 10:31:49 -04:00
2011-05-24 12:38:36 -04:00
2011-05-20 13:29:52 -07:00
2011-03-23 11:35:58 -05:00
2011-03-10 08:52:07 +01:00
2010-03-30 22:02:32 +09:00
2009-01-02 10:22:16 -06:00
2012-06-10 00:32:57 +09:00
2010-11-16 13:33:23 -08:00
2010-03-30 22:02:32 +09:00
2010-10-15 15:49:20 +02:00
2012-01-25 17:24:54 -08:00
2011-03-14 18:37:34 -05:00
2011-08-04 21:58:35 -07:00
2010-10-24 13:41:39 -07:00
2011-04-06 06:19:38 -07:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-12-16 17:53:39 +01:00
2010-03-30 22:02:32 +09:00
2011-08-04 21:58:35 -07:00
2011-08-04 21:58:35 -07:00
2008-04-07 12:15:39 -05:00
2011-11-11 09:37:01 -08:00
2009-12-10 08:54:13 -06:00
2010-11-16 13:33:23 -08:00
2011-03-31 11:26:23 -03:00
2010-08-07 18:17:56 +02:00
2010-08-07 18:17:56 +02:00
2010-11-16 13:33:23 -08:00
2010-03-30 22:02:32 +09:00
2011-02-28 01:36:39 -07:00
2011-03-31 11:26:23 -03:00
2010-11-16 13:33:23 -08:00
2010-11-16 13:33:23 -08:00
2011-05-01 10:22:40 -05:00
2011-05-01 10:22:40 -05:00
2011-05-24 13:25:35 -04:00
2010-11-16 13:33:23 -08:00
2010-11-16 13:33:23 -08:00
2009-12-04 12:00:49 -06:00
2011-05-26 13:19:00 -07:00
2010-11-16 13:33:23 -08:00
2011-03-31 11:26:23 -03:00
2009-06-25 11:37:23 -05:00
2010-05-17 21:37:41 +02:00