Subject: Re: Problems with utoppy(4) and utoppya(1)
To: Martti Kuparinen <martti.kuparinen@iki.fi>
From: Steve Woodford <scw@netbsd.org>
List: current-users
Date: 04/09/2006 09:38:26
--Boundary-00=_CgMOEESIxHtRNJx
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Saturday 08 April 2006 13:51, Martti Kuparinen wrote:

> I'm having big problems with the new utoppy(4) device. I have
> Topfield 5100PVR (terrestial) with Mar-15-2006 firmware.
[snip]
> So I was able to get the full listing from the DataFiles directory.
> However, I'm not able to get or put any large files.
>
> # utoppya get DataFiles/Soluttautujat.rec
> utoppya: ioctl(UTOPPYIOREADFILE, DataFiles/Soluttautujat.rec):
> Input/output error
>
> Small files seem to work.

Two things come to mind:

 - I developed the code using my TF5800PVR, so perhaps there are
   slight protocol differences/tolerances between mine and your
   TF5100PVR.
 - The Toppy is notoriously fickle when it comes to USB cable
   quality. Have you tried the same host and cable combination under
   Altair?

Could you apply the attached patch to sys/dev/usb/utoppy.c? It'll enable 
a whole bunch of instrumentation within the driver, the output of which 
may shed some light on why longer transfers are failing.

Cheers, Steve

--Boundary-00=_CgMOEESIxHtRNJx
Content-Type: text/x-diff;
  charset="iso-8859-1";
  name="utoppy-debug.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="utoppy-debug.diff"

Index: utoppy.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/utoppy.c,v
retrieving revision 1.1
diff -u -r1.1 utoppy.c
--- utoppy.c	3 Apr 2006 08:15:48 -0000	1.1
+++ utoppy.c	9 Apr 2006 08:35:57 -0000
@@ -58,7 +58,7 @@
 #include <dev/usb/usb_quirks.h>
 #include <dev/usb/utoppy.h>
 
-#undef UTOPPY_DEBUG
+#define UTOPPY_DEBUG
 #ifdef UTOPPY_DEBUG
 #define	UTOPPY_DBG_OPEN		0x0001
 #define	UTOPPY_DBG_CLOSE	0x0002
@@ -75,7 +75,7 @@
 			if (utoppy_debug & l)	\
 				printf m;	\
 		} while (/*CONSTCOND*/0)
-static int utoppy_debug = 0;
+static int utoppy_debug = ~0;
 static void utoppy_dump_packet(const void *, size_t);
 #define	DDUMP_PACKET(p, l)					\
 		do {						\

--Boundary-00=_CgMOEESIxHtRNJx--