From: Simon Wood <hidden> Date: 2011-03-30 03:44:49
Adds support for 'Windows Easy Transfer' cables based around the
Prolific PL-25A1 chip (includes Belkin F5U258 & F5U279)
Patch originally suggested by David Brownell here:
http://www.mail-archive.com/netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org/msg61926.html
Modified to work with latest kernel, tested with F5U279.
Signed-off-by: Simon Wood <simon-wM4F9T/ekXmXDw4h08c5KA@public.gmane.org>
---
drivers/net/usb/Kconfig | 2 +-
drivers/net/usb/plusb.c | 33 ++++++++++++++++++++++++++-------
2 files changed, 27 insertions(+), 8 deletions(-)
@@ -258,7 +258,7 @@ config USB_NET_NET1080optionallywithLEDsthatindicatetrafficconfigUSB_NET_PLUSB-tristate"Prolific PL-2301/2302 based cables"+tristate"Prolific PL-2301/2302/25A1 based cables"# if the handshake/init/reset problems, from original 'plusb',# are ever resolved ... then remove "experimental"depends onUSB_USBNET&&EXPERIMENTAL
@@ -89,13 +97,17 @@ static int pl_reset(struct usbnet *dev)/* some units seem to need this reset, others reject it utterly.*FIXMEbemorelike"naplink"orwindowsdrivers.*/-(void)pl_set_QuickLink_features(dev,+intstatus;++status=pl_set_QuickLink_features(dev,PL_S_EN|PL_RESET_OUT|PL_RESET_IN|PL_PEER_E);+if(status!=0&&netif_msg_probe(dev))+netif_dbg(dev,link,dev->net,"pl_reset --> %d\n",status);return0;}staticconststructdriver_infoprolific_info={-.description="Prolific PL-2301/PL-2302",+.description="Prolific PL-2301/PL-2302/PL-25A1",.flags=FLAG_NO_SETINT,/* some PL-2302 versions seem to fail usb_set_interface() */.reset=pl_reset,
@@ -134,16 +153,16 @@ static struct usb_driver plusb_driver = {staticint__initplusb_init(void){-returnusb_register(&plusb_driver);+returnusb_register(&plusb_driver);}module_init(plusb_init);staticvoid__exitplusb_exit(void){-usb_deregister(&plusb_driver);+usb_deregister(&plusb_driver);}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/25A1 USB Host to Host Link Driver");MODULE_LICENSE("GPL");
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: David Miller <davem@davemloft.net> Date: 2011-03-30 09:40:43
From: Simon Wood <redacted>
Date: Tue, 29 Mar 2011 21:44:27 -0600
quoted hunk
@@ -89,13 +97,17 @@ static int pl_reset(struct usbnet *dev) /* some units seem to need this reset, others reject it utterly. * FIXME be more like "naplink" or windows drivers. */- (void) pl_set_QuickLink_features(dev,+ int status;++ status = pl_set_QuickLink_features(dev, PL_S_EN|PL_RESET_OUT|PL_RESET_IN|PL_PEER_E);
Poor indentation here in the status assignment, there should be
only a single TAB character before "status =".
Also, declare the local variable at the beginning of the function,
before the function, not after it. And get rid of that tab between
"int" and "status, like this:
int status;
/* some units seem to need this reset, others reject it utterly.
* FIXME be more like "naplink" or windows drivers.
*/
@@ -89,13 +97,17 @@ static int pl_reset(struct usbnet *dev) /* some units seem to need this reset, others reject it utterly. * FIXME be more like "naplink" or windows drivers. */- (void) pl_set_QuickLink_features(dev,+ int status;++ status = pl_set_QuickLink_features(dev,
From: Simon Wood <hidden> Date: 2011-04-06 04:16:53
Clear up a couple of instances of incorrect whitespace
Signed-off-by: Simon Wood <redacted>
---
drivers/net/usb/plusb.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
From: Simon Wood <hidden> Date: 2011-04-06 04:16:55
This patch adds the USB ID's for the PL25A1, which is used in the
Belkin 'Windows Easy Transfer' cables.
Signed-off-by: Simon Wood <simon-wM4F9T/ekXmXDw4h08c5KA@public.gmane.org>
---
drivers/net/usb/Kconfig | 2 +-
drivers/net/usb/plusb.c | 22 ++++++++++++++++++++--
2 files changed, 21 insertions(+), 3 deletions(-)
@@ -258,7 +258,7 @@ config USB_NET_NET1080optionallywithLEDsthatindicatetrafficconfigUSB_NET_PLUSB-tristate"Prolific PL-2301/2302 based cables"+tristate"Prolific PL-2301/2302/25A1 based cables"# if the handshake/init/reset problems, from original 'plusb',# are ever resolved ... then remove "experimental"depends onUSB_USBNET&&EXPERIMENTAL
@@ -145,5 +163,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/25A1 USB Host to Host Link Driver");MODULE_LICENSE("GPL");
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Simon Wood <hidden> Date: 2011-04-06 04:17:32
Adds some debug in the event that reseting chip fails for some reason
Signed-off-by: Simon Wood <redacted>
---
drivers/net/usb/plusb.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
@@ -94,11 +94,15 @@ pl_set_QuickLink_features(struct usbnet *dev, int val)staticintpl_reset(structusbnet*dev){+intstatus;+/* some units seem to need this reset, others reject it utterly.*FIXMEbemorelike"naplink"orwindowsdrivers.*/-(void)pl_set_QuickLink_features(dev,+status=pl_set_QuickLink_features(dev,PL_S_EN|PL_RESET_OUT|PL_RESET_IN|PL_PEER_E);+if(status!=0&&netif_msg_probe(dev))+netif_dbg(dev,link,dev->net,"pl_reset --> %d\n",status);return0;}
From: David Miller <davem@davemloft.net> Date: 2011-04-06 20:18:19
There are some problems with this patch series:
1) Please compose your subject lines more correctly. When I such these
patches into GIT, everything in the initial "[]" brackets is removed
and the commit header line for this patch (for example) ends up being
just "whitespace".
We want more than that.
Try something like:
Subject: [PATCH v2 1/3] usb: plusb: Whitespace.
Subject: [PATCH v2 2/3] usb: plusb: Add PL25A1 support.
Subject: [PATCH v2 3/3] usb: plusb: Add reset debugging.
2) Patch 2 doesn't apply cleanly to the current tree, you'll need to
refresh these patches.
Thanks.
From: Simon Wood <hidden> Date: 2011-04-08 03:19:01
From: simon <simon@ubuntu.(none)>
This patch cleans up a couple of instances of incorrect whitespace
Signed-off-by: Simon Wood <redacted>
---
drivers/net/usb/plusb.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
From: Simon Wood <hidden> Date: 2011-04-08 03:19:03
From: simon <simon@ubuntu.(none)>
This patch adds support for the PL-25A1 by adding the appropriate
USB ID's. This chip is used in the Belkin 'Windows Easy Transfer'
Cables.
Signed-off-by: Simon Wood <redacted>
---
drivers/net/usb/Kconfig | 2 +-
drivers/net/usb/plusb.c | 22 ++++++++++++++++++++--
2 files changed, 21 insertions(+), 3 deletions(-)
@@ -258,7 +258,7 @@ config USB_NET_NET1080optionallywithLEDsthatindicatetrafficconfigUSB_NET_PLUSB-tristate"Prolific PL-2301/2302 based cables"+tristate"Prolific PL-2301/2302/25A1 based cables"# if the handshake/init/reset problems, from original 'plusb',# are ever resolved ... then remove "experimental"depends onUSB_USBNET&&EXPERIMENTAL
@@ -145,5 +163,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/25A1 USB Host to Host Link Driver");MODULE_LICENSE("GPL");
From: Simon Wood <hidden> Date: 2011-04-08 03:19:32
From: simon <simon@ubuntu.(none)>
This patch adds some debug to the reset function to print out the
reason why it fails.
Signed-off-by: Simon Wood <redacted>
---
drivers/net/usb/plusb.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
@@ -94,11 +94,15 @@ pl_set_QuickLink_features(struct usbnet *dev, int val)staticintpl_reset(structusbnet*dev){+intstatus;+/* some units seem to need this reset, others reject it utterly.*FIXMEbemorelike"naplink"orwindowsdrivers.*/-(void)pl_set_QuickLink_features(dev,+status=pl_set_QuickLink_features(dev,PL_S_EN|PL_RESET_OUT|PL_RESET_IN|PL_PEER_E);+if(status!=0&&netif_msg_probe(dev))+netif_dbg(dev,link,dev->net,"pl_reset --> %d\n",status);return0;}
From: simon <simon@ubuntu.(none)>
This patch adds support for the PL-25A1 by adding the appropriate
USB ID's. This chip is used in the Belkin 'Windows Easy Transfer'
Cables.
Signed-off-by: Simon Wood <redacted>
From: simon <simon@ubuntu.(none)>
This patch adds some debug to the reset function to print out the
reason why it fails.
Signed-off-by: Simon Wood <redacted>