Re: usb/144915: Prolific USB-IDE Bridge for Seagate ST350083

2010-03-21 Thread Hans Petter Selasky
On Saturday 20 March 2010 19:56:35 Monty Hall wrote:
> >Number: 144915
> >Category:   usb
> >Synopsis:   Prolific USB-IDE Bridge for Seagate ST350083
> >Confidential:   no
> >Severity:   non-critical
> >Priority:   low
> >Responsible:freebsd-usb
> >State:  open
> >Quarter:
> >Keywords:
> >Date-Required:
> >Class:  sw-bug
> >Submitter-Id:   current-users
> >Arrival-Date:   Sat Mar 20 19:00:16 UTC 2010
> >Closed-Date:
> >Last-Modified:
> >Originator: Monty Hall
> >Release:8.0
> >Organization:
> >Environment:
> 
> FreeBSD X 8.0-STABLE FreeBSD 8.0-STABLE #8 r205349M: Sat Mar 20
>  00:02:49 EDT 2010 r...@:/usr/obj/usr/src/sys/INSPIRON  i386
> 
> >Description:
> 
> I started getting zpool corruption errors, and the console was displaying
>  error messages concerning CACHE problems and SCSI error (20,0). 
>  Unfortunately I recompiled for this quirk and no longer have the actual
>  error message:
> 
> camcontrol devlist:
>  at scbus2 target 0 lun 0 (da0,pass1)
> 
> usbcontrol list:
> ---
> ugen4.5:  at usbus4, cfg=0
>  md=HOST spd=HIGH (480Mbps) pwr=ON
> 
> >How-To-Repeat:
> 
> I never had this problem as a UFS drive.  Only started getting this message
>  after adding to a zpool.
> 
> >Fix:
> 
> Recompile w/ the following changes:
> 
> /usr/src/sys/dev/usb/quirk/usb_quirk.c
> Index: usb_quirk.c
> ===
> --- usb_quirk.c (revision 205388)
> +++ usb_quirk.c (working copy)
> @@ -80,6 +80,10 @@
>USB_QUIRK_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, l, h, __VA_ARGS__)
> 
>  static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = {
> +   USB_QUIRK(PROLIFIC, PL2506, 0x, 0x,
> +   UQ_MSC_FORCE_PROTO_SCSI,
> +   UQ_MSC_FORCE_WIRE_BBB,
> +   UQ_MSC_NO_SYNC_CACHE),
> USB_QUIRK(ASUS, LCM, 0x, 0x, UQ_HID_IGNORE),
> USB_QUIRK(INSIDEOUT, EDGEPORT4, 0x094, 0x094, UQ_SWAP_UNICODE),
> USB_QUIRK(DALLAS, J6502, 0x0a2, 0x0a2, UQ_BAD_ADC),
> 
> 
> 

Hi,

Thanks for your patch!

Can you try the patch without the UQ_MSC_FORCE options, only the 
UQ_MSC_NO_SYNC_CACHE? We try to avoid the UQ_MSC_FORCE options when the USB 
descriptors already have the correct values for these fields.

Does the patch still work?

--HPS

> /usr/src/sys/dev/usb/usbdevs
> Index: usbdevs
> ===
> --- usbdevs (revision 205388)
> +++ usbdevs (working copy)
> @@ -2223,6 +2223,7 @@
>  product PROLIFIC PL23050x2305  Parallel printer
>  product PROLIFIC ATAPI40x2307  ATAPI-4 Controller
>  product PROLIFIC PL25010x2501  PL2501 Host-Host interface
> +product PROLIFIC PL25060x2506  PL2506 USB to IDE Bridge
>  product PROLIFIC PHAROS0xaaa0  Prolific Pharos
>  product PROLIFIC RSAQ3 0xaaa2  PL2303 Serial Adapter (IODATA
>  USB-RSAQ3) product PROLIFIC2 WSIM 0x2001  Willcom WSIM
> 
> >Release-Note:
> >Audit-Trail:
> >Unformatted:
> 
> ___
> 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"
> 
___
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/144915: Prolific USB-IDE Bridge for Seagate ST350083

2010-03-21 Thread Hans Petter Selasky
The following reply was made to PR usb/144915; it has been noted by GNATS.

From: Hans Petter Selasky 
To: freebsd-usb@freebsd.org
Cc: Monty Hall ,
 freebsd-gnats-sub...@freebsd.org
Subject: Re: usb/144915: Prolific USB-IDE Bridge for Seagate ST350083
Date: Sun, 21 Mar 2010 11:27:48 +0100

 On Saturday 20 March 2010 19:56:35 Monty Hall wrote:
 > >Number: 144915
 > >Category:   usb
 > >Synopsis:   Prolific USB-IDE Bridge for Seagate ST350083
 > >Confidential:   no
 > >Severity:   non-critical
 > >Priority:   low
 > >Responsible:freebsd-usb
 > >State:  open
 > >Quarter:
 > >Keywords:
 > >Date-Required:
 > >Class:  sw-bug
 > >Submitter-Id:   current-users
 > >Arrival-Date:   Sat Mar 20 19:00:16 UTC 2010
 > >Closed-Date:
 > >Last-Modified:
 > >Originator: Monty Hall
 > >Release:8.0
 > >Organization:
 > >Environment:
 > 
 > FreeBSD X 8.0-STABLE FreeBSD 8.0-STABLE #8 r205349M: Sat Mar 20
 >  00:02:49 EDT 2010 r...@:/usr/obj/usr/src/sys/INSPIRON  i386
 > 
 > >Description:
 > 
 > I started getting zpool corruption errors, and the console was displaying
 >  error messages concerning CACHE problems and SCSI error (20,0). 
 >  Unfortunately I recompiled for this quirk and no longer have the actual
 >  error message:
 > 
 > camcontrol devlist:
 >  at scbus2 target 0 lun 0 (da0,pass1)
 > 
 > usbcontrol list:
 > ---
 > ugen4.5:  at usbus4, cfg=0
 >  md=HOST spd=HIGH (480Mbps) pwr=ON
 > 
 > >How-To-Repeat:
 > 
 > I never had this problem as a UFS drive.  Only started getting this message
 >  after adding to a zpool.
 > 
 > >Fix:
 > 
 > Recompile w/ the following changes:
 > 
 > /usr/src/sys/dev/usb/quirk/usb_quirk.c
 > Index: usb_quirk.c
 > ===
 > --- usb_quirk.c (revision 205388)
 > +++ usb_quirk.c (working copy)
 > @@ -80,6 +80,10 @@
 >USB_QUIRK_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, l, h, __VA_ARGS__)
 > 
 >  static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = {
 > +   USB_QUIRK(PROLIFIC, PL2506, 0x, 0x,
 > +   UQ_MSC_FORCE_PROTO_SCSI,
 > +   UQ_MSC_FORCE_WIRE_BBB,
 > +   UQ_MSC_NO_SYNC_CACHE),
 > USB_QUIRK(ASUS, LCM, 0x, 0x, UQ_HID_IGNORE),
 > USB_QUIRK(INSIDEOUT, EDGEPORT4, 0x094, 0x094, UQ_SWAP_UNICODE),
 > USB_QUIRK(DALLAS, J6502, 0x0a2, 0x0a2, UQ_BAD_ADC),
 > 
 > 
 > 
 
 Hi,
 
 Thanks for your patch!
 
 Can you try the patch without the UQ_MSC_FORCE options, only the 
 UQ_MSC_NO_SYNC_CACHE? We try to avoid the UQ_MSC_FORCE options when the USB 
 descriptors already have the correct values for these fields.
 
 Does the patch still work?
 
 --HPS
 
 > /usr/src/sys/dev/usb/usbdevs
 > Index: usbdevs
 > ===
 > --- usbdevs (revision 205388)
 > +++ usbdevs (working copy)
 > @@ -2223,6 +2223,7 @@
 >  product PROLIFIC PL23050x2305  Parallel printer
 >  product PROLIFIC ATAPI40x2307  ATAPI-4 Controller
 >  product PROLIFIC PL25010x2501  PL2501 Host-Host interface
 > +product PROLIFIC PL25060x2506  PL2506 USB to IDE Bridge
 >  product PROLIFIC PHAROS0xaaa0  Prolific Pharos
 >  product PROLIFIC RSAQ3 0xaaa2  PL2303 Serial Adapter (IODATA
 >  USB-RSAQ3) product PROLIFIC2 WSIM 0x2001  Willcom WSIM
 > 
 > >Release-Note:
 > >Audit-Trail:
 > >Unformatted:
 > 
 > ___
 > 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"
 > 
___
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: Find Vendor/Product ID from uhid device

2010-03-21 Thread Hans Petter Selasky
On Saturday 20 March 2010 20:30:01 Martin Laabs wrote:
> Hi,
> 
> I'am currently porting the linux-js joystick driver to the new USB stack.
> Since this driver operates on top other drivers (in the case of USB ontop
> the uhid driver) it needs to figure out whether /dev/uhid* is a device it
> can operate on.
> The driver scans all /dev/uhidX entries and compares the vendor and product
> id against a table. In the old stack this was possible through scanning all
> /dev/ugenX devices, get the device_info struct and compare the
> udi_devnames[] against the "uhidX" string.
> However - the udi_devname string disappeared in the new usb stack and this
> way seems to be not open anymore for me.
> Can you give me a hint how to figure the vendor and product id of a
> /dev/uhidX device.
> 

Hi,

I would recommend you use libusb in userland to do this. Then you get all the 
information you need for the ID-match and more. If that is not desirable, we 
can add that information like an IOCTL. usbconfig show_ifdrv might also give 
you some clues.

Currently the libusb20 interface is the most stable.

Doesn't the linux-js joystick driver already have a parser for HID descriptors 
and more?

man libusb20

You might find the following function useful to detach the /dev/uhidX driver. 
Currently only implemented in 9-current, but present in 8-release:

 libusb20_dev_detach_kernel_driver(pdev, iface_index);

--HPS

___
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: Find Vendor/Product ID from uhid device

2010-03-21 Thread Martin Laabs

Hello Hans,

Hans Petter Selasky wrote:

I would recommend you use libusb in userland to do this. Then you get all the 
information you need for the ID-match and more.


Unfortunately the linux-js driver creates a new device in /dev/input which 
is IMHO impossible for a userland program. So I have to detect the usb 
devices in kernel space.


 If that is not desirable, we
can add that information like an IOCTL. usbconfig show_ifdrv might also give 
you some clues.


Yes - in fact. I.e. the output I am interested in is
ugen2.2.0: uhid0: addr 2>
Now I could figure out that ugen2.2.0 has idVendor=0x046d idProduct=0xc215 
with usbconfig dump_device_desc. After that the driver would check that ids 
against its database and if it would match it would use the /dev/uhid0 
device. (with kopen - see below)


Doesn't the linux-js joystick driver already have a parser for HID descriptors 
and more?


No. Unfortunately it has a database of vendor and product IDs of devices it 
supports.


You might find the following function useful to detach the /dev/uhidX driver. 


Well. As far as I understand the linux-js driver for now it relies on the 
uhid driver. After checking the /dev/uhidX devices agains its 
vendor/product database it opens the /dev/uhidX device via kopen an do its 
manipulations on it. A bit crapy but that way it can support many different 
physical ports without having to much overhead. (Soundcard joystick port, 
serial, parallel and also the usb port)


Do you think it is much effort to add a ioctl to the uhid driver that 
reports the corresponding  usb_device_info struct? This would make porting 
the linux-js driver much more simple for me.
Or is there a (simple accessible) data structure inside the kernel where I 
can get the information which vendor/product id correspond to a uhidX 
attached device?


Thank you,
 Martin Laabs

___
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: Find Vendor/Product ID from uhid device

2010-03-21 Thread Hans Petter Selasky
On Sunday 21 March 2010 13:03:22 Martin Laabs wrote:
> Hello Hans,

Hi Martin,

> 
> Hans Petter Selasky wrote:
> > I would recommend you use libusb in userland to do this. Then you get all
> > the information you need for the ID-match and more.
> 
> Unfortunately the linux-js driver creates a new device in /dev/input which
> is IMHO impossible for a userland program. So I have to detect the usb
> devices in kernel space.

That is not true. Search Google for cuse4bsd :-)
> 
>   If that is not desirable, we
> 
> > can add that information like an IOCTL. usbconfig show_ifdrv might also
> > give you some clues.
> 
> Yes - in fact. I.e. the output I am interested in is
> ugen2.2.0: uhid0:  addr 2>
> Now I could figure out that ugen2.2.0 has idVendor=0x046d idProduct=0xc215
> with usbconfig dump_device_desc. After that the driver would check that ids
> against its database and if it would match it would use the /dev/uhid0
> device. (with kopen - see below)
> 

> 
> Do you think it is much effort to add a ioctl to the uhid driver that
> reports the corresponding  usb_device_info struct? This would make porting
> the linux-js driver much more simple for me.
> Or is there a (simple accessible) data structure inside the kernel where I
> can get the information which vendor/product id correspond to a uhidX
> attached device?

This should be quite trivial, if cuse4bsd does not help anything.

Just an idea:

Maybe we can import the linux-js driver into the webcamd framework? Could you 
have a look at it. Then the code changes will be minimal!

--HPS

http://www.selasky.org/hans_petter/video4bsd
___
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: kern/144938: [keyboard] [boot] Boot Failure with Apple (MB869LL/A) Keyboard

2010-03-21 Thread brucec
Synopsis: [keyboard] [boot] Boot Failure with Apple (MB869LL/A) Keyboard

State-Changed-From-To: open->feedback
State-Changed-By: brucec
State-Changed-When: Sun Mar 21 20:51:32 UTC 2010
State-Changed-Why: 
Does any more information get displayed with a verbose boot ("boot -v")?


Responsible-Changed-From-To: freebsd-bugs->freebsd-usb
Responsible-Changed-By: brucec
Responsible-Changed-When: Sun Mar 21 20:51:32 UTC 2010
Responsible-Changed-Why: 
Over to maintainer(s).

http://www.freebsd.org/cgi/query-pr.cgi?pr=144938
___
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/144332: [build] Kernel compile fails when aue is enabled but not other USB ethernet drivers

2010-03-21 Thread linimon
Old Synopsis: Kernel compile fails when aue is enabled but not other USB 
ethernet drivers
New Synopsis: [build] Kernel compile fails when aue is enabled but not other 
USB ethernet drivers

State-Changed-From-To: open->feedback
State-Changed-By: linimon
State-Changed-When: Sun Mar 21 22:07:08 UTC 2010
State-Changed-Why: 
To submitter: does the most recent 8-STABLE fix this problem for you?

http://www.freebsd.org/cgi/query-pr.cgi?pr=144332
___
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/144201: AlphaSmart Dana usbdevs and uvisor update

2010-03-21 Thread linimon
Synopsis: AlphaSmart Dana usbdevs and uvisor update

State-Changed-From-To: open->patched
State-Changed-By: linimon
State-Changed-When: Sun Mar 21 22:08:03 UTC 2010
State-Changed-Why: 
committed to -current.


Responsible-Changed-From-To: freebsd-usb->thompsa
Responsible-Changed-By: linimon
Responsible-Changed-When: Sun Mar 21 22:08:03 UTC 2010
Responsible-Changed-Why: 

http://www.freebsd.org/cgi/query-pr.cgi?pr=144201
___
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/144199: uvisor(4) - AlphaSmart Dana incorrect stall clearing

2010-03-21 Thread linimon
Synopsis: uvisor(4) - AlphaSmart Dana incorrect stall clearing

State-Changed-From-To: open->patched
State-Changed-By: linimon
State-Changed-When: Sun Mar 21 22:08:55 UTC 2010
State-Changed-Why: 
committed to -current.


Responsible-Changed-From-To: freebsd-usb->thompsa
Responsible-Changed-By: linimon
Responsible-Changed-When: Sun Mar 21 22:08:55 UTC 2010
Responsible-Changed-Why: 

http://www.freebsd.org/cgi/query-pr.cgi?pr=144199
___
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: kern/144938: [keyboard] [boot] Boot Failure with Apple (MB869LL/A) Keyboard

2010-03-21 Thread Warren A. Hunt Jr.
Hello Mr. Cran,

Summary:  I don't understand why, but now everything works.

>  Does any more information get displayed with a
>  verbose boot ("boot -v")?

Indeed, it does.  But, now it boots.  Arragh!  Since my
last message, I have re-booted my system at least 10
times, and everything seems to work.  I have re-booted
with regular boot (no "boot -v"), and it works.  I have
powered down and tried again -- and it works.

Six weeks ago, I had this same problem (using this same
Apple keyboard) on another FreeBSD 8.0 system (based on
a SuperMicro "c2sbx" motherboard), which I never
solved.  So, I was worried that somehow Apple's new
keyboard was not supported by FreeBSD 8.0.

For the moment, on my ZOTAC IONITX-A-U board, my
problem has disappeared.  I must have failed to boot
with my Apple keyboard at least 20 times over the last
month.  The only thing I changed was in the BIOS -- I
stopped the "quick boot" sequence, instead specifying
the that the full complement of BIOS tests, such as the
memory test, should be performed.

Weird.

I'll try it another 20 times or so -- and I'll try
again on my SuperMicro system at work.

Thank you for responding.

And, thank you very much for your hard work on FreeBSD.
I use FreeBSD whenever I can.  I use it as an example
in my classes, and I make sure that my research tools
operate correctly on FreeBSD.

Cheers,

Warren
++

Dr. Warren A. Hunt, Jr.
Professor
Department of Computer Science
1 University Station, M/S C0500
The University of Texas
Austin, TX  78712-0233

E-mail:  h...@cs.utexas.edu
   Tel:  +1 512 471 9748
   FAX:  +1 512 471 8885
   URL:  http://www.cs.utexas.edu/users/hunt
___
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"