PERFORCE change 54895 for review
Robert Watson
rwatson at FreeBSD.org
Mon Jun 14 04:16:14 GMT 2004
http://perforce.freebsd.org/chv.cgi?CH=54895
Change 54895 by rwatson at rwatson_tislabs on 2004/06/14 04:15:50
Integrate netperf_socket: ALTQ build fix.
Affected files ...
.. //depot/projects/netperf_socket/sys/dev/acpica/acpi.c#23 integrate
.. //depot/projects/netperf_socket/sys/i386/acpica/acpi_asus.c#3 integrate
.. //depot/projects/netperf_socket/sys/i386/acpica/acpi_toshiba.c#6 integrate
.. //depot/projects/netperf_socket/sys/net/if_var.h#12 integrate
Differences ...
==== //depot/projects/netperf_socket/sys/dev/acpica/acpi.c#23 (text+ko) ====
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.159 2004/06/13 22:52:30 njl Exp $
+ * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.161 2004/06/14 04:01:12 njl Exp $
*/
#include "opt_acpi.h"
@@ -125,6 +125,7 @@
static int acpi_isa_pnp_probe(device_t bus, device_t child,
struct isa_pnp_id *ids);
static void acpi_probe_children(device_t bus);
+static int acpi_probe_order(ACPI_HANDLE handle, int *order);
static ACPI_STATUS acpi_probe_child(ACPI_HANDLE handle, UINT32 level,
void *context, void **status);
static void acpi_shutdown_pre_sync(void *arg, int howto);
@@ -1152,25 +1153,31 @@
return_VOID;
}
+/*
+ * Determine the probe order for a given device and return non-zero if it
+ * should be attached immediately.
+ */
static int
-acpi_probe_order(ACPI_HANDLE handle, int level, int *order)
+acpi_probe_order(ACPI_HANDLE handle, int *order)
{
int ret;
+ /*
+ * 1. I/O port and memory system resource holders
+ * 2. Embedded controllers (to handle early accesses)
+ */
ret = 0;
- /* IO port and memory system resource holders are first. */
if (acpi_MatchHid(handle, "PNP0C01") || acpi_MatchHid(handle, "PNP0C02")) {
*order = 1;
ret = 1;
- }
-
- /* The embedded controller is needed to handle accesses early. */
- if (acpi_MatchHid(handle, "PNP0C09")) {
+ } else if (acpi_MatchHid(handle, "PNP0C09")) {
*order = 2;
ret = 1;
}
- *order = (level + 1) * 10;
+ /* Always probe/attach immediately if we're debugging. */
+ ACPI_DEBUG_EXEC(ret = 1);
+
return (ret);
}
@@ -1203,11 +1210,14 @@
/*
* Create a placeholder device for this node. Sort the placeholder
- * so that the probe/attach passes will run breadth-first.
+ * so that the probe/attach passes will run breadth-first. Orders
+ * less than 10 are reserved for special objects (i.e., system
+ * resources). Larger values are used for all other devices.
*/
ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "scanning '%s'\n",
acpi_name(handle)));
- probe_now = acpi_probe_order(handle, level, &order);
+ order = (level + 1) * 10;
+ probe_now = acpi_probe_order(handle, &order);
child = BUS_ADD_CHILD(bus, order, NULL, -1);
if (child == NULL)
break;
@@ -1239,10 +1249,9 @@
*/
acpi_parse_resources(child, handle, &acpi_res_parse_set, NULL);
- /* If we're debugging, probe/attach now rather than later */
+ /* If order was overridden, probe/attach now rather than later. */
if (probe_now)
device_probe_and_attach(child);
- ACPI_DEBUG_EXEC(device_probe_and_attach(child));
break;
}
}
==== //depot/projects/netperf_socket/sys/i386/acpica/acpi_asus.c#3 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/acpica/acpi_asus.c,v 1.3 2004/05/30 20:34:56 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/acpica/acpi_asus.c,v 1.4 2004/06/14 03:40:56 njl Exp $");
/*
* Driver for extra ACPI-controlled gadgets (hotkeys, leds, etc) found on
@@ -213,7 +213,7 @@
if (!acpi_disabled("asus") &&
acpi_get_type(dev) == ACPI_TYPE_DEVICE &&
- acpi_MatchHid(dev, "ATK0100")) {
+ acpi_MatchHid(acpi_get_handle(dev), "ATK0100")) {
sc = device_get_softc(dev);
sc->dev = dev;
sc->handle = acpi_get_handle(dev);
==== //depot/projects/netperf_socket/sys/i386/acpica/acpi_toshiba.c#6 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/acpica/acpi_toshiba.c,v 1.8 2004/05/30 20:34:56 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/acpica/acpi_toshiba.c,v 1.9 2004/06/14 03:40:56 njl Exp $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -212,13 +212,15 @@
static int
acpi_toshiba_probe(device_t dev)
{
+ ACPI_HANDLE h;
int ret = ENXIO;
+ h = acpi_get_handle(dev);
if (!acpi_disabled("toshiba") &&
acpi_get_type(dev) == ACPI_TYPE_DEVICE &&
device_get_unit(dev) == 0 &&
- (acpi_MatchHid(dev, "TOS6200") ||
- acpi_MatchHid(dev, "TOS6207"))) {
+ (acpi_MatchHid(h, "TOS6200") ||
+ acpi_MatchHid(h, "TOS6207"))) {
device_set_desc(dev, "Toshiba HCI Extras");
ret = 0;
}
==== //depot/projects/netperf_socket/sys/net/if_var.h#12 (text+ko) ====
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* From: @(#)if.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/net/if_var.h,v 1.75 2004/06/13 17:29:08 mlaier Exp $
+ * $FreeBSD: src/sys/net/if_var.h,v 1.76 2004/06/14 03:55:09 mlaier Exp $
*/
#ifndef _NET_IF_VAR_H_
@@ -356,7 +356,7 @@
(*ifp->if_start)(ifp);
return (1);
}
-#if 1 /* ALTQ */
+#ifdef ALTQ
#define IFQ_ENQUEUE(ifq, m, err) \
do { \
IF_LOCK(ifq); \
More information about the p4-projects
mailing list