summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/components/namespace/nsxfname.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/components/namespace/nsxfname.c')
-rw-r--r--sys/contrib/dev/acpica/components/namespace/nsxfname.c69
1 files changed, 45 insertions, 24 deletions
diff --git a/sys/contrib/dev/acpica/components/namespace/nsxfname.c b/sys/contrib/dev/acpica/components/namespace/nsxfname.c
index c1be8cd..be66384 100644
--- a/sys/contrib/dev/acpica/components/namespace/nsxfname.c
+++ b/sys/contrib/dev/acpica/components/namespace/nsxfname.c
@@ -58,8 +58,8 @@
static char *
AcpiNsCopyDeviceId (
- ACPI_DEVICE_ID *Dest,
- ACPI_DEVICE_ID *Source,
+ ACPI_PNP_DEVICE_ID *Dest,
+ ACPI_PNP_DEVICE_ID *Source,
char *StringArea);
@@ -75,8 +75,8 @@ AcpiNsCopyDeviceId (
* RETURN: Status
*
* DESCRIPTION: This routine will search for a caller specified name in the
- * name space. The caller can restrict the search region by
- * specifying a non NULL parent. The parent value is itself a
+ * name space. The caller can restrict the search region by
+ * specifying a non NULL parent. The parent value is itself a
* namespace handle.
*
******************************************************************************/
@@ -164,7 +164,7 @@ ACPI_EXPORT_SYMBOL (AcpiGetHandle)
* RETURN: Pointer to a string containing the fully qualified Name.
*
* DESCRIPTION: This routine returns the fully qualified name associated with
- * the Handle parameter. This and the AcpiPathnameToHandle are
+ * the Handle parameter. This and the AcpiPathnameToHandle are
* complementary functions.
*
******************************************************************************/
@@ -227,8 +227,7 @@ AcpiGetName (
/* Just copy the ACPI name from the Node and zero terminate it */
- ACPI_STRNCPY (Buffer->Pointer, AcpiUtGetNodeName (Node),
- ACPI_NAME_SIZE);
+ ACPI_MOVE_NAME (Buffer->Pointer, AcpiUtGetNodeName (Node));
((char *) Buffer->Pointer) [ACPI_NAME_SIZE] = 0;
Status = AE_OK;
@@ -246,23 +245,24 @@ ACPI_EXPORT_SYMBOL (AcpiGetName)
*
* FUNCTION: AcpiNsCopyDeviceId
*
- * PARAMETERS: Dest - Pointer to the destination DEVICE_ID
- * Source - Pointer to the source DEVICE_ID
+ * PARAMETERS: Dest - Pointer to the destination PNP_DEVICE_ID
+ * Source - Pointer to the source PNP_DEVICE_ID
* StringArea - Pointer to where to copy the dest string
*
* RETURN: Pointer to the next string area
*
- * DESCRIPTION: Copy a single DEVICE_ID, including the string data.
+ * DESCRIPTION: Copy a single PNP_DEVICE_ID, including the string data.
*
******************************************************************************/
static char *
AcpiNsCopyDeviceId (
- ACPI_DEVICE_ID *Dest,
- ACPI_DEVICE_ID *Source,
+ ACPI_PNP_DEVICE_ID *Dest,
+ ACPI_PNP_DEVICE_ID *Source,
char *StringArea)
{
- /* Create the destination DEVICE_ID */
+
+ /* Create the destination PNP_DEVICE_ID */
Dest->String = StringArea;
Dest->Length = Source->Length;
@@ -287,8 +287,8 @@ AcpiNsCopyDeviceId (
* namespace node and possibly by running several standard
* control methods (Such as in the case of a device.)
*
- * For Device and Processor objects, run the Device _HID, _UID, _CID, _STA,
- * _ADR, _SxW, and _SxD methods.
+ * For Device and Processor objects, run the Device _HID, _UID, _CID, _SUB,
+ * _STA, _ADR, _SxW, and _SxD methods.
*
* Note: Allocates the return buffer, must be freed by the caller.
*
@@ -301,9 +301,10 @@ AcpiGetObjectInfo (
{
ACPI_NAMESPACE_NODE *Node;
ACPI_DEVICE_INFO *Info;
- ACPI_DEVICE_ID_LIST *CidList = NULL;
- ACPI_DEVICE_ID *Hid = NULL;
- ACPI_DEVICE_ID *Uid = NULL;
+ ACPI_PNP_DEVICE_ID_LIST *CidList = NULL;
+ ACPI_PNP_DEVICE_ID *Hid = NULL;
+ ACPI_PNP_DEVICE_ID *Uid = NULL;
+ ACPI_PNP_DEVICE_ID *Sub = NULL;
char *NextIdString;
ACPI_OBJECT_TYPE Type;
ACPI_NAME Name;
@@ -356,7 +357,7 @@ AcpiGetObjectInfo (
{
/*
* Get extra info for ACPI Device/Processor objects only:
- * Run the Device _HID, _UID, and _CID methods.
+ * Run the Device _HID, _UID, _SUB, and _CID methods.
*
* Note: none of these methods are required, so they may or may
* not be present for this device. The Info->Valid bitfield is used
@@ -381,6 +382,15 @@ AcpiGetObjectInfo (
Valid |= ACPI_VALID_UID;
}
+ /* Execute the Device._SUB method */
+
+ Status = AcpiUtExecute_SUB (Node, &Sub);
+ if (ACPI_SUCCESS (Status))
+ {
+ InfoSize += Sub->Length;
+ Valid |= ACPI_VALID_SUB;
+ }
+
/* Execute the Device._CID method */
Status = AcpiUtExecute_CID (Node, &CidList);
@@ -388,7 +398,7 @@ AcpiGetObjectInfo (
{
/* Add size of CID strings and CID pointer array */
- InfoSize += (CidList->ListSize - sizeof (ACPI_DEVICE_ID_LIST));
+ InfoSize += (CidList->ListSize - sizeof (ACPI_PNP_DEVICE_ID_LIST));
Valid |= ACPI_VALID_CID;
}
}
@@ -463,14 +473,15 @@ AcpiGetObjectInfo (
NextIdString = ACPI_CAST_PTR (char, Info->CompatibleIdList.Ids);
if (CidList)
{
- /* Point past the CID DEVICE_ID array */
+ /* Point past the CID PNP_DEVICE_ID array */
- NextIdString += ((ACPI_SIZE) CidList->Count * sizeof (ACPI_DEVICE_ID));
+ NextIdString += ((ACPI_SIZE) CidList->Count * sizeof (ACPI_PNP_DEVICE_ID));
}
/*
- * Copy the HID, UID, and CIDs to the return buffer. The variable-length
- * strings are copied to the reserved area at the end of the buffer.
+ * Copy the HID, UID, SUB, and CIDs to the return buffer.
+ * The variable-length strings are copied to the reserved area
+ * at the end of the buffer.
*
* For HID and CID, check if the ID is a PCI Root Bridge.
*/
@@ -491,6 +502,12 @@ AcpiGetObjectInfo (
Uid, NextIdString);
}
+ if (Sub)
+ {
+ NextIdString = AcpiNsCopyDeviceId (&Info->SubsystemId,
+ Sub, NextIdString);
+ }
+
if (CidList)
{
Info->CompatibleIdList.Count = CidList->Count;
@@ -531,6 +548,10 @@ Cleanup:
{
ACPI_FREE (Uid);
}
+ if (Sub)
+ {
+ ACPI_FREE (Sub);
+ }
if (CidList)
{
ACPI_FREE (CidList);
OpenPOWER on IntegriCloud