diff options
author | Darrick J. Wong <djwong@us.ibm.com> | 2007-01-30 12:07:27 -0800 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-02-03 08:15:15 -0600 |
commit | 423f7cf467045eab616f97309aed87a54b5e351d (patch) | |
tree | 32d1b6fdb65dfa0816bf176bfdf1df2257caa563 /kernel | |
parent | 9abe16c670bd3d4ab5519257514f9f291383d104 (diff) |
[SCSI] libsas: Don't BUG when connecting two expanders via wide port
libsas: Don't BUG when connecting two expanders via wide port
When a device is connected to an expander, the discovery process goes through
sas_ex_discover_dev to figure out what's attached to the phy. If it is the
case that the phy being discovered happens to be the second phy of a wide link
to an expander, that discover_dev function will incorrectly call
sas_ex_discover_expander, which creates another sas_port and tries to attach the
other sas_phys to the new port, thus triggering a BUG. The correct thing to do is
to check the other ex_phys of the expander to see if there's a sas_port for this
sas_phy, and attach the sas_phy to the existing sas_port.
This is easily triggered if one enables the phys of a wide port between
expanders one by one.
This second version of the patch fixes a small regression in the case where
all the phys show up at once and we accidentally try to attach to a port
that hasn't been created yet.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions