Re: Where should devctl notifications be sent from?

From: M. Warner Losh (imp_at_bsdimp.com)
Date: 03/28/04

  • Next message: Alexey Zelkin: "CFD: XMLification of NOTES"
    Date: Sun, 28 Mar 2004 01:14:18 -0700 (MST)
    To: nik@freebsd.org
    
    

    In message: <20040327085537.GC33016@clan.nothing-going-on.org>
                Nik Clayton <nik@freebsd.org> writes:
    : The specific problem I'm trying to solve involves an iPod connected
    : through firewire. I'd like to be able to have devd be notified when the
    : iPod arrives, so that various processes can kick off automatically. In
    : an ideal world, I'll drop the iPod in the dock, and some backup
    : processes start, thereby allowing me to justify the purchase of a model
    : several sizes larger than I actually need :-)
    :
    : It looks like there are several places where the devctl_queue_data() and
    : related calls could be placed:
    :
    : firewire(4) -- when the device is plugged in
    : fwohci(4) -- when the interface arrives
    : sbp(4) -- when it's recognised as a mass storage device

    These are all inapprorpiate. The devctl_queue_data is already called
    from the bus level for these device. Either there is a driver, in
    which case a driver added is called, or there isn't, in which case the
    no driver routine is called.

    : geom(4) -- when geom creates the device (/dev/da2 (and da2s2) in my
    : case). Robert Watson has a patch that implements this.

    These patches need some more work. We need to get closure on how to
    do notifications in different name spaces and Robert and I are working
    on that. This is likely the most appropriate place to deal in the
    short term, however.

    : devfs -- specifically, in make_dev(9) and destroy_dev(9)

    This is clearly wrong. devd will soon grow the ability to do actions
    based on files appearing in a directory tree. Since /dev is a
    directory tree, that will be a more appropriate way of dealing. devd
    does not know about dev_t things from the devctl interface, nor should
    it in my opinion. However, the tree stuff should be sufficiently
    general to do what you need (and may obviate the need for robert's
    patches, since geom name space is a subset of dev by convention).

    : The limited research that I've done suggests that the most generic place
    : to put this code is inside make_dev(9) and destroy_dev(9). But this
    : seems so trivial that I can't believe no one else hasn't done the work,
    : so I figure there's probably something important that I'm missing.

    That's because most people have been able to make the device (as
    opposed to the /dev entry) added work.

    Warner

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


  • Next message: Alexey Zelkin: "CFD: XMLification of NOTES"

    Relevant Pages

    • Re: Where should devctl notifications be sent from?
      ... :>: through firewire. ... :>: iPod arrives, so that various processes can kick off automatically. ... :> which case a driver added is called, or there isn't, in which case the ... Only if devd is not running. ...
      (freebsd-arch)
    • >>>>>> IPOD DRIVERS <<<<<<
      ... ipod driver for windows vista ... ipod nano driver for windows xp ... ipod usb driver without itunes ...
      (sci.electronics.basics)
    • Re: Where should devctl notifications be sent from?
      ... I'd like to be able to have devd be notified when the ... iPod arrives, so that various processes can kick off automatically. ... so the firewire driver's doing the right thing as ... device notifications, and directories for other events. ...
      (freebsd-arch)
    • Re: Accessing an iPod from Windows
      ... HFS-formatted iPod. ... No - you would need something at the driver level to cope with a different ... yes it is lowest common denominator. ... actually I play in full random almost all the time. ...
      (uk.comp.sys.mac)
    • Re: USB mass storage driver?
      ... Install the driver for your ipod from here. ... but who knows what is safe anymore on free downloads. ... RAM Type: SDRAM ...
      (microsoft.public.windowsxp.help_and_support)