diff options
| author | Evan Yan <Evan.Yan@Sun.COM> | 2009-11-08 00:41:31 +0800 |
|---|---|---|
| committer | Evan Yan <Evan.Yan@Sun.COM> | 2009-11-08 00:41:31 +0800 |
| commit | 24fd5dc40967be3acf455139813c114a29e7c529 (patch) | |
| tree | 000d544d352511160d73647bebea04b361d23ab3 /usr | |
| parent | 02cdfdd69aa5f84ff667bb2a2cb2a0387a3accba (diff) | |
| download | illumos-joyent-24fd5dc40967be3acf455139813c114a29e7c529.tar.gz | |
6897970 'hotplug set' prints unexpected warning messages sometimes
Diffstat (limited to 'usr')
| -rw-r--r-- | usr/src/uts/common/io/pciex/hotplug/pciehpc.c | 27 | ||||
| -rw-r--r-- | usr/src/uts/common/io/pciex/hotplug/pcishpc.c | 27 |
2 files changed, 42 insertions, 12 deletions
diff --git a/usr/src/uts/common/io/pciex/hotplug/pciehpc.c b/usr/src/uts/common/io/pciex/hotplug/pciehpc.c index 900e36b383..2d26c73f2c 100644 --- a/usr/src/uts/common/io/pciex/hotplug/pciehpc.c +++ b/usr/src/uts/common/io/pciex/hotplug/pciehpc.c @@ -1662,7 +1662,7 @@ pciehpc_slot_get_property(pcie_hp_slot_t *slot_p, ddi_hp_property_t *arg, value = pcie_slot_condition_text(slot_p->hs_condition); } else { /* unsupported property */ - cmn_err(CE_WARN, "Unsupported property: %s\n", name); + PCIE_DBG("Unsupported property: %s\n", name); ret = DDI_ENOTSUP; goto get_prop_cleanup2; @@ -1806,14 +1806,14 @@ set_prop_cleanup1: while (prop_pair = nvlist_next_nvpair(prop_list, prop_pair)) { name = nvpair_name(prop_pair); if (nvpair_type(prop_pair) != DATA_TYPE_STRING) { - cmn_err(CE_WARN, "Unexpected data type of setting " + PCIE_DBG("Unexpected data type of setting " "property %s.\n", name); ret = DDI_EINVAL; goto set_prop_cleanup; } if (nvpair_value_string(prop_pair, &value)) { - cmn_err(CE_WARN, "Get string value failed for property " - "%s.\n", name); + PCIE_DBG("Get string value failed for property %s.\n", + name); ret = DDI_FAILURE; goto set_prop_cleanup; } @@ -1822,13 +1822,13 @@ set_prop_cleanup1: if ((strcmp(value, PCIEHPC_PROP_VALUE_ON) != 0) && (strcmp(value, PCIEHPC_PROP_VALUE_OFF) != 0) && (strcmp(value, PCIEHPC_PROP_VALUE_BLINK) != 0)) { - cmn_err(CE_WARN, "Unsupported value of setting " + PCIE_DBG("Unsupported value of setting " "property %s\n", name); ret = DDI_ENOTSUP; goto set_prop_cleanup; } } else { - cmn_err(CE_WARN, "Unsupported property: %s\n", name); + PCIE_DBG("Unsupported property: %s\n", name); ret = DDI_ENOTSUP; goto set_prop_cleanup; } @@ -1855,6 +1855,21 @@ set_prop_cleanup1: led_state); } } + if (rval) { + if (get_udatamodel() == DATAMODEL_NATIVE) { + result.buf_size = 0; + if (copyout(&result, rval, sizeof (ddi_hp_property_t))) + ret = DDI_FAILURE; + } +#ifdef _SYSCALL32_IMPL + else { + result32.buf_size = 0; + if (copyout(&result32, rval, + sizeof (ddi_hp_property32_t))) + ret = DDI_FAILURE; + } +#endif + } mutex_exit(&ctrl_p->hc_mutex); set_prop_cleanup: diff --git a/usr/src/uts/common/io/pciex/hotplug/pcishpc.c b/usr/src/uts/common/io/pciex/hotplug/pcishpc.c index 40c6f71a46..cc92020517 100644 --- a/usr/src/uts/common/io/pciex/hotplug/pcishpc.c +++ b/usr/src/uts/common/io/pciex/hotplug/pcishpc.c @@ -523,7 +523,7 @@ pcishpc_slot_get_property(pcie_hp_slot_t *slot_p, ddi_hp_property_t *arg, value = pcie_slot_condition_text(slot_p->hs_condition); } else { /* unsupported property */ - cmn_err(CE_WARN, "Unsupported property: %s\n", name); + PCIE_DBG("Unsupported property: %s\n", name); ret = DDI_ENOTSUP; goto get_prop_cleanup2; @@ -669,14 +669,14 @@ set_prop_cleanup1: while (prop_pair = nvlist_next_nvpair(prop_list, prop_pair)) { name = nvpair_name(prop_pair); if (nvpair_type(prop_pair) != DATA_TYPE_STRING) { - cmn_err(CE_WARN, "Unexpected data type of setting " + PCIE_DBG("Unexpected data type of setting " "property %s.\n", name); ret = DDI_EINVAL; goto set_prop_cleanup; } if (nvpair_value_string(prop_pair, &value)) { - cmn_err(CE_WARN, "Get string value failed for property " - "%s.\n", name); + PCIE_DBG("Get string value failed for property %s.\n", + name); ret = DDI_FAILURE; goto set_prop_cleanup; } @@ -685,13 +685,13 @@ set_prop_cleanup1: if ((strcmp(value, PCIEHPC_PROP_VALUE_ON) != 0) && (strcmp(value, PCIEHPC_PROP_VALUE_OFF) != 0) && (strcmp(value, PCIEHPC_PROP_VALUE_BLINK) != 0)) { - cmn_err(CE_WARN, "Unsupported value of setting " + PCIE_DBG("Unsupported value of setting " "property %s\n", name); ret = DDI_ENOTSUP; goto set_prop_cleanup; } } else { - cmn_err(CE_WARN, "Unsupported property: %s\n", name); + PCIE_DBG("Unsupported property: %s\n", name); ret = DDI_ENOTSUP; goto set_prop_cleanup; } @@ -719,6 +719,21 @@ set_prop_cleanup1: led_state); } } + if (rval) { + if (get_udatamodel() == DATAMODEL_NATIVE) { + result.buf_size = 0; + if (copyout(&result, rval, sizeof (ddi_hp_property_t))) + ret = DDI_FAILURE; + } +#ifdef _SYSCALL32_IMPL + else { + result32.buf_size = 0; + if (copyout(&result32, rval, + sizeof (ddi_hp_property32_t))) + ret = DDI_FAILURE; + } +#endif + } mutex_exit(&ctrl_p->hc_mutex); set_prop_cleanup: |
