workaround SAS3408 firmware issue
On older revisions of the firmware (18.104.22.168) on the Avago 9400-8i (SAS3408), we have observed that the firmware is inconsistent about the number of phys that are present. This information is obtained from three different places:
- Manufacturing Page 5
- SAS IO Unit Page 0
- SAS IO Unit Page 1
The system has asserts that these values are always supposed to be the same. What we have found is one case where the SAS IO Unit Page 0 has a 9th phy when everything else does not. What we've opted to do is when we check the number of phys that are present is to take different action based on the comparison, rather than assert that they are the same.
We will always honor manufacturing page 5 as the source of truth which is what we assign into m_num_phys on the mptsas_t. From here, if we detect less phys on a SAS IO unit page, then we fail to attach and notify the user that they should talk to their vendor about the firmware. IF there are more, then we will clamp it at m_num_phys.
For testing notes see 9044.