OpenSolaris

Printable Version Enter a New Search
Bug ID 6305388
Synopsis ddi_getlongprop(9F) callers should use DDI_DEV_T_ANY instead of DDI_DEV_T_NONE
State 10-Fix Delivered (Fix available in build)
Category:Subcategory kernel:devfs
Keywords onnv_triage
Responsible Engineer Chris Horne
Reported Against
Duplicate Of
Introduced In solaris_2.6
Commit to Fix snv_24
Fixed In snv_24
Release Fixed solaris_nevada(snv_24)
Related Bugs 1252037
Submit Date 3-August-2005
Last Update Date 23-September-2005
Description
ddi_getlongprop(9F) makes it clear that ddi_getlongprop() callers
should use DDI_DEV_T_ANY, not DDI_DEV_T_NONE.

We currently have a lot of incorrect ON callers (see below).  While
these callers should be fixed, they currently find their property
correctly when what they are looking for is a PROM property because
impl_ddi_bus_prop_op() does not distinguish between DDI_DEV_T_ANY and
DDI_DEV_T_NONE (see comments in impl_ddi_bus_prop_op()).  In addition,
the fix for 4516737 in snv_20 allows ddi_getlongprop() calls that
incorrectly used DDI_DEV_T_NONE to find kernel properties.

Even though there are currently implementation artifacts that prevent
this from causing immediate problems,  all ON calls to ddi_getlongprop,
ddi_getlongprop_buf, and ddi_getproplen should conform to the 9F man
page specification and use DDI_DEV_T_ANY.  This is a P4 bug since
current callers *must* be looking for PROM properties where incorrect
DDI_DEV_T_NONE .vs.  correct DDI_DEV_T_ANY use in calls does not
matter.

The following ON calls are incorrect:

ddi_getlongprop() calls that need to be fixed:
        usr/src/uts/common/cpr/cpr_driver.c
        usr/src/uts/common/io/busra.c
        usr/src/uts/common/io/pcic.c
        usr/src/uts/common/io/hotplug/pcicfg/pcicfg.c
        usr/src/uts/common/io/pci_pci/pci_pci.c
        usr/src/uts/common/pcmcia/nexus/pcmcia.c
        usr/src/uts/intel/io/adpu320/drv/adpu320.c
        usr/src/uts/sun/io/sbusmem.c
        usr/src/uts/sun4u/io/isadma.c
        usr/src/uts/sun4u/io/pcicfg.e.c
        usr/src/uts/sun4u/io/pmubus.c
        usr/src/uts/sun4u/io/sbbc.c
        usr/src/uts/sun4u/io/upa64s.c
        usr/src/uts/sun4u/io/pci/db21554.c
        usr/src/uts/sun4u/io/pci/pci.c
        usr/src/uts/sun4u/io/pci/pci_pci.c
        usr/src/uts/sun4u/io/pci/pci_fm.c
        usr/src/uts/sun4u/io/pci/pcisch.c
        usr/src/uts/sun4u/io/pci/pci_iommu.c
        usr/src/uts/sun4u/io/pci/pcipsy.c
        usr/src/uts/sun4u/io/pci/simba.c
        usr/src/uts/sun4u/io/ppm/m1535ppm.c
        usr/src/uts/sun4u/montecarlo/io/acebus.c
        usr/src/uts/sun4u/montecarlo/sys/acebus.h
        usr/src/uts/sun4u/ngdr/io/dr_quiesce.c
        usr/src/uts/sun4u/serengeti/io/sbdp_quiesce.c
        usr/src/uts/sun4u/sunfire/io/sysctrl_quiesce.c
        usr/src/uts/i86pc/io/dktp/hba/chs/chs_conf.c
        usr/src/uts/i86pc/io/dktp/hba/chs/chs_devops.c
        usr/src/uts/i86pc/io/dktp/hba/chs/chs_intr.c
        usr/src/uts/sun4/io/efcode/fcpci.c
        usr/src/uts/sun4/io/ebus.c
        usr/src/uts/sun4/io/px/px.c
        usr/src/uts/sun4/io/px/px_pci.c
        usr/src/uts/sun4/os/ddi_impl.c
        usr/src/uts/sun4/sys/ebus.h
        usr/src/uts/sun4v/io/vnex.c

ddi_getlongprop_buf() calls that need to be fixed:
	usr/src/uts/common/io/busra.c
	usr/src/uts/common/io/hotplug/pcicfg/pcicfg.c
	usr/src/uts/common/io/hotplug/pcihp/pcihp.c
	usr/src/uts/i86pc/io/dktp/hba/chs/chs_devops.c
	usr/src/uts/i86pc/io/pcplusmp/apic.c
	usr/src/uts/i86pc/io/psm/uppc.c
	usr/src/uts/sun4u/io/pci/db21554.c
	usr/src/uts/sun4u/io/pcicfg.e.c
	usr/src/uts/sun4u/io/sbd.c
	usr/src/uts/sun4v/io/px/px_lib4v.c

ddi_getproplen() calls that need to be fixed:
        usr/src/uts/sun4u/io/pci/pcisch.c
Work Around
N/A
Comments
N/A