[SCSI] mptfusion: Added code for occationally SATA hotplug failure.
commitcc7e9f5f9999d9c015686ab4a622e1fb529391eb
authorKashyap, Desai <kashyap.desai@lsi.com>
Thu, 17 Jun 2010 09:11:48 +0000 (17 14:41 +0530)
committerJames Bottomley <James.Bottomley@suse.de>
Tue, 27 Jul 2010 17:02:35 +0000 (27 12:02 -0500)
tree55bde51c2d1687a57b9bac9608961c33e9db20b3
parentb68bf096d4211bb6490955f86842d8291e8ae218
[SCSI] mptfusion: Added code for occationally SATA hotplug failure.

Issue: SATA hotplug does not work sometimes.
At the time of ADD device/ADD phys disk, drive may fail to add SATA device
due to temporary SAS Address for SATA device generated by firmware. Final
SAS address for SATA driver will be generated only after disk spinup is
done. This may take some times for slow spining SATA drives.

At phy link up driver gets attached device sas address and stores into
phyinfo. At the time of ADD event driver will read sas device page0 using
channel and FW ID provided in ADD Device event. Here in case of SATA drives,
driver will see miss match in phyinfo->sas_address and latest sas address
read from SAS DEVICE PAGE0 and eventually device won't be added to OS.

Fix:
When Driver read SAS DEVICE PAGE0, it can identify Device type looking at
device_info. If device is SATA drive and sas address mismatch happens,
Driver will do same stuffs which happened at the time of LINK UP to get
correct piece of information from Pages. ( Find parent device and refresh
parent device phys either HBA refresh/Exp refresh)

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/message/fusion/mptsas.c