Mercurial > illumos > illumos-gate
changeset 10221:390e01e5ad37
6862430 Can't install s10u8_04 on Ultra 40, Ultra 40 M2 and W2100z via monitor/keyboard
author | rui zang - Sun Microsystems - Beijing China <Aaron.Zang@Sun.COM> |
---|---|
date | Fri, 31 Jul 2009 09:41:55 +0800 |
parents | 92edc381c312 |
children | bc1378aafa34 |
files | usr/src/uts/i86pc/io/consplat.c |
diffstat | 1 files changed, 16 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/i86pc/io/consplat.c Thu Jul 30 16:41:58 2009 -0700 +++ b/usr/src/uts/i86pc/io/consplat.c Fri Jul 31 09:41:55 2009 +0800 @@ -214,17 +214,23 @@ (strcmp(dev_type, "pciex") == 0)) { ddi_acc_handle_t pci_conf; uint16_t data16; + char *nodename; ddi_prop_free(dev_type); - if (i_ddi_attach_node_hierarchy(dip) != DDI_SUCCESS) - return (DDI_WALK_CONTINUE); + nodename = ddi_node_name(dip); - if (pci_config_setup(dip, &pci_conf) != DDI_SUCCESS) { - /* This happends when it's the host bridge */ + if (strcmp(nodename, "pci") == 0) { + /* pci root dip */ return (DDI_WALK_CONTINUE); } + if (i_ddi_attach_node_hierarchy(dip) != DDI_SUCCESS) + return (DDI_WALK_PRUNECHILD); + + if (pci_config_setup(dip, &pci_conf) != DDI_SUCCESS) + return (DDI_WALK_PRUNECHILD); + data16 = pci_config_get16(pci_conf, PCI_BCNF_BCNTRL); pci_config_teardown(&pci_conf); @@ -242,11 +248,11 @@ ddi_prop_free(dev_type); if ((pdip = ddi_get_parent(dip)) == NULL) - return (DDI_WALK_CONTINUE); + return (DDI_WALK_PRUNECHILD); if (ddi_prop_lookup_string(DDI_DEV_T_ANY, pdip, DDI_PROP_DONTPASS, "device_type", &parent_type) != DDI_SUCCESS) - return (DDI_WALK_CONTINUE); + return (DDI_WALK_PRUNECHILD); if ((strcmp(parent_type, "isa") == 0) || (strcmp(parent_type, "eisa") == 0)) { @@ -263,23 +269,23 @@ ddi_prop_free(parent_type); if (i_ddi_attach_node_hierarchy(dip) != DDI_SUCCESS) - return (DDI_WALK_CONTINUE); + return (DDI_WALK_PRUNECHILD); if (pci_config_setup(dip, &pci_conf) != DDI_SUCCESS) - return (DDI_WALK_CONTINUE); + return (DDI_WALK_PRUNECHILD); data16 = pci_config_get16(pci_conf, PCI_CONF_COMM); pci_config_teardown(&pci_conf); if (!(data16 & PCI_COMM_IO)) - return (DDI_WALK_CONTINUE); + return (DDI_WALK_PRUNECHILD); *(dev_info_t **)found_dip = dip; return (DDI_WALK_TERMINATE); } ddi_prop_free(parent_type); - return (DDI_WALK_CONTINUE); + return (DDI_WALK_PRUNECHILD); } /*