Re: CanoScan N650U / xsane /FreeBSD 6.2-CURRENT

2007-03-11 Thread Marc Fonvieille
On Fri, Mar 09, 2007 at 02:52:33PM -0600, [EMAIL PROTECTED] wrote:
 I am trying to get a Cannon CanoScan N 650U working on FreeBSD 6.2-CURRENT.
 
 The scanner SEEMS to be seen, but normal VS root shows a difference.
 
 As a mortal User:
 
 $ sane-find-scanner -q
 found USB scanner (UNKNOWN vendor and product) at device /dev/uscanner0
 
 
 As root
 lap# sane-find-scanner -q
 found USB scanner (vendor=0x04a9, product=0x2206) at /dev/uscanner0
 lap# scanimage -L
 
 No scanners were identified. If you were expecting something different,
 check that the scanner is plugged in, turned on and detected by the
 sane-find-scanner tool (if appropriate). Please read the documentation
 
 
 lap# kldstat 
 Id Refs AddressSize Name
  1   17 0xc040 714dc4   kernel
  22 0xc0b15000 22c48sound.ko
  31 0xc0b38000 9958 snd_uaudio.ko
  41 0xc0b42000 598bcacpi.ko
  52 0xc376b000 9000 ibcs2.ko
  61 0xc3776000 3000 ibcs2_coff.ko
  72 0xc3779000 16000linux.ko
  81 0xc39df000 3000 daemon_saver.ko
  91 0xc3dea000 6000 linprocfs.ko
 lap# 
 
 Xsane configs
 
 $ grep -v ^# /usr/local/etc/sane.d/plustek.conf | grep -v option
 device /dev/uscanner0
 usb  0x04a9  0x2206 
 $ grep plustek /usr/local/etc/sane.d/dll.conf
 plustek
 #plustek_pp
 $ 

You should read
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/scanners.html

-- 
Marc
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: usb/95173: [umass] [patch] cannot mount external usb harddisk VIA Technologies Inc. USB 2.0 IDE Bridge

2008-01-26 Thread Marc Fonvieille
The following reply was made to PR usb/95173; it has been noted by GNATS.

From: Marc Fonvieille [EMAIL PROTECTED]
To: Ben Kelly [EMAIL PROTECTED]
Cc: freebsd-usb@FreeBSD.org, [EMAIL PROTECTED]
Subject: Re: usb/95173: [umass] [patch] cannot mount external usb harddisk
VIA Technologies Inc. USB 2.0 IDE Bridge
Date: Sat, 26 Jan 2008 11:26:18 +0100

 On Sat, Jan 26, 2008 at 07:00:06AM +, Ben Kelly wrote:
  The following reply was made to PR usb/95173; it has been noted by GNATS.
  
  From: Ben Kelly [EMAIL PROTECTED]
  To: [EMAIL PROTECTED], [EMAIL PROTECTED]
  Cc:  
  Subject: Re: usb/95173: [umass] [patch] cannot mount external usb harddisk 
  VIA Technologies Inc. USB 2.0 IDE Bridge
  Date: Sat, 26 Jan 2008 01:35:41 -0500
  
   --Apple-Mail-95--316157853
   Content-Type: text/plain;
   charset=US-ASCII;
   format=flowed;
   delsp=yes
   Content-Transfer-Encoding: 7bit
   
   My last patch did not seem to get incorporated into the bug system  
   properly.  Here is a second attempt.
   
 
 
 I can confirm this patch fixed the problem I also had with 2 VIA USB
 2.0 IDE Bridge based enclosures.  I did my tests on 7.0-PRERELEASE.
 This patch should be committed :)
 
 -- 
 Marc
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to [EMAIL PROTECTED]


SANE, USB image scanner and -CURRENT

2009-07-26 Thread Marc Fonvieille
Hello,

I'm trying to make run a scanner using the USB interface under 8.0-BETA2
with graphics/sane-backends and graphics/sane-frontends but SANE is
unable to detect the scanner.

When I plug the scanner dmesg gives:

ugen2.2: Canon at usbus2

'usbconfig dump_device_desc' gives

ugen2.2: CanoScan Canon at usbus2, cfg=0 md=HOST spd=FULL (12Mbps)
pwr=ON

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0110 
  bDeviceClass = 0x00ff 
  bDeviceSubClass = 0x 
  bDeviceProtocol = 0x00ff 
  bMaxPacketSize0 = 0x0008 
  idVendor = 0x04a9 
  idProduct = 0x220e 
  bcdDevice = 0x0100 
  iManufacturer = 0x0001  Canon
  iProduct = 0x0002  CanoScan
  iSerialNumber = 0x  no string
  bNumConfigurations = 0x0001

Both 'sane-find-scanner -q' and 'scanimage -L' are unable to find any
scanner.

So I tried to inform SANE via /usr/local/etc/sane.d/plustek.conf (the
right config file for my scanner) that the scanner was

[usb] 0x04a9 0x220e

or (2nd try)
[usb] 0x04a9 0x220e
device /dev/ugen2.2

or (3rd try)
[usb]
device /dev/ugen2.2

but both 'sane-find-scanner -q' and 'scanimage -L' still gives nothing.

Then I read the CVS logs about SANE's ports and
http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/sane-backends/Makefile
seems to say that SANE is broken since removal of uscanner(8), am I
right?

-- 
Marc
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: SANE, USB image scanner and -CURRENT

2009-07-26 Thread Marc Fonvieille
On Sun, Jul 26, 2009 at 02:55:42PM +0200, Marc Fonvieille wrote:
 Then I read the CVS logs about SANE's ports and
 http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/sane-backends/Makefile
 seems to say that SANE is broken since removal of uscanner(8), am I
 right?


Ok, I read the Makefile, SANE is by default w/o libusb support cause
it's broken with libusb coming with 8.X so it's normal that the scanner
is not found.
Is there any plan in fixing that problem before 8.0-RELEASE?

-- 
Marc
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: SANE, USB image scanner and -CURRENT

2009-07-26 Thread Marc Fonvieille
On Sun, Jul 26, 2009 at 03:27:36PM +0200, Hans Petter Selasky wrote:
 On Sunday 26 July 2009 15:12:24 Marc Fonvieille wrote:
  On Sun, Jul 26, 2009 at 02:55:42PM +0200, Marc Fonvieille wrote:
   Then I read the CVS logs about SANE's ports and
   http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/sane-backends/Makefi
  le seems to say that SANE is broken since removal of uscanner(8), am I
   right?
 
  Ok, I read the Makefile, SANE is by default w/o libusb support cause
  it's broken with libusb coming with 8.X so it's normal that the scanner
  is not found.
  Is there any plan in fixing that problem before 8.0-RELEASE?
 
 I think this is an old error. Have you tried compiling SANE from ports with 
 libusb support enabled?


It's impossible cause of this Makefile part:

.if (defined(WITHOUT_USB) || ${OSVERSION}  80)
CONFIGURE_ARGS+=--disable-libusb
.else
.if ${OSVERSION}  800069
LIB_DEPENDS+=   usb-0.1.8:${PORTSDIR}/devel/libusb
.endif
.endif

So SANE is built w/o libusb support even if you check the option.  I
tried to comment this part but the build failed on sanei_usb.c etc.

I think someone with USB foo should have a look to the port.

-- 
Marc
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: SANE, USB image scanner and -CURRENT (problem solved)

2009-07-26 Thread Marc Fonvieille
On Sun, Jul 26, 2009 at 08:32:23PM +0200, Hans Petter Selasky wrote:
 On Sunday 26 July 2009 20:10:26 Marc Fonvieille wrote:
  On Sun, Jul 26, 2009 at 03:27:36PM +0200, Hans Petter Selasky wrote:
   On Sunday 26 July 2009 15:12:24 Marc Fonvieille wrote:
On Sun, Jul 26, 2009 at 02:55:42PM +0200, Marc Fonvieille wrote:
 Then I read the CVS logs about SANE's ports and
 http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/sane-backends/Ma
kefi le seems to say that SANE is broken since removal of uscanner(8),
 am I right?
   
Ok, I read the Makefile, SANE is by default w/o libusb support cause
it's broken with libusb coming with 8.X so it's normal that the scanner
is not found.
Is there any plan in fixing that problem before 8.0-RELEASE?
  
   I think this is an old error. Have you tried compiling SANE from ports
   with libusb support enabled?
 
  It's impossible cause of this Makefile part:
 
  .if (defined(WITHOUT_USB) || ${OSVERSION}  80)
  CONFIGURE_ARGS+=--disable-libusb
  .else
  .if ${OSVERSION}  800069
  LIB_DEPENDS+=   usb-0.1.8:${PORTSDIR}/devel/libusb
  .endif
  .endif
 
  So SANE is built w/o libusb support even if you check the option.  I
  tried to comment this part but the build failed on sanei_usb.c etc.
 
  I think someone with USB foo should have a look to the port.
 
 
 Patch:
 
 /usr/ports/graphics/sane-backends/work/sane-backends-1.0.20/sanei/sanei_usb.c
 
 At beginning of file change:
 
 #if defined (__FreeBSD__)
 #include sys/param.h
 #include dev/usb/usb.h
 #endif /* __FreeBSD__ */
 
 To:
 
 #if (defined (__FreeBSD__)  (__FreeBSD_version  800064))
 #include sys/param.h
 #include dev/usb/usb.h
 #endif /* __FreeBSD__ */
 
 That's all.
 
 ...


Thanks a lot!  It works now.  I just committed your fix to the port, now
the USB scanners work under 8.X!

I'm currently testing under 8.X all USB things I have under the hand, I
may contact you again in future :)

-- 
Marc
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


uvisor(4) and Palm Z22 under 8.X

2009-07-28 Thread Marc Fonvieille
Hello,

I'm trying to sync a Palm Z22 under 8.0-BETA2 with pilot-xfer from
palm/pilot-link.

If I plug the Z22, the system doesn't create a /dev/cuaUx node.  I had
the same problem under 7.X and 6.X, I used to patch uvisor.c (a very
dirty hack btw) to allow the creation of the device node.
So I applied the same changes to sys/dev/usb/serial/uvisor.c

Index: uvisor.c
===
--- uvisor.c(révision 195917)
+++ uvisor.c(copie de travail)
@@ -375,7 +375,7 @@
struct uvisor_connection_info coninfo;
struct uvisor_palm_connection_info pconinfo;
uint16_t actlen;
-   uWord wAvail;
+/* uWord wAvail;*/
uint8_t buffer[256];
 
if (sc-sc_flag  UVISOR_FLAG_VISOR) {
@@ -496,7 +496,7 @@
goto done;
}
}
-   DPRINTF(getting available bytes\n);
+/* DPRINTF(getting available bytes\n);
req.bmRequestType = UT_READ_VENDOR_ENDPOINT;
req.bRequest = UVISOR_REQUEST_BYTES_AVAILABLE;
USETW(req.wValue, 0);
@@ -508,7 +508,7 @@
}
DPRINTF(avail=%d\n, UGETW(wAvail));
 
-   DPRINTF(done\n);
+   DPRINTF(done\n);*/
 done:
return (err);
 }


With this patch a /dev/cuaU0 node is created.  If I launch a:

# pilot-xfer -p /dev/cuaU0 -i /home/marc/projet/misc/livres.pdb


   Listening for incoming connection on /dev/cuaU0... connected!

   Installing 'livres.pdb' ... (16 bytes)
   ERROR: pi_file_install failed (-305, PalmOS 0x).

   Thank you for using pilot-link.


So it fails where it worked on 7.X and 6.X.


Here are some info from usbconfig(8):

ugen2.2: Palm Handheld Palm, Inc. at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) 
pwr=ON

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0110 
  bDeviceClass = 0x00ff 
  bDeviceSubClass = 0x 
  bDeviceProtocol = 0x 
  bMaxPacketSize0 = 0x0008 
  idVendor = 0x0830 
  idProduct = 0x0061 
  bcdDevice = 0x0100 
  iManufacturer = 0x0001  Palm, Inc.
  iProduct = 0x0002  Palm Handheld
  iSerialNumber = 0x  no string
  bNumConfigurations = 0x0001 


Any advices?

-- 
Marc
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: uvisor(4) and Palm Z22 under 8.X

2009-08-02 Thread Marc Fonvieille
Hello,

I did some progress.
I read 7.X uvisor.c code and I noted this:

/*
 * Crank down UVISORBUFSIZE from 1024 to 64 to avoid a problem where
 * the Palm device and the USB host controller deadlock. The USB host
 * controller is expecting an early-end-of-transmission packet with 0
 * data, and the Palm doesn't send one because it's already
 * communicated the amount of data it's going to send in a header
 * (which ucom/uvisor are oblivious to). This is the problem that has
 * been known on the pilot-link lists as the [Free]BSD USB problem,
 * but not understood.
 */
#define UVISORIBUFSIZE 64
#define UVISOROBUFSIZE 1024

So I changed UVISOR_BUFSIZE from 1024 to 64 on uvisor.c from 8.X and
bingo some transferts worked, actually backup and files list worked but
I wasn't able to install files.  So I modified uvisor.c to use 2
different buffer sizes as it's done on 7.X (see attached patch).
I tried different couples of bufsize to eventually find a working one.

Now everything is working.  I just note that sometimes during backup of
a large file, if there is activity on my box (USB activity I think) the
transfert of the file fails but it can be fixed at next launch of the
backup.

Well I dunno if it's ready to be committed but it allows me to use my
Palm Z22 under 8.0-CURRENT.

-- 
Marc
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: uvisor(4) and Palm Z22 under 8.X

2009-08-02 Thread Marc Fonvieille
Attach for real the patch

-- 
Marc
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: uvisor(4) and Palm Z22 under 8.X

2009-08-02 Thread Marc Fonvieille
On Sun, Aug 02, 2009 at 10:15:23PM +0200, Marc Fonvieille wrote:
 Attach for real the patch
 

Sorry, I dunno why attachement is not working today, here's the patch:


Index: uvisor.c
===
--- uvisor.c(revision 196038)
+++ uvisor.c(working copy)
@@ -95,7 +95,8 @@
 
 #defineUVISOR_CONFIG_INDEX 0
 #defineUVISOR_IFACE_INDEX  0
-#defineUVISOR_BUFSIZE   1024   /* bytes */
+#defineUVISORIBUFSIZE 64   /* bytes */
+#defineUVISOROBUFSIZE 32   /* bytes */
 
 /* From the Linux driver */
 /*
@@ -208,7 +209,7 @@
.type = UE_BULK,
.endpoint = UE_ADDR_ANY,
.direction = UE_DIR_OUT,
-   .bufsize = UVISOR_BUFSIZE,  /* bytes */
+   .bufsize = UVISOROBUFSIZE,  /* bytes */
.flags = {.pipe_bof = 1,.force_short_xfer = 1,},
.callback = uvisor_write_callback,
},
@@ -217,7 +218,7 @@
.type = UE_BULK,
.endpoint = UE_ADDR_ANY,
.direction = UE_DIR_IN,
-   .bufsize = UVISOR_BUFSIZE,  /* bytes */
+   .bufsize = UVISORIBUFSIZE,  /* bytes */
.flags = {.pipe_bof = 1,.short_xfer_ok = 1,},
.callback = uvisor_read_callback,
},
@@ -375,7 +376,7 @@
struct uvisor_connection_info coninfo;
struct uvisor_palm_connection_info pconinfo;
uint16_t actlen;
-   uWord wAvail;
+/* uWord wAvail;*/
uint8_t buffer[256];
 
if (sc-sc_flag  UVISOR_FLAG_VISOR) {
@@ -497,7 +498,7 @@
}
}
DPRINTF(getting available bytes\n);
-   req.bmRequestType = UT_READ_VENDOR_ENDPOINT;
+/* req.bmRequestType = UT_READ_VENDOR_ENDPOINT;
req.bRequest = UVISOR_REQUEST_BYTES_AVAILABLE;
USETW(req.wValue, 0);
USETW(req.wIndex, 5);
@@ -506,7 +507,7 @@
if (err) {
goto done;
}
-   DPRINTF(avail=%d\n, UGETW(wAvail));
+   DPRINTF(avail=%d\n, UGETW(wAvail));*/
 
DPRINTF(done\n);
 done:
@@ -586,7 +587,7 @@
 tr_setup:
pc = usbd_xfer_get_frame(xfer, 0);
if (ucom_get_data(sc-sc_ucom, pc, 0,
-   UVISOR_BUFSIZE, actlen)) {
+   UVISOROBUFSIZE, actlen)) {
 
usbd_xfer_set_frame_len(xfer, 0, actlen);
usbd_transfer_submit(xfer);

-- 
Marc
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: uvisor(4) and Palm Z22 under 8.X

2009-08-03 Thread Marc Fonvieille
On Mon, Aug 03, 2009 at 08:33:49AM +0200, Hans Petter Selasky wrote:
 On Sunday 02 August 2009 22:18:16 Marc Fonvieille wrote:
  On Sun, Aug 02, 2009 at 10:15:23PM +0200, Marc Fonvieille wrote:
   Attach for real the patch
 
  Sorry, I dunno why attachement is not working today, here's the patch:
 
 
 Hi,
 
 Can you verify that the driver works with 1024 byte buffers (RX+TX), and the 
 other changes made. The comment in the old driver does not apply any more.
 
 Alternativly, try:
 
 TX buffer 1024 bytes:
 RX buffer 0 bytes (which makes it use wMaxPacketSize).
 


Here are the results of various values:

---
#define  UVISORIBUFSIZE 0
#define  UVISOROBUFSIZE 1024

install fails
list OK
backup OK

---
#define  UVISORIBUFSIZE 992
#define  UVISOROBUFSIZE 32

install OK
list fails
backup fails
---

---
#define  UVISORIBUFSIZE 512
#define  UVISOROBUFSIZE 512

install fails 
list OK
backup fails
---

---
#define  UVISORIBUFSIZE 64
#define  UVISOROBUFSIZE 960

install fails 
list OK
backup OK
---

---
#define  UVISORIBUFSIZE 64
#define  UVISOROBUFSIZE 32

install OK 
list OK
backup OK
---

For information:
install:pilot-xfer -p /dev/cuaU0 -i ./foobar.pdb
list:   pilot-xfer -p /dev/cuaU0 -l
backup: pilot-xfer -p /dev/cuaU0 -s foo

-- 
Marc
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: uvisor(4) and Palm Z22 under 8.X

2009-08-03 Thread Marc Fonvieille
On Mon, Aug 03, 2009 at 11:38:44AM +0200, Hans Petter Selasky wrote:
 Hi,
 
 Can you try:
 
 #define  UVISORIBUFSIZE 1024
 #define  UVISOROBUFSIZE 32


install OK
listOK
backup fails when it tries to get large files (45308 bytes in my
case).

-- 
Marc
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: uvisor(4) and Palm Z22 under 8.X

2009-08-03 Thread Marc Fonvieille
On Mon, Aug 03, 2009 at 01:32:36PM +0200, Hans Petter Selasky wrote:
 Hi,
 
 I've tried to optimise the device upload path to 1.0 MByte/second. Download 
 path is limited to wMaxPacketSize*1000 byte/second, due to the device not 
 short terminating its data. Would require a special driver, maybe via libusb.
 
 Could you check upload and download speed?


The upload speed is fast and perfect, the download is still slow but
acceptable (in fact same as with my dirty buffer hacks)

I also tried with 2 other PDAs: a SONY Clié NR70V and one Handspring
Visor Platinum.  I add to change one line to your patch to make the Sony
work (7.X had the same bug), see the attached patch.  The Visor Platinum
refuses to works, well I don't really know how to make it run and I'm
not even sure it worked under 7.X, I used when 4.X was the stable
version...

Thanks a lot for your help (I still have many other USB devices lying
around so you may hear about me in future :)

-- 
Marc
Index: uvisor.c
===
--- uvisor.c	(revision 196052)
+++ uvisor.c	(working copy)
@@ -95,8 +95,16 @@
 
 #define	UVISOR_CONFIG_INDEX	0
 #define	UVISOR_IFACE_INDEX	0
-#define	UVISOR_BUFSIZE   1024	/* bytes */
 
+/*
+ * The following buffer sizes are hardcoded due to the way the Palm
+ * firmware works. It looks like the device is not short terminating
+ * the data transferred.
+ */
+#define	UVISORIBUFSIZE	   0	/* Use wMaxPacketSize */
+#define	UVISOROBUFSIZE	   32	/* bytes */
+#define	UVISOROFRAMES	   32	/* units */
+
 /* From the Linux driver */
 /*
  * UVISOR_REQUEST_BYTES_AVAILABLE asks the visor for the number of bytes that
@@ -208,7 +216,8 @@
 		.type = UE_BULK,
 		.endpoint = UE_ADDR_ANY,
 		.direction = UE_DIR_OUT,
-		.bufsize = UVISOR_BUFSIZE,	/* bytes */
+		.bufsize = UVISOROBUFSIZE * UVISOROFRAMES,
+		.frames = UVISOROFRAMES,
 		.flags = {.pipe_bof = 1,.force_short_xfer = 1,},
 		.callback = uvisor_write_callback,
 	},
@@ -217,7 +226,7 @@
 		.type = UE_BULK,
 		.endpoint = UE_ADDR_ANY,
 		.direction = UE_DIR_IN,
-		.bufsize = UVISOR_BUFSIZE,	/* bytes */
+		.bufsize = UVISORIBUFSIZE,
 		.flags = {.pipe_bof = 1,.short_xfer_ok = 1,},
 		.callback = uvisor_read_callback,
 	},
@@ -270,7 +279,7 @@
 	{USB_VPI(USB_VENDOR_PALM, USB_PRODUCT_PALM_ZIRE31, UVISOR_FLAG_PALM4)},
 	{USB_VPI(USB_VENDOR_SAMSUNG, USB_PRODUCT_SAMSUNG_I500, UVISOR_FLAG_PALM4)},
 	{USB_VPI(USB_VENDOR_SONY, USB_PRODUCT_SONY_CLIE_40, 0)},
-	{USB_VPI(USB_VENDOR_SONY, USB_PRODUCT_SONY_CLIE_41, UVISOR_FLAG_PALM4)},
+	{USB_VPI(USB_VENDOR_SONY, USB_PRODUCT_SONY_CLIE_41, 0)},
 	{USB_VPI(USB_VENDOR_SONY, USB_PRODUCT_SONY_CLIE_S360, UVISOR_FLAG_PALM4)},
 	{USB_VPI(USB_VENDOR_SONY, USB_PRODUCT_SONY_CLIE_NX60, UVISOR_FLAG_PALM4)},
 	{USB_VPI(USB_VENDOR_SONY, USB_PRODUCT_SONY_CLIE_35, UVISOR_FLAG_PALM35)},
@@ -375,7 +384,6 @@
 	struct uvisor_connection_info coninfo;
 	struct uvisor_palm_connection_info pconinfo;
 	uint16_t actlen;
-	uWord wAvail;
 	uint8_t buffer[256];
 
 	if (sc-sc_flag  UVISOR_FLAG_VISOR) {
@@ -496,6 +504,9 @@
 			goto done;
 		}
 	}
+#if 0
+	uWord wAvail;
+
 	DPRINTF(getting available bytes\n);
 	req.bmRequestType = UT_READ_VENDOR_ENDPOINT;
 	req.bRequest = UVISOR_REQUEST_BYTES_AVAILABLE;
@@ -507,6 +518,7 @@
 		goto done;
 	}
 	DPRINTF(avail=%d\n, UGETW(wAvail));
+#endif
 
 	DPRINTF(done\n);
 done:
@@ -579,19 +591,31 @@
 	struct uvisor_softc *sc = usbd_xfer_softc(xfer);
 	struct usb_page_cache *pc;
 	uint32_t actlen;
+	uint8_t x;
 
 	switch (USB_GET_STATE(xfer)) {
 	case USB_ST_SETUP:
 	case USB_ST_TRANSFERRED:
 tr_setup:
-		pc = usbd_xfer_get_frame(xfer, 0);
-		if (ucom_get_data(sc-sc_ucom, pc, 0,
-		UVISOR_BUFSIZE, actlen)) {
+		for (x = 0; x != UVISOROFRAMES; x++) {
 
-			usbd_xfer_set_frame_len(xfer, 0, actlen);
+			usbd_xfer_set_frame_offset(xfer, 
+			x * UVISOROBUFSIZE, x);
+
+			pc = usbd_xfer_get_frame(xfer, x);
+			if (ucom_get_data(sc-sc_ucom, pc, 0,
+			UVISOROBUFSIZE, actlen)) {
+usbd_xfer_set_frame_len(xfer, x, actlen);
+			} else {
+break;
+			}
+		}
+		/* check for data */
+		if (x != 0) {
+			usbd_xfer_set_frames(xfer, x);
 			usbd_transfer_submit(xfer);
 		}
-		return;
+		break;
 
 	default:			/* Error */
 		if (error != USB_ERR_CANCELLED) {
@@ -599,7 +623,7 @@
 			usbd_xfer_set_stall(xfer);
 			goto tr_setup;
 		}
-		return;
+		break;
 	}
 }
 
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: uvisor(4) and Palm Z22 under 8.X

2009-08-05 Thread Marc Fonvieille
On Wed, Aug 05, 2009 at 09:25:27AM +0200, Hans Petter Selasky wrote:
 On Monday 03 August 2009 22:43:55 Marc Fonvieille wrote:
  The upload speed is fast and perfect, the download is still slow but
  acceptable (in fact same as with my dirty buffer hacks)
 
 Good.
 
 Here is the final patch. Note sure if I can get it in before 8 is released:
 
 http://perforce.freebsd.org/chv.cgi?CH=167018


I don't think it'll be a problem since it's a small change without
effect on the rest of the base system.  For the moment we (re@) are
holding all commits to both head and releng_8, once all will be ok (just
after BETA3) I'll try to commit it.

Thanks for the help,

-- 
Marc
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: usb/149058: [ural] ASUS WL-167g doesn't work in 8.1 [regression]

2010-07-29 Thread Marc Fonvieille
On Thu, Jul 29, 2010 at 09:57:25PM +0200, Marc Fonvieille wrote:
 On Thu, Jul 29, 2010 at 06:10:35PM +0200, Lucius Windschuh wrote:
  2010/7/29 Hans Petter Selasky hsela...@c2i.net:
   This is not an USB problem!
  
  In fact, this is a *documentation* problem:
  At least the part on configuring an access point is outdated, and was
  written before VAPs were introduced
  (http://www.freebsd.org/doc/handbook/network-wireless.html).
  It should mention create_args_IF.
 
 
 Yes the AP part is outdated but the client part is up to date and this
 is the subject of the PR.  So please don't blame docs when they are not
 guilty :)


Well, I'm a bit wrong a part of the PR is related to APs as well.  But
the client part is enough explicit, I mean one can't miss the wlanX use.
Anyway, I have the update of the part AP on my TODO list, it should be
online soon.

Let's close this PR.

-- 
Marc
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: usb/149058: [ural] ASUS WL-167g doesn't work in 8.1 [regression]

2010-07-29 Thread Marc Fonvieille
On Thu, Jul 29, 2010 at 06:10:35PM +0200, Lucius Windschuh wrote:
 2010/7/29 Hans Petter Selasky hsela...@c2i.net:
  This is not an USB problem!
 
 In fact, this is a *documentation* problem:
 At least the part on configuring an access point is outdated, and was
 written before VAPs were introduced
 (http://www.freebsd.org/doc/handbook/network-wireless.html).
 It should mention create_args_IF.


Yes the AP part is outdated but the client part is up to date and this
is the subject of the PR.  So please don't blame docs when they are not
guilty :)

-- 
Marc
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org