Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 04 Oct 2002 08:15:14 +0100
From:      Mark Murray <mark@grondar.za>
To:        Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org>
Cc:        takawata@axe-inc.co.jp, current@FreeBSD.ORG
Subject:   Re: PCI brokenness 
Message-ID:  <200210040715.g947FEh5000625@grimreaper.grondar.org>
In-Reply-To: <20021003.193027.27010308.iwasaki@jp.FreeBSD.org> ; from Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org>  "Thu, 03 Oct 2002 19:30:27 %2B0900."
References:  <20021003.193027.27010308.iwasaki@jp.FreeBSD.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
This works, thanks! :-) :-)

Domo Arrigato!

M

> I'm not sure, but my thought was something like following patches.
> 
> Thanks
> 
> Index: dev/acpica/acpi.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/dev/acpica/acpi.c,v
> retrieving revision 1.75
> diff -u -r1.75 acpi.c
> --- dev/acpica/acpi.c	6 Sep 2002 17:01:06 -0000	1.75
> +++ dev/acpica/acpi.c	3 Oct 2002 10:13:51 -0000
> @@ -777,6 +777,10 @@
>  	if (ACPI_SUCCESS(AcpiGetHandle(ACPI_ROOT_OBJECT, scopes[i], &parent)))
>  	    AcpiWalkNamespace(ACPI_TYPE_ANY, parent, 100, acpi_probe_child, bus, NULL);
>  
> +    if (devclass_get_device(devclass_find("isa"), 0) == NULL) {
> +	device_set_flags(BUS_ADD_CHILD(bus, 0, "isa", 0), 1);
> +    }
> +
>      /*
>       * Scan all of the child devices we have created and let them probe/attach.
>       */
> Index: isa/isa_common.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/isa/isa_common.c,v
> retrieving revision 1.31
> diff -u -r1.31 isa_common.c
> --- isa/isa_common.c	30 Sep 2002 07:56:12 -0000	1.31
> +++ isa/isa_common.c	3 Oct 2002 10:13:04 -0000
> @@ -1107,6 +1107,60 @@
>  	1,			/* no softc */
>  };
>  
> +static int
> +acpi_isa_probe(device_t dev)
> +{
> +
> +	if (device_get_flags(dev) == 0) {
> +		return (ENXIO);
> +	}
> +
> +	return (isa_probe(dev));
> +}
> +
> +static device_method_t acpi_isa_methods[] = {
> +	/* Device interface */
> +	DEVMETHOD(device_probe,		acpi_isa_probe),
> +	DEVMETHOD(device_attach,	isa_attach),
> +	DEVMETHOD(device_detach,	bus_generic_detach),
> +	DEVMETHOD(device_shutdown,	bus_generic_shutdown),
> +	DEVMETHOD(device_suspend,	bus_generic_suspend),
> +	DEVMETHOD(device_resume,	bus_generic_resume),
> +
> +	/* Bus interface */
> +	DEVMETHOD(bus_add_child,	isa_add_child),
> +	DEVMETHOD(bus_print_child,	isa_print_child),
> +	DEVMETHOD(bus_probe_nomatch,	isa_probe_nomatch),
> +	DEVMETHOD(bus_read_ivar,	isa_read_ivar),
> +	DEVMETHOD(bus_write_ivar,	isa_write_ivar),
> +	DEVMETHOD(bus_child_detached,	isa_child_detached),
> +	DEVMETHOD(bus_driver_added,	isa_driver_added),
> +	DEVMETHOD(bus_setup_intr,	isa_setup_intr),
> +	DEVMETHOD(bus_teardown_intr,	isa_teardown_intr),
> +
> +	DEVMETHOD(bus_get_resource_list,isa_get_resource_list),
> +	DEVMETHOD(bus_alloc_resource,	isa_alloc_resource),
> +	DEVMETHOD(bus_release_resource,	isa_release_resource),
> +	DEVMETHOD(bus_set_resource,	isa_set_resource),
> +	DEVMETHOD(bus_get_resource,	bus_generic_rl_get_resource),
> +	DEVMETHOD(bus_delete_resource,	bus_generic_rl_delete_resource),
> +	DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
> +	DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
> +
> +	/* ISA interface */
> +	DEVMETHOD(isa_add_config,	isa_add_config),
> +	DEVMETHOD(isa_set_config_callback, isa_set_config_callback),
> +	DEVMETHOD(isa_pnp_probe,	isa_pnp_probe),
> +
> +	{ 0, 0 }
> +};
> +
> +static driver_t acpi_isa_driver = {
> +	"isa",
> +	acpi_isa_methods,
> +	1,			/* no softc */
> +};
> +
>  /*
>   * ISA can be attached to a PCI-ISA bridge or directly to the legacy device.
>   */
> @@ -1114,4 +1168,5 @@
>  DRIVER_MODULE(isa, eisab, isa_driver, isa_devclass, 0, 0);
>  #ifdef __i386__
>  DRIVER_MODULE(isa, legacy, isa_driver, isa_devclass, 0, 0);
> +DRIVER_MODULE(isa, acpi, acpi_isa_driver, isa_devclass, 0, 0);
>  #endif
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-current" in the body of the message
-- 
o       Mark Murray
\_
O.\_    Warning: this .sig is umop ap!sdn

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210040715.g947FEh5000625>