Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Dec 2010 22:03:36 +0200
From:      Ivan Klymenko <fidaj@ukr.net>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: dev/psm0 not found
Message-ID:  <20101220220336.6a8beb79@ukr.net>
In-Reply-To: <201012201451.15057.jhb@freebsd.org>
References:  <20101218203020.1cec8dc7@ukr.net> <201012201249.53159.jhb@freebsd.org> <20101220201435.76234dee@ukr.net> <201012201451.15057.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
=D0=92 Mon, 20 Dec 2010 14:51:15 -0500
John Baldwin <jhb@freebsd.org> =D0=BF=D0=B8=D1=88=D0=B5=D1=82:

> On Monday, December 20, 2010 1:14:35 pm Ivan Klymenko wrote:
> > =D0=92 Mon, 20 Dec 2010 12:49:53 -0500
> > John Baldwin <jhb@freebsd.org> =D0=BF=D0=B8=D1=88=D0=B5=D1=82:
> >=20
> > > On Monday, December 20, 2010 11:53:34 am Ivan Klymenko wrote:
> > > > =D0=92 Mon, 20 Dec 2010 09:58:57 -0500
> > > > John Baldwin <jhb@freebsd.org> =D0=BF=D0=B8=D1=88=D0=B5=D1=82:
> > > >=20
> > > > > On Saturday, December 18, 2010 1:30:20 pm Ivan Klymenko wrote:
> > > > > >=20
> http://svn.freebsd.org/viewvc/base/head/sys/dev/atkbdc/psm.c?view=3Dlog
> > > > > >=20
> > > > > > after updating svn revision =3D> 216491 system is not
> > > > > > detecting the device psm
> > > > > > http://svn.freebsd.org/viewvc/base?view=3Drevision&revision=3D2=
16491
> > > > >=20
> > > > > Can you please get verbose dmesg's from before and after?
> > > > >=20
> > > >=20
> > > > Voila.
> > >=20
> > > Please boot with this and capture the output:
> > >=20
> > > Index: psm.c
> > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > > --- psm.c	(revision 216591)
> > > +++ psm.c	(working copy)
> > > @@ -1100,11 +1100,17 @@
> > >  	 */
> > >  	psmc =3D device_find_child(device_get_parent(parent),
> > >  	    PSMCPNP_DRIVER_NAME, unit);
> > > -	if (psmc =3D=3D NULL)
> > > +	if (psmc =3D=3D NULL) {
> > > +		printf("psm%d: could not find %s%d\n", unit,
> > > +		    PSMCPNP_DRIVER_NAME, unit);
> > >  		return;
> > > +	}
> > >  	irq =3D bus_get_resource_start(psmc, SYS_RES_IRQ, 0);
> > > -	if (irq <=3D 0)
> > > +	if (irq <=3D 0) {
> > > +		printf("psm%d: no IRQ from %s%d\n", unit,
> > > PSMCPNP_DRIVER_NAME,
> > > +		    unit);
> > >  		return;
> > > +	}
> > >  	bus_delete_resource(psmc, SYS_RES_IRQ, 0);
> > >  	bus_set_resource(psm, SYS_RES_IRQ, KBDC_RID_AUX, irq, 1);
> > >  }
>=20
> Try this instead.  You can use a non-verbose dmesg to trim the
> spammage.
>=20
> Index: psm.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- psm.c	(revision 216591)
> +++ psm.c	(working copy)
> @@ -1080,7 +1080,7 @@
>  	device_t psmc;
>  	device_t psm;
>  	u_long irq;
> -	int unit;
> +	int error, unit;
> =20
>  	unit =3D device_get_unit(parent);
> =20
> @@ -1090,8 +1090,10 @@
>  		return;
> =20
>  	irq =3D 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;
> +	}
> =20
>  	/*
>  	 * If the PS/2 mouse device has already been reported by
> ACPI or @@ -1100,13 +1102,27 @@
>  	 */
>  	psmc =3D device_find_child(device_get_parent(parent),
>  	    PSMCPNP_DRIVER_NAME, unit);
> -	if (psmc =3D=3D NULL)
> +	if (psmc =3D=3D NULL) {
> +		printf("psm%d: could not find %s%d\n", unit,
> +		    PSMCPNP_DRIVER_NAME, unit);
>  		return;
> +	}
>  	irq =3D bus_get_resource_start(psmc, SYS_RES_IRQ, 0);
> -	if (irq <=3D 0)
> +	if (irq <=3D 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 =3D bus_delete_resource(psmc, SYS_RES_IRQ, 0);
> +	if (error)
> +		printf("psm%d: failed to remove IRQ from %s: %d\n",
> unit,
> +		    device_get_nameunit(psmc), error);
> +	error =3D 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);
>  }
> =20
>  #define	endprobe(v)	do {			\
>=20

/usr/local/libexec/ccache/world-cc -c -O2 -pipe -mtune=3Dnative -fno-strict=
-aliasing -march=3Dnocona -std=3Dc99  -Wall -Wredundant-decls -Wnested-exte=
rns -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wca=
st-qual  -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc  -I. -I/us=
r/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADER=
S -include opt_global.h -fno-common -finline-limit=3D8000 --param inline-un=
it-growth=3D100 --param large-function-growth=3D1000  -mcmodel=3Dkernel -mn=
o-red-zone  -mfpmath=3D387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow=
  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-prote=
ctor -Werror  /usr/src/sys/dev/atkbdc/psm.c
distcc[38004] ERROR: compile (null) on localhost failed
/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 oug=
ht to be
*** Error code 1

Stop in /usr/obj/usr/src/sys/mk9.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.



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