2002-08-04 14:51:45

by Oliver Feiler

[permalink] [raw]
Subject: 2.4.19, USB_HID only works compiled in, not as module

Hi,

Since 2.4.19 a usb mouse does not work anymore if

CONFIG_USB_HID=m
and
CONFIG_INPUT_MOUSEDEV=m

is set. It only works if both are compiled into the kernel. Yes, I have set
CONFIG_USB_HIDINPUT=y.

I've also seen other complaints about usb mice not working in 2.4.19, I guess
that's the problem?

If the stuff is compiled as modules, everything seems to be fine. The kernel
messages are the same, everything is detected fine. Except that 'cat
/dev/input/mice' does not give any output if the driver is compiled as
module.

Cheers,
Oliver

--
Oliver Feiler <kiza@(gmx(pro).net|lionking.org|claws-and-paws.com)>
http://www.lionking.org/~kiza/ <-- homepage
PGP-key ID 0x561D4FD2 --> /pgpkey.shtml
http://www.lionking.org/~kiza/journal/


2002-08-04 15:06:12

by Jonathan Hudson

[permalink] [raw]
Subject: Re: 2.4.19, USB_HID only works compiled in, not as module

In article <[email protected]>,
Oliver Feiler <[email protected]> writes:
OF> Hi,
OF>
OF> Since 2.4.19 a usb mouse does not work anymore if
OF>
OF> CONFIG_USB_HID=m
OF> and
OF> CONFIG_INPUT_MOUSEDEV=m
OF>
OF> is set. It only works if both are compiled into the kernel. Yes, I have set
OF> CONFIG_USB_HIDINPUT=y.
OF>
OF> I've also seen other complaints about usb mice not working in 2.4.19, I guess
OF> that's the problem?
OF>
OF> If the stuff is compiled as modules, everything seems to be fine. The kernel
OF> messages are the same, everything is detected fine. Except that 'cat
OF> /dev/input/mice' does not give any output if the driver is compiled as
OF> module.
OF>

Not so. USB Mouse works just fine here on 2.4.19.

$ lsmod
....
mousedev 4352 1
hid 14112 0 (unused)
input 3328 0 [mousedev hid]
....

CONFIG_INPUT=m
# CONFIG_INPUT_KEYBDEV is not set
CONFIG_INPUT_MOUSEDEV=m
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1280
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=1024

CONFIG_USB_HID=m
CONFIG_USB_HIDINPUT=y
# CONFIG_USB_HIDDEV is not set

'cat /dev/input/mice' (a cat and mouse game?) gives output as well.

So there appears to be no generic 2.4.19 problem.

2002-08-04 15:42:22

by Oliver Feiler

[permalink] [raw]
Subject: Re: 2.4.19, USB_HID only works compiled in, not as module

On Sunday 04 August 2002 17:07, Jonathan Hudson wrote:
>
> Not so. USB Mouse works just fine here on 2.4.19.
>
> $ lsmod
> ....
> mousedev 4352 1
> hid 14112 0 (unused)
> input 3328 0 [mousedev hid]
> ....
>
> CONFIG_INPUT=m
> # CONFIG_INPUT_KEYBDEV is not set
> CONFIG_INPUT_MOUSEDEV=m
> CONFIG_INPUT_MOUSEDEV_SCREEN_X=1280
> CONFIG_INPUT_MOUSEDEV_SCREEN_Y=1024
>
> CONFIG_USB_HID=m
> CONFIG_USB_HIDINPUT=y
> # CONFIG_USB_HIDDEV is not set
>
> 'cat /dev/input/mice' (a cat and mouse game?) gives output as well.
>
> So there appears to be no generic 2.4.19 problem.

Hm, seems so. The relevant options I used are:

CONFIG_INPUT=y
# CONFIG_INPUT_KEYBDEV is not set
CONFIG_INPUT_MOUSEDEV=m
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_JOYDEV=y
CONFIG_INPUT_EVDEV=m

CONFIG_USB=y
CONFIG_USB_DEVICEFS=y
CONFIG_USB_UHCI=y
CONFIG_USB_HID=m
CONFIG_USB_HIDINPUT=y

I don't know if it's a config problem. First I suspected CONFIG_USB_HIDINPUT
could be the problem because it's new in 2.4.19. But as I see it works for
you, so there shouldn't be a problem.

--
Oliver Feiler <kiza@(gmx(pro).net|lionking.org|claws-and-paws.com)>
http://www.lionking.org/~kiza/ <-- homepage
PGP-key ID 0x561D4FD2 --> /pgpkey.shtml
http://www.lionking.org/~kiza/journal/

2002-08-04 16:19:13

by Greg KH

[permalink] [raw]
Subject: Re: 2.4.19, USB_HID only works compiled in, not as module

On Sun, Aug 04, 2002 at 04:56:19PM +0200, Oliver Feiler wrote:
> Hi,
>
> Since 2.4.19 a usb mouse does not work anymore if
>
> CONFIG_USB_HID=m
> and
> CONFIG_INPUT_MOUSEDEV=m
>
> is set. It only works if both are compiled into the kernel. Yes, I have set
> CONFIG_USB_HIDINPUT=y.
>
> I've also seen other complaints about usb mice not working in 2.4.19, I guess
> that's the problem?
>
> If the stuff is compiled as modules, everything seems to be fine. The kernel
> messages are the same, everything is detected fine. Except that 'cat
> /dev/input/mice' does not give any output if the driver is compiled as
> module.

Are you sure the hid.o module is loaded? :)

greg k-h

2002-08-04 16:48:27

by Oliver Feiler

[permalink] [raw]
Subject: Re: 2.4.19, USB_HID only works compiled in, not as module

On Sunday 04 August 2002 18:20, Greg KH wrote:
> On Sun, Aug 04, 2002 at 04:56:19PM +0200, Oliver Feiler wrote:
> > Hi,
> >
> > Since 2.4.19 a usb mouse does not work anymore if
> >
> > CONFIG_USB_HID=m
> > and
> > CONFIG_INPUT_MOUSEDEV=m
> >
> > is set. It only works if both are compiled into the kernel. Yes, I have
> > set CONFIG_USB_HIDINPUT=y.
> >
> > I've also seen other complaints about usb mice not working in 2.4.19, I
> > guess that's the problem?
> >
> > If the stuff is compiled as modules, everything seems to be fine. The
> > kernel messages are the same, everything is detected fine. Except that
> > 'cat /dev/input/mice' does not give any output if the driver is compiled
> > as module.
>
> Are you sure the hid.o module is loaded? :)

Yes I am. ;) mousdev.o and hid.o are both loaded and the device is listed in
/proc/bus/usb/devices.

I don't know really, maybe I did indeed something wrong since it works for
others. Though I don't know what that might have been. It works now with the
driver compiled in.

Most other reports I've seen (two) were probably resolved with
CONFIG_USB_HIDINPUT.

--
Oliver Feiler <kiza@(gmx(pro).net|lionking.org|claws-and-paws.com)>
http://www.lionking.org/~kiza/ <-- homepage
PGP-key ID 0x561D4FD2 --> /pgpkey.shtml
http://www.lionking.org/~kiza/journal/

2002-08-04 21:53:03

by Brad Hards

[permalink] [raw]
Subject: Re: 2.4.19, USB_HID only works compiled in, not as module

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 5 Aug 2002 01:46, Oliver Feiler wrote:
> Hm, seems so. The relevant options I used are:
>
> CONFIG_INPUT=y
> # CONFIG_INPUT_KEYBDEV is not set
> CONFIG_INPUT_MOUSEDEV=m
> CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
> CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
> CONFIG_INPUT_JOYDEV=y
> CONFIG_INPUT_EVDEV=m
>
> CONFIG_USB=y
> CONFIG_USB_DEVICEFS=y
> CONFIG_USB_UHCI=y
> CONFIG_USB_HID=m
> CONFIG_USB_HIDINPUT=y
What other USB options do you have turned on?

What modules do you have loaded?

Vojtech: We need that /proc support for input
to help with problems like this. Any chance of merging
it in 2.4.20-pre?

Brad

- --
http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9TaHrW6pHgIdAuOMRAkkCAJ0TzvchKInmffKrFU38KUk9k9wD/ACbBKN6
MLPKbd8Gj5ld/XFFrdfEkZU=
=i/LO
-----END PGP SIGNATURE-----

2002-08-04 22:36:55

by Oliver Feiler

[permalink] [raw]
Subject: Re: 2.4.19, USB_HID only works compiled in, not as module

On Sunday 04 August 2002 23:51, you wrote:
>
> What other USB options do you have turned on?

Here's everything either modules or compiled in. Currently with the hid/mouse
stuff compiled in:
CONFIG_USB=y
CONFIG_USB_DEVICEFS=y
CONFIG_USB_UHCI=y
CONFIG_USB_STORAGE=m
CONFIG_USB_HID=y
CONFIG_USB_HIDINPUT=y
CONFIG_USB_SERIAL=m
CONFIG_USB_SERIAL_VISOR=m

This patch is applied:
http://marc.theaimsgroup.com/?l=linux-kernel&m=101735261202744

>
> What modules do you have loaded?

Mainly alsa, bttv and lm_sensors. I know, I know NVdriver. But it doesn't make
any difference without loading it.

tvmixer 3712 0
tuner 8356 1 (autoclean)
tvaudio 11200 0 (autoclean) (unused)
msp3400 14480 1 (autoclean)
bttv 67488 0
videodev 5664 3 [bttv]
i2c-algo-bit 7180 1 [bttv]
snd-mixer-oss 9152 0
snd-pcm-oss 36004 1
snd-emu10k1 56228 3
snd-pcm 49472 0 [snd-pcm-oss snd-emu10k1]
snd-timer 10432 0 [snd-pcm]
snd-hwdep 3712 0 [snd-emu10k1]
snd-rawmidi 12864 1 [snd-emu10k1]
snd-seq-device 3920 0 [snd-emu10k1 snd-rawmidi]
snd-util-mem 1232 0 [snd-emu10k1]
snd-ac97-codec 23236 0 [snd-emu10k1]
snd 25704 1 [snd-mixer-oss snd-pcm-oss snd-emu10k1
snd-pcm snd-timer snd-hwdep snd-rawmidi snd-seq-device snd-util-mem
snd-ac97-codec]
soundcore 3684 7 [tvmixer snd]
NVdriver 989184 10
usb-storage 20988 0 (unused)
analog 7488 0 (unused)
emu10k1-gp 1248 0 (unused)
gameport 1548 0 [analog emu10k1-gp]
via686a 7812 0 (unused)
i2c-proc 6368 0 [via686a]
i2c-isa 1220 0 (unused)
i2c-viapro 3848 0 (unused)
i2c-core 12960 0 [tvmixer tuner tvaudio msp3400 bttv
i2c-algo-bit via686a i2c-proc i2c-isa i2c-viapro]
nls_iso8859-1 2848 2 (autoclean)
nls_cp437 4384 2 (autoclean)
vfat 9532 2 (autoclean)
fat 29816 0 (autoclean) [vfat]


--
Oliver Feiler <kiza@(gmx(pro).net|lionking.org|claws-and-paws.com)>
http://www.lionking.org/~kiza/ <-- homepage
PGP-key ID 0x561D4FD2 --> /pgpkey.shtml
http://www.lionking.org/~kiza/journal/

2002-08-05 05:31:38

by Tyler Longren

[permalink] [raw]
Subject: Re: 2.4.19, USB_HID only works compiled in, not as module

Just to let you know, this problem isn't just happening to you.

I compiled 2.4.19 using the same config file I used for 2.4.18 (yes, I
also turned on CONFIG_USB_HIDINPUT). Needless to say, the mouse didn't
work on reboot. I saw your post and compiled everything into the
kernel, and everything worked great on reboot. So, I think this is
probably a real 2.4.19 problem. Not something specific to you.

Tyler Longren

2002-08-05 11:15:39

by Brad Hards

[permalink] [raw]
Subject: Re: 2.4.19, USB_HID only works compiled in, not as module

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 5 Aug 2002 15:34, Tyler Longren wrote:
> Just to let you know, this problem isn't just happening to you.
>
> I compiled 2.4.19 using the same config file I used for 2.4.18 (yes, I
> also turned on CONFIG_USB_HIDINPUT). Needless to say, the mouse didn't
> work on reboot. I saw your post and compiled everything into the
> kernel, and everything worked great on reboot. So, I think this is
> probably a real 2.4.19 problem. Not something specific to you.
I'm taking a look now.

Could you (and anyone else with the same problem), mail me the
lines from .config that matches CONFIG_USB for a configuration
that fails to work. Off list would be best.

Brad


- --
http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9Tl4EW6pHgIdAuOMRAoEBAJ9piHXXDBkTOld/qbnzmtDxQ7ZtAwCgjFaH
5yYd+4JaF1SgMVQXlU3EEj0=
=G+vj
-----END PGP SIGNATURE-----

2002-08-05 14:02:34

by Brad Hards

[permalink] [raw]
Subject: Re: 2.4.19, USB_HID only works compiled in, not as module

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 5 Aug 2002 21:14, Brad Hards wrote:
> On Mon, 5 Aug 2002 15:34, Tyler Longren wrote:
> > Just to let you know, this problem isn't just happening to you.
> >
> > I compiled 2.4.19 using the same config file I used for 2.4.18 (yes, I
> > also turned on CONFIG_USB_HIDINPUT). Needless to say, the mouse didn't
> > work on reboot. I saw your post and compiled everything into the
> > kernel, and everything worked great on reboot. So, I think this is
> > probably a real 2.4.19 problem. Not something specific to you.
>
> I'm taking a look now.
I can't duplicate this problem yet.

> Could you (and anyone else with the same problem), mail me the
> lines from .config that matches CONFIG_USB for a configuration
> that fails to work. Off list would be best.
One issue that did come up was the handling of the no-HIDDEV case.

Greg: I think this was one of your patches, associated with the
HIDINPUT patch. It looks like the return value is wrong. See
below.

- --- include/linux/hiddev.h.orig Mon Aug 5 23:19:54 2002
+++ include/linux/hiddev.h Mon Aug 5 23:56:34 2002
@@ -183,7 +183,7 @@
int __init hiddev_init(void);
void __exit hiddev_exit(void);
#else
- -static inline void *hiddev_connect(struct hid_device *hid) { return NULL; }
+static inline void *hiddev_connect(struct hid_device *hid) { return -1; }
static inline void hiddev_disconnect(struct hid_device *hid) { }
static inline void hiddev_hid_event(struct hid_device *hid, unsigned int usage, int value) { }
static inline int hiddev_init(void) { return 0; }

- --
http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9ToUbW6pHgIdAuOMRAvrRAJwOdrWv4FEHyW7cwMiC+CrMM/kXrgCbBHGR
Kq110ZnHc98yN4YPJJAuCIU=
=ck4u
-----END PGP SIGNATURE-----

2002-08-05 14:32:50

by K.R. Foley

[permalink] [raw]
Subject: Re: 2.4.19, USB_HID only works compiled in, not as module

I encountered a similar problem with USB except mine was kind of an
opposite issue. With USB compiled in it didn't work, with USB as a
module it did work.

for both linux-2.4.19-rc3 and linux-2.4.19-rc3-ac5 the following config
did not work (USB compiled in):

#
# USB support
#
CONFIG_USB=y
# CONFIG_USB_DEBUG is not set

#
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
# CONFIG_USB_BANDWIDTH is not set
# CONFIG_USB_LONG_TIMEOUT is not set

#
# USB Host Controller Drivers
#
# CONFIG_USB_EHCI_HCD is not set
CONFIG_USB_UHCI=m
# CONFIG_USB_UHCI_ALT is not set
# CONFIG_USB_OHCI is not set

#
# USB Device Class drivers
#
# CONFIG_USB_BLUETOOTH is not set

#
# SCSI support is needed for USB Storage
#
# CONFIG_USB_ACM is not set
# CONFIG_USB_PRINTER is not set

#
# USB Human Interface Devices (HID)
#
CONFIG_USB_HID=m
CONFIG_USB_HIDINPUT=y
# CONFIG_USB_HIDDEV is not set
# CONFIG_USB_KBD is not set
# CONFIG_USB_MOUSE is not set
# CONFIG_USB_WACOM is not set

#
# USB Imaging devices
#
# CONFIG_USB_DC2XX is not set
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_SCANNER is not set

#
# USB Multimedia devices
#

#
# Video4Linux support is needed for USB Multimedia device support
#

#
# USB Network adaptors
#
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_CATC is not set
# CONFIG_USB_CDCETHER is not set
# CONFIG_USB_USBNET is not set

#
# USB port drivers
#

#
# USB Serial Converter support
#
# CONFIG_USB_SERIAL is not set

#
# USB Miscellaneous drivers
#
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_AUERSWALD is not set
# CONFIG_USB_BRLVGER is not set

#
# Bluetooth support
#
# CONFIG_BLUEZ is not set


and for both linux-2.4.19-rc3 and linux-2.4.19-rc3-ac5 the following
config did work (USB as module):

#
# USB support
#
CONFIG_USB=m
# CONFIG_USB_DEBUG is not set

#
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
# CONFIG_USB_BANDWIDTH is not set
# CONFIG_USB_LONG_TIMEOUT is not set

#
# USB Host Controller Drivers
#
# CONFIG_USB_EHCI_HCD is not set
CONFIG_USB_UHCI=m
# CONFIG_USB_UHCI_ALT is not set
# CONFIG_USB_OHCI is not set

#
# USB Device Class drivers
#
# CONFIG_USB_BLUETOOTH is not set

#
# SCSI support is needed for USB Storage
#
# CONFIG_USB_ACM is not set
# CONFIG_USB_PRINTER is not set

#
# USB Human Interface Devices (HID)
#
CONFIG_USB_HID=m
CONFIG_USB_HIDINPUT=y
# CONFIG_USB_HIDDEV is not set
# CONFIG_USB_KBD is not set
# CONFIG_USB_MOUSE is not set
# CONFIG_USB_WACOM is not set

#
# USB Imaging devices
#
# CONFIG_USB_DC2XX is not set
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_SCANNER is not set

#
# USB Multimedia devices
#

#
# Video4Linux support is needed for USB Multimedia device support
#

#
# USB Network adaptors
#
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_CATC is not set
# CONFIG_USB_CDCETHER is not set
# CONFIG_USB_USBNET is not set

#
# USB port drivers
#

#
# USB Serial Converter support
#
# CONFIG_USB_SERIAL is not set

#
# USB Miscellaneous drivers
#
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_AUERSWALD is not set
# CONFIG_USB_BRLVGER is not set

#
# Bluetooth support
#
# CONFIG_BLUEZ is not set








2002-08-05 16:54:54

by Greg KH

[permalink] [raw]
Subject: Re: 2.4.19, USB_HID only works compiled in, not as module

On Tue, Aug 06, 2002 at 12:00:55AM +1000, Brad Hards wrote:
>
> Greg: I think this was one of your patches, associated with the
> HIDINPUT patch. It looks like the return value is wrong. See
> below.
>
> --- include/linux/hiddev.h.orig Mon Aug 5 23:19:54 2002
> +++ include/linux/hiddev.h Mon Aug 5 23:56:34 2002
> @@ -183,7 +183,7 @@
> int __init hiddev_init(void);
> void __exit hiddev_exit(void);
> #else
> -static inline void *hiddev_connect(struct hid_device *hid) { return NULL; }
> +static inline void *hiddev_connect(struct hid_device *hid) { return -1; }
> static inline void hiddev_disconnect(struct hid_device *hid) { }
> static inline void hiddev_hid_event(struct hid_device *hid, unsigned int usage, int value) { }
> static inline int hiddev_init(void) { return 0; }

??? Why return -1 as a void *?

The only caller of hiddev_connect is:
if (!hiddev_connect(hid))
hid->claimed |= HID_CLAIMED_HIDDEV;

Hm, seems like you don't want a void * there at all, but a int, right?
And as the "original" hiddev_connect returns an int, this does look like
a bug on my part, sorry. I'll go fix it.

But that doesn't explain the error people are having with the code
compiled in.

thanks,

greg k-h

2002-08-05 21:04:03

by Brad Hards

[permalink] [raw]
Subject: Re: 2.4.19, USB_HID only works compiled in, not as module

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 6 Aug 2002 02:56, Greg KH wrote:
> On Tue, Aug 06, 2002 at 12:00:55AM +1000, Brad Hards wrote:
> > Greg: I think this was one of your patches, associated with the
> > HIDINPUT patch. It looks like the return value is wrong. See
> > below.
> >
> > --- include/linux/hiddev.h.orig Mon Aug 5 23:19:54 2002
> > +++ include/linux/hiddev.h Mon Aug 5 23:56:34 2002
> > @@ -183,7 +183,7 @@
> > int __init hiddev_init(void);
> > void __exit hiddev_exit(void);
> > #else
> > -static inline void *hiddev_connect(struct hid_device *hid) { return
> > NULL; } +static inline void *hiddev_connect(struct hid_device *hid) {
> > return -1; } static inline void hiddev_disconnect(struct hid_device *hid)
> > { } static inline void hiddev_hid_event(struct hid_device *hid, unsigned
> > int usage, int value) { } static inline int hiddev_init(void) { return 0;
> > }
>
> ??? Why return -1 as a void *?
>
> The only caller of hiddev_connect is:
> if (!hiddev_connect(hid))
> hid->claimed |= HID_CLAIMED_HIDDEV;
>
> Hm, seems like you don't want a void * there at all, but a int, right?
I assume so.

> But that doesn't explain the error people are having with the code
> compiled in.
No - while doing the investigation, I noted that dmesg was showing
input0,hiddev0: USB HID v1.10 Keyboard [045e:001d] on usb2:3.0
input1,hiddev0: USB HID v1.10 Pointer [045e:001d] on usb2:3.1
input2,hiddev0: USB HID v1.00 Mouse [Logitech USB-PS/2 Mouse M-BA47] on usb2:4.0

with CONFIG_USB_HIDDEV turned off.

So I chased that down to the above conclusion.

But I still don't see the problem, and can't duplicate it.

Brad
- --
http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9TufiW6pHgIdAuOMRAojFAKCmSOjjTwcp6z7tPKeR6kaokAF71wCginFW
5/94epXIyAJlfpFGtmQqxOY=
=Ywrd
-----END PGP SIGNATURE-----

2002-08-06 05:38:05

by Tyler Longren

[permalink] [raw]
Subject: Re: 2.4.19, USB_HID only works compiled in, not as module

Could this be a problem with my chipset (Via)? I'm on an Abit VP6
motherboard. I'm actually suprised I haven't had problems with ide in
2.4.19 (the hpt controller and via).

Below is the usb stuff from lspci -v:
00:07.2 USB Controller: VIA Technologies, Inc. USB (rev 16) (prog-if 00
[UHCI])
Subsystem: VIA Technologies, Inc. (Wrong ID) USB Controller
Flags: bus master, medium devsel, latency 32, IRQ 12
I/O ports at d400 [size=32]
Capabilities: [80] Power Management version 2

00:07.3 USB Controller: VIA Technologies, Inc. USB (rev 16) (prog-if 00
[UHCI])
Subsystem: VIA Technologies, Inc. (Wrong ID) USB Controller
Flags: bus master, medium devsel, latency 32, IRQ 12
I/O ports at d800 [size=32]
Capabilities: [80] Power Management version 2
On Tue, 6 Aug 2002 07:02:22 +1000

tyler

Brad Hards <[email protected]> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Tue, 6 Aug 2002 02:56, Greg KH wrote:
> > On Tue, Aug 06, 2002 at 12:00:55AM +1000, Brad Hards wrote:
> > > Greg: I think this was one of your patches, associated with the
> > > HIDINPUT patch. It looks like the return value is wrong. See
> > > below.
> > >
> > > --- include/linux/hiddev.h.orig Mon Aug 5 23:19:54 2002
> > > +++ include/linux/hiddev.h Mon Aug 5 23:56:34 2002
> > > @@ -183,7 +183,7 @@
> > > int __init hiddev_init(void);
> > > void __exit hiddev_exit(void);
> > > #else
> > > -static inline void *hiddev_connect(struct hid_device *hid) {
> > > return NULL; } +static inline void *hiddev_connect(struct
> > > hid_device *hid) { return -1; } static inline void
> > > hiddev_disconnect(struct hid_device *hid){ } static inline void
> > > hiddev_hid_event(struct hid_device *hid, unsigned int usage, int
> > > value) { } static inline int hiddev_init(void) { return 0;}
> >
> > ??? Why return -1 as a void *?
> >
> > The only caller of hiddev_connect is:
> > if (!hiddev_connect(hid))
> > hid->claimed |= HID_CLAIMED_HIDDEV;
> >
> > Hm, seems like you don't want a void * there at all, but a int,
> > right?
> I assume so.
>
> > But that doesn't explain the error people are having with the code
> > compiled in.
> No - while doing the investigation, I noted that dmesg was showing
> input0,hiddev0: USB HID v1.10 Keyboard [045e:001d] on usb2:3.0
> input1,hiddev0: USB HID v1.10 Pointer [045e:001d] on usb2:3.1
> input2,hiddev0: USB HID v1.00 Mouse [Logitech USB-PS/2 Mouse M-BA47]
> on usb2:4.0
>
> with CONFIG_USB_HIDDEV turned off.
>
> So I chased that down to the above conclusion.
>
> But I still don't see the problem, and can't duplicate it.
>
> Brad
> - --
> http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in
> Black.-----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
>
> iD8DBQE9TufiW6pHgIdAuOMRAojFAKCmSOjjTwcp6z7tPKeR6kaokAF71wCginFW
> 5/94epXIyAJlfpFGtmQqxOY=
> =Ywrd
> -----END PGP SIGNATURE-----
>
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-kernel" in the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

2002-08-07 10:45:58

by Oliver Feiler

[permalink] [raw]
Subject: Re: 2.4.19, USB_HID only works compiled in, not as module

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello all,

I have another addition to this thread. I found the same problem happening to
my analog joystick. It's connected with a SBLive gameport. Compiling the
driver into the kernel (or using 2.4.18 with the driver as module) gives:

gameport0: Emu10k1 Gameport at 0xd000 size 8 speed 1242 kHz
input0: Analog 3-axis 4-button joystick at gameport0.0 [TSC timer, 898 MHz
clock, 832 ns res]

Compiling this driver as a module with 2.4.19:

analog.c: Unknown joystick device found (data=0x2, gameport0), probably n
ot analog joystick.

So maybe the hid mouse problem is not withing the USB code, but somewhere
else?

- -Oliver

- --
Oliver Feiler <kiza@(gmx(pro).net|lionking.org|claws-and-paws.com)>
http://www.lionking.org/~kiza/ <-- homepage
PGP-key ID 0x561D4FD2 --> /pgpkey.shtml
http://www.lionking.org/~kiza/journal/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9UPuEOpifZVYdT9IRAljnAJ9HiUvxhxlMCn57GUzIMAiJuKX31ACeKDeO
UtsuM3T23F5hXUCvPGANoBE=
=3pMD
-----END PGP SIGNATURE-----

2002-08-07 22:26:23

by Brad Hards

[permalink] [raw]
Subject: Re: 2.4.19, USB_HID only works compiled in, not as module

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 7 Aug 2002 20:50, Oliver Feiler wrote:
> Hello all,
>
> I have another addition to this thread. I found the same problem happening
> to my analog joystick. It's connected with a SBLive gameport. Compiling the
> driver into the kernel (or using 2.4.18 with the driver as module) gives:
<snip>
> So maybe the hid mouse problem is not withing the USB code, but somewhere
> else?
Maybe input layer changes.

Can you send the CONFIG_USB and CONFIG_INPUT entries for a working
case and a non-working case?

- --
http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9UZ4xW6pHgIdAuOMRAgFOAKCSI1qYFnkmZCsMvI5aitWBEd0TnwCbBXnv
gDvtFhjclPF3DwGllA6L7zQ=
=3taw
-----END PGP SIGNATURE-----

2002-08-07 22:47:00

by Oliver Feiler

[permalink] [raw]
Subject: Re: 2.4.19, USB_HID only works compiled in, not as module

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 08 August 2002 00:24, Brad Hards wrote:
> On Wed, 7 Aug 2002 20:50, Oliver Feiler wrote:
> > Hello all,
> >
> > I have another addition to this thread. I found the same problem
> > happening to my analog joystick. It's connected with a SBLive gameport.
> > Compiling the driver into the kernel (or using 2.4.18 with the driver as
> > module) gives:
>
> <snip>
>
> > So maybe the hid mouse problem is not withing the USB code, but somewhere
> > else?
>
> Maybe input layer changes.

That would explain both problems, hm?

>
> Can you send the CONFIG_USB and CONFIG_INPUT entries for a working
> case and a non-working case?

The joystick problem doesn't have to do anything with USB, it's a standard
analog minimalistic device. :)

Here is the requested part of .config of a working (and non working) joystick.
The only differences are the lines below:

diff not-working working
- -CONFIG_INPUT_GAMEPORT=m
+CONFIG_INPUT_GAMEPORT=y
- -CONFIG_INPUT_EMU10K1=m
+CONFIG_INPUT_EMU10K1=y
- -CONFIG_INPUT_ANALOG=m
+CONFIG_INPUT_ANALOG=y

Analog joystick working config:
CONFIG_INPUT=y
# CONFIG_INPUT_KEYBDEV is not set
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_JOYDEV=y
CONFIG_INPUT_EVDEV=m
CONFIG_INPUT_GAMEPORT=y
# CONFIG_INPUT_NS558 is not set
# CONFIG_INPUT_LIGHTNING is not set
# CONFIG_INPUT_PCIGAME is not set
# CONFIG_INPUT_CS461X is not set
CONFIG_INPUT_EMU10K1=y
# CONFIG_INPUT_SERIO is not set
# CONFIG_INPUT_SERPORT is not set
CONFIG_INPUT_ANALOG=y
# CONFIG_INPUT_A3D is not set
# CONFIG_INPUT_ADI is not set
# CONFIG_INPUT_COBRA is not set
# CONFIG_INPUT_GF2K is not set
# CONFIG_INPUT_GRIP is not set
# CONFIG_INPUT_INTERACT is not set
# CONFIG_INPUT_TMDC is not set
# CONFIG_INPUT_SIDEWINDER is not set
# CONFIG_INPUT_IFORCE_USB is not set
# CONFIG_INPUT_IFORCE_232 is not set
# CONFIG_INPUT_WARRIOR is not set
# CONFIG_INPUT_MAGELLAN is not set
# CONFIG_INPUT_SPACEORB is not set
# CONFIG_INPUT_SPACEBALL is not set
# CONFIG_INPUT_STINGER is not set
# CONFIG_INPUT_DB9 is not set
# CONFIG_INPUT_GAMECON is not set
# CONFIG_INPUT_TURBOGRAFX is not set

CONFIG_USB=y
# CONFIG_USB_DEBUG is not set
CONFIG_USB_DEVICEFS=y
# CONFIG_USB_BANDWIDTH is not set
# CONFIG_USB_LONG_TIMEOUT is not set
# CONFIG_USB_EHCI_HCD is not set
CONFIG_USB_UHCI=y
# CONFIG_USB_UHCI_ALT is not set
# CONFIG_USB_OHCI is not set
# CONFIG_USB_AUDIO is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_BLUETOOTH is not set
CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_DPCM is not set
# CONFIG_USB_STORAGE_HP8200e is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_ACM is not set
# CONFIG_USB_PRINTER is not set
CONFIG_USB_HID=y
CONFIG_USB_HIDINPUT=y
# CONFIG_USB_HIDDEV is not set
# CONFIG_USB_WACOM is not set
# CONFIG_USB_DC2XX is not set
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_SCANNER is not set
# CONFIG_USB_MICROTEK is not set
# CONFIG_USB_HPUSBSCSI is not set
# CONFIG_USB_IBMCAM is not set
# CONFIG_USB_OV511 is not set
# CONFIG_USB_PWC is not set
# CONFIG_USB_SE401 is not set
# CONFIG_USB_STV680 is not set
# CONFIG_USB_VICAM is not set
# CONFIG_USB_DSBR is not set
# CONFIG_USB_DABUSB is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_CATC is not set
# CONFIG_USB_CDCETHER is not set
# CONFIG_USB_USBNET is not set
# CONFIG_USB_USS720 is not set
CONFIG_USB_SERIAL=m
# CONFIG_USB_SERIAL_GENERIC is not set
# CONFIG_USB_SERIAL_BELKIN is not set
# CONFIG_USB_SERIAL_WHITEHEAT is not set
# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
# CONFIG_USB_SERIAL_EMPEG is not set
# CONFIG_USB_SERIAL_FTDI_SIO is not set
CONFIG_USB_SERIAL_VISOR=m
# CONFIG_USB_SERIAL_IPAQ is not set
# CONFIG_USB_SERIAL_IR is not set
# CONFIG_USB_SERIAL_EDGEPORT is not set
# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
# CONFIG_USB_SERIAL_KEYSPAN is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
# CONFIG_USB_SERIAL_MCT_U232 is not set
# CONFIG_USB_SERIAL_KLSI is not set
# CONFIG_USB_SERIAL_PL2303 is not set
# CONFIG_USB_SERIAL_CYBERJACK is not set
# CONFIG_USB_SERIAL_XIRCOM is not set
# CONFIG_USB_SERIAL_OMNINET is not set
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_AUERSWALD is not set
# CONFIG_USB_BRLVGER is not set


Analog joystick non working config:
CONFIG_INPUT=y
# CONFIG_INPUT_KEYBDEV is not set
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_JOYDEV=y
CONFIG_INPUT_EVDEV=m
CONFIG_INPUT_GAMEPORT=m
# CONFIG_INPUT_NS558 is not set
# CONFIG_INPUT_LIGHTNING is not set
# CONFIG_INPUT_PCIGAME is not set
# CONFIG_INPUT_CS461X is not set
CONFIG_INPUT_EMU10K1=m
# CONFIG_INPUT_SERIO is not set
# CONFIG_INPUT_SERPORT is not set
CONFIG_INPUT_ANALOG=m
# CONFIG_INPUT_A3D is not set
# CONFIG_INPUT_ADI is not set
# CONFIG_INPUT_COBRA is not set
# CONFIG_INPUT_GF2K is not set
# CONFIG_INPUT_GRIP is not set
# CONFIG_INPUT_INTERACT is not set
# CONFIG_INPUT_TMDC is not set
# CONFIG_INPUT_SIDEWINDER is not set
# CONFIG_INPUT_IFORCE_USB is not set
# CONFIG_INPUT_IFORCE_232 is not set
# CONFIG_INPUT_WARRIOR is not set
# CONFIG_INPUT_MAGELLAN is not set
# CONFIG_INPUT_SPACEORB is not set
# CONFIG_INPUT_SPACEBALL is not set
# CONFIG_INPUT_STINGER is not set
# CONFIG_INPUT_DB9 is not set
# CONFIG_INPUT_GAMECON is not set
# CONFIG_INPUT_TURBOGRAFX is not set

CONFIG_USB=y
# CONFIG_USB_DEBUG is not set
CONFIG_USB_DEVICEFS=y
# CONFIG_USB_BANDWIDTH is not set
# CONFIG_USB_LONG_TIMEOUT is not set
# CONFIG_USB_EHCI_HCD is not set
CONFIG_USB_UHCI=y
# CONFIG_USB_UHCI_ALT is not set
# CONFIG_USB_OHCI is not set
# CONFIG_USB_AUDIO is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_BLUETOOTH is not set
CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_DPCM is not set
# CONFIG_USB_STORAGE_HP8200e is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_ACM is not set
# CONFIG_USB_PRINTER is not set
CONFIG_USB_HID=y
CONFIG_USB_HIDINPUT=y
# CONFIG_USB_HIDDEV is not set
# CONFIG_USB_WACOM is not set
# CONFIG_USB_DC2XX is not set
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_SCANNER is not set
# CONFIG_USB_MICROTEK is not set
# CONFIG_USB_HPUSBSCSI is not set
# CONFIG_USB_IBMCAM is not set
# CONFIG_USB_OV511 is not set
# CONFIG_USB_PWC is not set
# CONFIG_USB_SE401 is not set
# CONFIG_USB_STV680 is not set
# CONFIG_USB_VICAM is not set
# CONFIG_USB_DSBR is not set
# CONFIG_USB_DABUSB is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_CATC is not set
# CONFIG_USB_CDCETHER is not set
# CONFIG_USB_USBNET is not set
# CONFIG_USB_USS720 is not set
CONFIG_USB_SERIAL=m
# CONFIG_USB_SERIAL_GENERIC is not set
# CONFIG_USB_SERIAL_BELKIN is not set
# CONFIG_USB_SERIAL_WHITEHEAT is not set
# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
# CONFIG_USB_SERIAL_EMPEG is not set
# CONFIG_USB_SERIAL_FTDI_SIO is not set
CONFIG_USB_SERIAL_VISOR=m
# CONFIG_USB_SERIAL_IPAQ is not set
# CONFIG_USB_SERIAL_IR is not set
# CONFIG_USB_SERIAL_EDGEPORT is not set
# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
# CONFIG_USB_SERIAL_KEYSPAN is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
# CONFIG_USB_SERIAL_MCT_U232 is not set
# CONFIG_USB_SERIAL_KLSI is not set
# CONFIG_USB_SERIAL_PL2303 is not set
# CONFIG_USB_SERIAL_CYBERJACK is not set
# CONFIG_USB_SERIAL_XIRCOM is not set
# CONFIG_USB_SERIAL_OMNINET is not set
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_AUERSWALD is not set
# CONFIG_USB_BRLVGER is not set


- --
Oliver Feiler <kiza@(gmx(pro).net|lionking.org|claws-and-paws.com)>
http://www.lionking.org/~kiza/ <-- homepage
PGP-key ID 0x561D4FD2 --> /pgpkey.shtml
http://www.lionking.org/~kiza/journal/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9UaSDOpifZVYdT9IRAjvAAKCKMpJ/bIBWtAVosY1RXzQPp2tsNgCgn6hP
486geKPQ9ji+eJoczNT7FQU=
=QbHh
-----END PGP SIGNATURE-----

2002-08-18 12:49:04

by Vojtech Pavlik

[permalink] [raw]
Subject: Re: 2.4.19, USB_HID only works compiled in, not as module

On Mon, Aug 05, 2002 at 07:51:34AM +1000, Brad Hards wrote:

> Hash: SHA1
>
> On Mon, 5 Aug 2002 01:46, Oliver Feiler wrote:
> > Hm, seems so. The relevant options I used are:
> >
> > CONFIG_INPUT=y
> > # CONFIG_INPUT_KEYBDEV is not set
> > CONFIG_INPUT_MOUSEDEV=m
> > CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
> > CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
> > CONFIG_INPUT_JOYDEV=y
> > CONFIG_INPUT_EVDEV=m
> >
> > CONFIG_USB=y
> > CONFIG_USB_DEVICEFS=y
> > CONFIG_USB_UHCI=y
> > CONFIG_USB_HID=m
> > CONFIG_USB_HIDINPUT=y
> What other USB options do you have turned on?
>
> What modules do you have loaded?
>
> Vojtech: We need that /proc support for input
> to help with problems like this. Any chance of merging
> it in 2.4.20-pre?

I'll try.

--
Vojtech Pavlik
SuSE Labs