/etc/modules.conf and USB

From: Frank van Maarseveen (F.vanMaarseveen@inter.NL.net)
Date: Thu Jun 15 2000 - 17:37:50 EST


Kernel 2.4.0-test1-ac15

I don't seem to succeed in figuring out the correct
module setup for USB. /etc/modules.conf:

alias char-major-180 printer

Problem: the only way to get printing to work is
to manually "modprobe uhci" _after_ module "printer" has been loaded.

I hoped that by using a trick this could be done the other way around:
by mounting usbdevfs at system start because this loads uhci.
Modules.conf:
        alias usbdevfs uhci
/etc/fstab:
        none /proc/bus/usb usbdevfs defaults 0 0

(I'm _not_ happy with this mount but http://linuxusbguide.sourceforge.net
says it is highly recommended for debugging)
However, with this setup "uhci" et.al. sees no printer driver and decides
to disable printer support (or something). /var/log/messages:

kernel: usb.c: registered new driver usbdevfs
kernel: usb.c: registered new driver hub
kernel: uhci.c: USB UHCI at I/O 0xe000, IRQ 9
kernel: uhci.c: detected 2 ports
kernel: usb.c: new USB bus registered, assigned bus number 1
kernel: usb.c: USB new device connect, assigned device number 1
kernel: Product: USB UHCI-alt Root Hub
kernel: SerialNumber: e000
kernel: hub.c: USB hub found
kernel: hub.c: 2 ports detected
kernel: usb.c: USB new device connect, assigned device number 2
kernel: Manufacturer: EPSON
kernel: Product: USB Printer
kernel: usb.c: This device is not recognized by any installed USB driver.
kernel: Length = 18
kernel: DescriptorType = 01
kernel: USB version = 1.00
kernel: Vendor:Product = 04b8:0001
kernel: MaxPacketSize0 = 64
kernel: NumConfigurations = 1
kernel: Device version = 1.00
kernel: Device Class:SubClass:Protocol = 07:01:02
kernel: Printer device class
kernel: Configuration:
kernel: bLength = 9
kernel: bDescriptorType = 02
kernel: wTotalLength = 0020
kernel: bNumInterfaces = 01
kernel: bConfigurationValue = 01
kernel: iConfiguration = 00
kernel: bmAttributes = 40
kernel: MaxPower = 2mA
kernel:
kernel: Interface: 0
kernel: Alternate Setting: 0
kernel: bLength = 9
kernel: bDescriptorType = 04
kernel: bInterfaceNumber = 00
kernel: bAlternateSetting = 00
kernel: bNumEndpoints = 02
kernel: bInterface Class:SubClass:Protocol = 07:01:02
kernel: iInterface = 00
kernel: Endpoint:
kernel: bLength = 7
kernel: bDescriptorType = 05
kernel: bEndpointAddress = 01 (out)
kernel: bmAttributes = 02 (Bulk)
kernel: wMaxPacketSize = 0040
kernel: bInterval = 00
kernel: Endpoint:
kernel: bLength = 7
kernel: bDescriptorType = 05
kernel: bEndpointAddress = 82 (in)
kernel: bmAttributes = 02 (Bulk)
kernel: wMaxPacketSize = 0040
kernel: bInterval = 00

module "printer" however, only depends on "usbcore" and not on "uhci" (but won't
function without: ENODEV). Another thing: the command "modprobe -r printer"
is very slow when no "uhci" has been loaded in which case /var/log/messages says:

Jun 16 00:22:25 iapetus kernel: hub.c: giving up on killing khubd
Jun 16 00:22:25 iapetus kernel: usb.c: deregistering driver hub

By the way, printing does work when the modules have been loaded by
hand in the right order, great work!

-- 
Frank

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:36 EST