Re: dev/psm0 not found

From: Ivan Klymenko <fidaj_at_ukr.net>
Date: Mon, 20 Dec 2010 23:38:57 +0200
В Mon, 20 Dec 2010 16:02:46 -0500
John Baldwin <jhb_at_freebsd.org> пишет:

> On Monday, December 20, 2010 3:03:36 pm Ivan Klymenko wrote:
> > В Mon, 20 Dec 2010 14:51:15 -0500
> > John Baldwin <jhb_at_freebsd.org> пишет:
> > 
> > > On Monday, December 20, 2010 1:14:35 pm Ivan Klymenko wrote:
> > > > В Mon, 20 Dec 2010 12:49:53 -0500
> > > > John Baldwin <jhb_at_freebsd.org> пишет:
> > > > 
> > > > > On Monday, December 20, 2010 11:53:34 am Ivan Klymenko wrote:
> > > > > > В Mon, 20 Dec 2010 09:58:57 -0500
> > > > > > John Baldwin <jhb_at_freebsd.org> пишет:
> > > > > > 
> > > > > > > On Saturday, December 18, 2010 1:30:20 pm Ivan Klymenko
> > > > > > > wrote:
> > > > > > > > 
> > > http://svn.freebsd.org/viewvc/base/head/sys/dev/atkbdc/psm.c?view=log
> > > > > > > > 
> > > > > > > > after updating svn revision => 216491 system is not
> > > > > > > > detecting the device psm
> > > > > > > > http://svn.freebsd.org/viewvc/base?view=revision&revision=216491
> > > > > > > 
> > > > > > > Can you please get verbose dmesg's from before and after?
> > > > > > > 
> > > > > > 
> > > > > > Voila.
> > /usr/src/sys/dev/atkbdc/psm.c: In function 'psmidentify':
> > /usr/src/sys/dev/atkbdc/psm.c:1116: error: void value not ignored
> > as it ought to be *** Error code 1
> 
> Ok, try this:
> 
> Index: psm.c
> ===================================================================
> --- psm.c	(revision 216591)
> +++ psm.c	(working copy)
> _at__at_ -1080,7 +1080,7 _at__at_
>  	device_t psmc;
>  	device_t psm;
>  	u_long irq;
> -	int unit;
> +	int error, unit;
>  
>  	unit = device_get_unit(parent);
>  
> _at__at_ -1090,8 +1090,10 _at__at_
>  		return;
>  
>  	irq = bus_get_resource_start(psm, SYS_RES_IRQ, KBDC_RID_AUX);
> -	if (irq > 0)
> +	if (irq > 0) {
> +		printf("psm%d: already has an IRQ?\n", unit);
>  		return;
> +	}
>  
>  	/*
>  	 * If the PS/2 mouse device has already been reported by
> ACPI or _at__at_ -1100,13 +1102,24 _at__at_
>  	 */
>  	psmc = device_find_child(device_get_parent(parent),
>  	    PSMCPNP_DRIVER_NAME, unit);
> -	if (psmc == NULL)
> +	if (psmc == NULL) {
> +		printf("psm%d: could not find %s%d\n", unit,
> +		    PSMCPNP_DRIVER_NAME, unit);
>  		return;
> +	}
>  	irq = bus_get_resource_start(psmc, SYS_RES_IRQ, 0);
> -	if (irq <= 0)
> +	if (irq <= 0) {
> +		printf("psm%d: no IRQ from %s\n", unit,
> +		    device_get_nameunit(psmc));
>  		return;
> +	}
>  	bus_delete_resource(psmc, SYS_RES_IRQ, 0);
> -	bus_set_resource(psm, SYS_RES_IRQ, KBDC_RID_AUX, irq, 1);
> +	error = bus_set_resource(psm, SYS_RES_IRQ, KBDC_RID_AUX,
> irq, 1);
> +	if (error)
> +		printf("psm%d: failed to add IRQ %lu: %d\n", unit,
> irq,
> +		    error);
> +	else
> +		printf("psm%d: added IRQ %lu\n", unit, irq);
>  }
>  
>  #define	endprobe(v)	do {			\
> 

Not working :(

Received on Mon Dec 20 2010 - 20:39:02 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:10 UTC