[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [coldsync-hackers] Re: Problem respawning coldsync daemon
On Mon, 2002-03-04 at 14:21, Greg KH wrote:
> On Mon, Mar 04, 2002 at 10:04:37AM +1100, Andrew Bainbridge-Smith wrote:
> > The process happens like this:
> > 1. Press hotsync button on cradle: this triggers the kernel to hotplug
> > in the various kernel modules (visor.o, m500.o etc)
>
> There is no m500 module, the visor module handles all Palm OS devices.
Ok, I was going off my memory of the syslog which reports M500, so I
support that is visor.o reporting its personality in syslog.
>
> > 2. Coldsync does it hotsyncing stuff
> > 3. Call to Palm to finish communications as a part of the shutdown
> > procedure.
> > 4. Palm cradle triggers the kernel to hot-unplug the various kernel
> > modules, occurs at some asynchronus time.
>
> No, the modules do not ever get unloaded. The device disconnects itself
> from the USB bus, and then /sbin/hotplug gets called with a USB REMOVE
> event.
Arr..., ok. But the rest of my statements are correct in terms of the
impact of the USB REMOVE event. ie. the pconn->fd points to a device
that either no longer exists or is about to disappear --- so we should
be more careful (ie. don't call tcdrain()).
>
> > A second point. It occured to me that it may be possible to use this
> > hotplugging facility in a much better way. I understand that when a
> > device is hotplugged it can call a script, perhaps this script could
> > then call coldsync to do its stuff. With this approach one doesn't need
> > to run coldsync as a daemon (avoiding a process running which has to
> > continually poll the USB).
>
> Here's a nice small replacement for /sbin/hotplug that will do just
> that, syncing a visor with coldsync:
> http://www.kroah.com/linux/hotplug/ols_2001_hotplug_talk/html/mgp00013.html
>
> So yes, it is quite easy to do this :)
Excellent. Though I think a few changes to coldsync may still be in
order so that the script doesn't have to have the USER hardwired, which
is no good for site with multiple palms (this doesn't apply to me) ---
yes I can see that it call with -md, but that doesn't seem quite right.
I was thinking that the standalone and daemon modes could be rolled
together and maybe a proper(?) daemon mode (for those without hotplug!)
could be created. A thought at this point, obviously needs a bit more
thinking about the implications etc.
Andrew
--
Dr Andrew Bainbridge-Smith
Senior Research Engineer
Machine Vision Group
CSIRO Manufacturing Science and Technology
Australia
--
This message was sent through the coldsync-hackers mailing list. To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body. For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.