Re: How to determine link of umass/da devices

From: M. Warner Losh (imp_at_bsdimp.com)
Date: 10/19/05

  • Next message: Marco Molteni: "Re: rc scripts: how to start a process that doesn't daemonize itself?"
    Date: Wed, 19 Oct 2005 09:38:08 -0600 (MDT)
    To: alsbergt@cs.huji.ac.il
    
    

    In message: <20051017143356.GA12188@zoopee.org>
                Tom Alsberg <alsbergt@cs.huji.ac.il> writes:
    : With tools like usbdevs and sysctl, I can find out what USB devices
    : are connected, and also what USB drivers handle them (so I can see,
    : for example, that there is a SanDisk Cruzer Micro connected to port 2
    : in bus 3 and the umass driver under it).

    You can find this out best via the devinfo interface.

    : I can also find out what da devices there are using camcontrol.

    Right. cam doesn't hook the da devices into the device tree.

    : However, how can I find out which da device was assigned to which
    : umass/usb device?

    Generally, you can't. There's not really an interface to get this
    information. devinfo assumes that things like disk drives would be in
    the device tree and except for cam, all other drivers conform to this
    world view. There's some efforts to update and lock cam which I think
    will rectify this.

    : I see this info in some inconvenient form in
    : dmesg. But I need something easier to handle programmatically to
    : write a program that uses that data. I prefer not to resort to some
    : ugly hack like trying to parse dmesg.

    Especially since dmesg can disapper quickly on some systems.

    : Also, I'd be interested if it were possible to have my program
    : informed when devices are connected/disconnected. Can a process ask
    : usbd to send it some signal and somehow provide the details of the
    : event when a device is connected/disconnected?

    devd provides a pipe of all events from the kernel in
    /var/run/devd.pipe.

    Warner
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  • Next message: Marco Molteni: "Re: rc scripts: how to start a process that doesn't daemonize itself?"

    Relevant Pages

    • Re: USB devices slow boot time of Windows XP Professional
      ... I found that the pc would take excessive time between the text boot ... of windows xp and the gui during the inialization of the usb devices only ... Then when in windows the mouse wouldnt ... the standard hid compliant drivers. ...
      (microsoft.public.windowsxp.hardware)
    • Re: USB communications problem
      ... I have two USB devices and the manufacturers provided drivers (including ... And just what are these two USB devices? ... Dear GHalleck, my software was written by LabVIEW, using Call Function Node ...
      (microsoft.public.windowsxp.hardware)
    • Re: MPSAFE CAM?
      ... > is any progress in making CAM (and the individual card drivers) MPSAFE? ... > FreeBSD is mainly used for servers, where SCSI is pretty common. ... > seems like locking down CAM would be beneficial to a large number of FreeBSD ...
      (freebsd-arch)
    • Re: How to: multi device on USB
      ... A function has one active interface at a time while a composite device has more than one function, each of which can have multiple interfaces. ... If your device is designed correctly you support it with two separate device drivers, each independently managing their own functions. ... See the ddk docs for composite usb devices. ...
      (microsoft.public.development.device.drivers)
    • Re: Restricting access to USB devices
      ... why control audio and HID? ... > We have two requirements in our project, it is related to USB devices ... > Remove the class drivers of the classes of devices to be blocked. ... Human Interface Device Class. ...
      (microsoft.public.win32.programmer.kernel)