Re: [PATCH] plusb.c patched to support Belkin F5U258 USB host-to-host cable

2008-02-14 Thread tony_gibbs
Dear Dave,

Thanks for the reply.

I don't know why it arrived line-wrapped, and I thought I had turned DEBUG
off. So I need to try again on those.

What device name should be there? Just "PL-25A1"? or "Belkin F5U258"?

Yes I did get it to pass data back and forth, and I posted a message to
linux-usb list on Mon, 11 Feb 2008 15:34:34 -0800 showing the results.

So it is working ok, but I need to format the patch so that it will merge
in.

Thoughts?

Kind Regards,
Tony

Message text written by David Brownell
> 
On Thursday 14 February 2008, tony_gibbs wrote:
> I have tried to make the changes I have been working on and testing with
> your help into a patch as attached.
> 
> Please let me know what you think of it.

It arrived line wrapped, and turned on debug options that
should stay off by default ... it couldn't merge, on those
bases alone.  Also, "PL-25A1hack" isn't a product name.  ;)

Did you get this to pass data back and forth yet?  The last
report I had from you was that it wouldn't pass data.  The
Prolific hardware tends to enter that mode after a while.
(Maybe there's documentation unseen by any Linux developer,
saying how to make those chips actually work...)  But you
reported that they didn't seem to work even when freshly
plugged in.

- Dave

<

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] plusb.c patched to support Belkin F5U258 USB host-to-host cable

2008-02-15 Thread tony_gibbs
Dear Dave,

I have tried to make the changes I have been working on and testing with
your help into a patch as attached.

Please let me know what you think of it.

Kind Regards,
Tony

---
Description: To make usbnet work with the Belkin F5U258 USB Host to Host
cable,
which contains Prolific PL-25A1 chip, the file plusb.c has been edited to
add the
VID and PID values for that cable.

The changes have been checked using the checkpatch.pl script.

The patch was tested on kernel 2.6.23.14 on Fedora Core 8, and on kernel
2.6.17.14 on Ubuntu Dapper Drake.

Signed-off-by: Tony Gibbs <[EMAIL PROTECTED]>

--- /home/tony/drivers/net/usb/plusb.c  2008-02-12 23:02:01.0 +
+++
/usr/src/redhat/BUILD/kernel-2.6.23/linux-2.6.23.i386/drivers/net/usb/plusb
.c  2008-02-12 23:17:16.0 +
@@ -1,6 +1,7 @@
 /*
  * PL-2301/2302 USB host-to-host link cables
  * Copyright (C) 2000-2005 by David Brownell
+ * PL-25A1 hack added by Tony Gibbs 07/02/2008.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -17,8 +18,8 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 
USA
  */
 
-//#define  DEBUG   // error path messages, extra info
-//#define  VERBOSE // more; success messages
+#defineDEBUG   // error path messages, extra info
+#defineVERBOSE // more; success messages
 
 #include 
 #include 
@@ -46,6 +47,8 @@
  * seems to get wedged under load.  Prolific docs are weak, and
  * don't identify differences between PL2301 and PL2302, much less
  * anything to explain the different PL2302 versions observed.
+ *
+ * PL25A1 chip in Belkin F5U258 added.
  */
 
 /*
@@ -96,7 +99,7 @@ static int pl_reset(struct usbnet *dev)
 }
 
 static const struct driver_infoprolific_info = {
-   .description =  "Prolific PL-2301/PL-2302",
+   .description =  "Prolific PL-2301/PL-2302_PL-25A1hack",
.flags =FLAG_NO_SETINT,
/* some PL-2302 versions seem to fail usb_set_interface()
*/
.reset =pl_reset,
@@ -118,7 +121,12 @@ static const struct usb_device_id  produc
 }, {
USB_DEVICE(0x067b, 0x0001), // PL-2302
.driver_info =  (unsigned long) &prolific_info,
-}, 
+}, {
+   USB_DEVICE(0x050d, 0x258a), /*Belkin F5U258 cable containing
PL-25A1 chip.*/
+   /* TG hack 07/02/2008 */
+   .driver_info =  (unsigned long) &prolific_info
+},
+
{ },// END
 };
 MODULE_DEVICE_TABLE(usb, products);
@@ -145,5 +153,5 @@ static void __exit plusb_exit(void)
 module_exit(plusb_exit);
 
 MODULE_AUTHOR("David Brownell");
-MODULE_DESCRIPTION("Prolific PL-2301/2302 USB Host to Host Link Driver");
+MODULE_DESCRIPTION("Prolific PL-2301/2302 USB Host to Host Link Driver
with PL-25A1 TG hack");
 MODULE_LICENSE("GPL");
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html