OpenSolaris

Printable Version Enter a New Search
Bug ID 6696837
Synopsis nv_sata: inquiry-serial-no is not set when using nv_sata cmdk compatibility mode
State 10-Fix Delivered (Fix available in build)
Category:Subcategory driver:sata
Keywords
Responsible Engineer Prasad Singamsetty
Reported Against
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_112
Fixed In snv_112
Release Fixed solaris_nevada(snv_112)
Related Bugs 6296435
Submit Date 2-May-2008
Last Update Date 8-April-2009
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.
Work Around
N/A
Comments
N/A