Thanks for the tips. By trying to avoid thinking about UNIX when I'm on Plan 9 
I forgot that some userspace utilities are the same :)

> No, the existence of '#u' just shows that the kernel usb driver exists
> and a usb interface has been found.  The user-level usbd program is
> needed in order to connect and enumerate any devices.  You can use
> the ps(1) command to see whether usbd is running.
> 
>       term% ps|grep usbd
>       miller            5    0:06   4:02      492K Sleep    usbd
>       miller            7    0:05   0:15      492K Pread    usbd
>       miller            8    0:00   0:00      492K Pread    usbd
>       miller            9    0:00   0:00      492K Rendez   usbd
>       miller           10    0:00   0:00      492K Rendez   usbd
>       miller           68    0:00   0:00      492K Rendez   usbd

There is one instance of usbd appearing at the output of ps

> 
> You said you had seen the error message 'no hubs' when starting usb/usbd.
> It's often useful to explore the source code to find more information
> about an error message:
> 
>       term% src -n usb/usbd
>       /sys/src/cmd/usb/usbd/usbd.c:809
>       term% grep 'no hubs' /sys/src/cmd/usb/usbd/*.c
>       /sys/src/cmd/usb/usbd/usbd.c:                   sysfatal("/dev/usb: no 
> hubs");
> 
> Sysfatal exits after printing a message, so that explains why usbd is
> not running, and therefore isn't providing the /srv/usb service.

Thanks, the src command (together with sig) rocks. Yes, the code reaches the 
sysfatal part and exits. But then I'm wondering how usbd is shown on the ps 
output?

> 
> To look for more clues about what's going wrong:
> 
> - try 'ls -d /dev/usb' to see if '#u' is bound in /dev

Assuming that I'm getting some output how can I know if it is correct? Are 
there any userspace commands to see what is bound where? bind doesn't seem to 
support listings, only namespace modifications.

> - try 'cat /dev/usb/ctl' to see what the state of your usb interfaces is

The file is empty

> - look in /dev/kmesg to see if there are any boot-time error messages
>   relating to usb

Same message here: `/boot:usbd: /dev/usb: no hubs'

Perhaps it's time to look at the source code of usbd? :)

Reply via email to