[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [coldsync-hackers] New snapshot: 2.2.0



On Tue, 7 Aug 2001, Mike Durian wrote:
> On Mon, 30 Jul 2001 23:44:05 EDT, Andrew Arensburger <arensb+CShackers@ooblick.com> wrote:
> >	I've uploaded a new ColdSync snapshot, version 2.2.0:
>
> I finally found the time to give this a shot.  It doesn't work
> any better for me that my previous (bounced) diffs.

	Bugger. Have you tried it with
		protocol: net;
in the listen{} block?

> Though I like the new protocol specification changes, I still think
> there's too much co-mingling of FreeBSD specific USB code and
> communication protocol in PConnection_usb.c.  I think this will
> cause problems if we ever try to port to another OS that
> does real USB (as opposed to the Linux USB/Serial method) differently
> than FreeBSD.  I think it also obscures the separation between
> the USB stuff (locating an endpoint) and the different communication
> protocol handling (padp_tini, etc.).

	Currently, the USB code is in a degenerate state, since there's
only one architecture that really supports USB (in the sense that you have
to look for endpoints etc.).
	DU (aka Tru64) appears to support USB, but I haven't found any
documentation for it. I'm hoping to play around with USB under Solaris at
some point, but don't have a suitable machine available.
	At any rate, when I get a chance to add non-NetBSD USB support,
what'll happen is that I'll try to abstract the BSD-specific system calls
from the USB-specific handling. That is, I assume that with all USB
implementations, you'll need to get the manufacturer and device info, find
the proper endpoint, etc., so that'll stay in libpconn/PConnection_usb.c .
However, it's only under *BSD that you'll use
	ioctl(int fd, USB_GET_DEVICEINFO, struct usb_device_info *udi);
so that'll have to be moved to PConnection_usb_bsd.c or some such.

	Where we disagreed earlier, I think, was on the level of
abstraction. If I read you correctly, you had modified PConnection_usb.c
in such a way as to present the same API for USB under BSD, and USB under
Linux. I didn't think it was a good thing to try to shoehorn a serial
interface and a USB interface to work the same way.
	If you say, "Linux users plug their Visors into the USB port, so
they should be able to use `listen usb { ... }' in .coldsyncrc ," I'll
agree with that. I just think there are better ways of doing this (e.g.,
by making "serial" and "usb" synonymous under Linux).

> The protocol switch statement works well for the initialization,
> but there are many exit paths in the function that are hard-coded
> to only unwind the full/default stack.  I've marked them

	Oops! (What was that line, again? Something about "Given enough
eyeballs, all bugs are shallow"?)

> I've also made a couple trivial changes:

	Thanks.

-- 
Andrew Arensburger                      Actually, these _do_ represent the
arensb@ooblick.com                      opinions of ooblick.com!
                        Generic Tagline V 6.01

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.