[SCSI] isci: fix, prevent port from getting stuck in the 'configuring' state
authorMarcin Tomczak <marcin.tomczak@intel.com>
Wed, 4 Jan 2012 09:33:41 +0000 (01:33 -0800)
committerJames Bottomley <JBottomley@Parallels.com>
Mon, 16 Jan 2012 07:48:02 +0000 (11:48 +0400)
commit05b080fc933bb068b32fa119db00e8efcc10e3bd
tree8442420c0733da0a9c1d7b85828e4e297d0163c0
parent0953dbea1d9a84c8443b5f5bb45229a6c9d7f9f3
[SCSI] isci: fix, prevent port from getting stuck in the 'configuring' state

When expander connected in x2 or x4 mode and with IO runnning, if
a cable from wideport is plugged out from the phy, IO's start failing
on all the targets.

Observed that when cable is pulled with IO running, cominit is
happening on all the links and IO's start dropping to 0 and eventually
the whole IO fails. Second observation, target is trying to open and
SCU is responding with "Open reject no destination".

A cause of the problem is when the port went from the "ready
configuring substate" back to "ready configuring substate" as a result
of phy being pulled off, scic suspended the port task scheduler
register. As a result no IO was allowed and in the "substate
configuring enter" routine the IO never goes back to 0. As a result
the port never comes out of "ready substate configuring".

The patch adds a mechanism of activate and deactivate phy when a port
link up, which fixes the problem.

Signed-off-by: Bartek Nowakowski <bartek.nowakowski@intel.com>
Signed-off-by: Maciej Trela <maciej.trela@intel.com>
Signed-off-by: Marcin Tomczak <marcin.tomczak@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/isci/port.c
drivers/scsi/isci/port.h