On 26/10/13(Sat) 04:34, SASANO Takayoshi wrote:
> Hello,
> 
> I wrote a driver for Genesys Logic's GL620USB-A to test my USB
> PC-to-PC link cable. This controller is old (USB 1.1 age!) but
> GL620USB-A based link cable is still sold at eBay.
> 
> To support GL620USB-A, I modified sys/dev/usb/if_upl.c (Prolific
> PL-2301/2302 driver) and added some stuffs. These kind of devices
> simply provide communication pipes on USB, and I heard that PL-2301
> driver can drive GL620USB-A with adding idVendor/idProduct. [1]
> 
> This is simple resolution but it limits the peer to OpenBSD box. So I
> wrote GL620USB-A driver as new one to be compatible with Linux's
> usbnet driver. [2]
> 
> I named the driver ugl(if_ugl.c) and tested it on
> OpenBSD-current/amd64 with Slackware-14.0. The patch is at
> http://www2192ue.sakura.ne.jp/~uaa/gomitext/2013/20131023/20131026.diff
> 
> Is anyone interested in the driver for such an old device?
> Any comments and advices are appreciated.
> 
> [1] 
> http://circuithijacker.blogspot.jp/2007/02/usb-host-to-host-cables-with-slax-linux.html
> [2] http://www.linux-usb.org/usbnet/

This looks good to me, I think you can put it in. Here's some small
comments:

- You don't need to protect your device from being detached before it is
  properly attached because both events are triggered by the same task
  and cannot run in parallel.  In other words you can remove the
  "sc_attached" dance.

- Can you replace "sc_dying" by usbd_is_dying(), this will also allow
  you to kill ugl_activate()?

- You can remove the error check when aborting a pipe, this function
  cannot fail :)

- Why do you have an "#if 1" around the setup of your transfers and
  pipe?  Just kill it ;)

Other than that I'd say ok mpi@, but don't forget the man page and
enable it where upl(4) is enable!

Cheers,
Martin

Reply via email to