|
Description
|
When 'use-cmdk-devid-format' is set in nv_sata.conf, we don't
end up with serial number properties in the device tree.
Lida's analysis:
Looking further in sd.c:sd_register_devid() I see code that reads:
/*
* If transport has already registered a devid for this target
* then that takes precedence over the driver's determination
* of the devid.
*/
if (ddi_devid_get(SD_DEVINFO(un), &un->un_devid) == DDI_SUCCESS) {
ASSERT(un->un_devid);
return; /* use devid registered by the transport */
}
and code in sata.c:sata_scsi_tgt_init() that reads:
/*
* Check if we need to create a legacy devid (i.e cmdk style) for
* the target disks.
*
* HBA devinfo node will have the property "use-cmdk-devid-format"
* if we need to create cmdk-style devid for all the disk devices
* attached to this controller. This property may have been set
* from HBA driver's .conf file or by the HBA driver in its
* attach(9F) function.
*/
if ((sdinfo->satadrv_type == SATA_DTYPE_ATADISK) &&
(ddi_getprop(DDI_DEV_T_ANY, hba_dip, DDI_PROP_DONTPASS,
"use-cmdk-devid-format", 0) == 1)) {
/* register a legacy devid for this target node */
sata_target_devid_register(tgt_dip, sdinfo);
}
and sata_target_devid_register() does:
/* initialize/register devid */
if ((rval = ddi_devid_init(dip, DEVID_ATA_SERIAL,
(ushort_t)(modlen + serlen), hwid, &devid)) == DDI_SUCCESS)
rval = ddi_devid_register(dip, devid);
So, by the time sd gets a chance, the device is already register and
without the serial number property.
Given that serial numbers are an important part of the FMA strategy,
and we have several machines using nv_sata, this is undesirable.
|