Re: usb/182936: commit references a PR

2013-10-15 Thread dfilter service
The following reply was made to PR usb/182936; it has been noted by GNATS.

From: dfil...@freebsd.org (dfilter service)
To: bug-follo...@freebsd.org
Cc:  
Subject: Re: usb/182936: commit references a PR
Date: Tue, 15 Oct 2013 06:24:01 + (UTC)

 Author: hselasky
 Date: Tue Oct 15 06:23:54 2013
 New Revision: 256500
 URL: http://svnweb.freebsd.org/changeset/base/256500
 
 Log:
   Add new USB ID.
   
   PR:  usb/182936
   Submitted by:Keith White kwh...@site.uottawa.ca
   MFC after:   1 week
 
 Modified:
   head/sys/dev/usb/usbdevs
   head/sys/dev/usb/wlan/if_run.c
 
 Modified: head/sys/dev/usb/usbdevs
 ==
 --- head/sys/dev/usb/usbdevs   Tue Oct 15 05:50:02 2013(r256499)
 +++ head/sys/dev/usb/usbdevs   Tue Oct 15 06:23:54 2013(r256500)
 @@ -1259,6 +1259,7 @@ product BELKIN F5D8055V2 0x825b  F5D8055 
  product BELKIN F5D9050V3  0x905b  F5D9050 ver 3 Wireless Adapter
  product BELKIN2 F5U0020x0002  F5U002 Parallel printer
  product BELKIN F6D4050V1  0x935a  F6D4050 v1
 +product BELKIN F6D4050V2  0x935b  F6D4050 v2
  
  /* Billionton products */
  product BILLIONTON USB100 0x0986  USB100N 10/100 FastEthernet
 
 Modified: head/sys/dev/usb/wlan/if_run.c
 ==
 --- head/sys/dev/usb/wlan/if_run.c Tue Oct 15 05:50:02 2013
(r256499)
 +++ head/sys/dev/usb/wlan/if_run.c Tue Oct 15 06:23:54 2013
(r256500)
 @@ -147,6 +147,7 @@ static const STRUCT_USB_HOST_ID run_devs
  RUN_DEV(BELKIN,   F5D8055),
  RUN_DEV(BELKIN,   F5D8055V2),
  RUN_DEV(BELKIN,   F6D4050V1),
 +RUN_DEV(BELKIN,   F6D4050V2),
  RUN_DEV(BELKIN,   RT2870_1),
  RUN_DEV(BELKIN,   RT2870_2),
  RUN_DEV(CISCOLINKSYS, AE1000),
 ___
 svn-src-...@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to svn-src-all-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/181987: USB isochronous transfer of the USB driver (Mentor Graphics OTG: musb_otg) is not working.

2013-10-15 Thread Hans Petter Selasky
The following reply was made to PR usb/181987; it has been noted by GNATS.

From: Hans Petter Selasky h...@bitfrost.no
To: SAITOU Toshihide to...@ruby.ocn.ne.jp
Cc: freebsd-gnats-sub...@freebsd.org
Subject: Re: usb/181987: USB isochronous transfer of the USB driver (Mentor
 Graphics OTG: musb_otg) is not working.
Date: Tue, 15 Oct 2013 09:05:26 +0200

 This is a multi-part message in MIME format.
 --090607060603090803000207
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 On 09/10/13 13:01, SAITOU Toshihide wrote:
 
  Number: 181987
  Category:   usb
  Synopsis:   USB isochronous transfer of the USB driver (Mentor Graphics 
  OTG: musb_otg) is not working.
  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:   Tue Sep 10 11:10:00 UTC 2013
  Closed-Date:
  Last-Modified:
  Originator: SAITOU Toshihide
  Release:FreeBSD 10.0-CURRENT
  Organization:
  Environment:
  FreeBSD bbb 10.0-CURRENT FreeBSD 10.0-CURRENT #1: Mon Sep  9 23:34:15 JST 
  2013 toshi@fbsd:/usr/obj/arm.armv6/usr/src/sys/BEAGLEBONE  arm
 
  Description:
  The patch attached is somewhat fixed the problem for the
  LOGICOOL C920 but still most UVC devices are not working.
 
  My guess is that the not working device requires three
  transactions per *microframe* for the data transfer rate as
  the video streaming but the current driver performs one
  transaction per microframe. The following page imply the
  existence of the undocumented setting to perform so.
  http://e2e.ti.com/support/embedded/wince/f/353/t/68966.aspx
 
  How-To-Repeat:
 
  Fix:
 
 
  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
 
 
 Hi,
 
 Can you please test the attached patch and report back?
 
 --HPS
 
 --090607060603090803000207
 Content-Type: text/x-patch;
  name=musb.diff
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename=musb.diff
 
 === sys/dev/usb/controller/musb_otg.c
 ==
 --- sys/dev/usb/controller/musb_otg.c  (revision 256504)
 +++ sys/dev/usb/controller/musb_otg.c  (local)
 @@ -646,8 +646,8 @@
count = MUSB2_READ_2(sc, MUSB2_REG_RXCOUNT);
  
/* verify the packet byte count */
 -  if (count != td-max_frame_size) {
 -  if (count  td-max_frame_size) {
 +  if (count != td-max_packet_size) {
 +  if (count  td-max_packet_size) {
/* we have a short packet */
td-short_pkt = 1;
got_short = 1;
 @@ -775,7 +775,7 @@
if (csr  MUSB2_MASK_CSR0L_TXPKTRDY) {
return (1); /* not complete */
}
 -  count = td-max_frame_size;
 +  count = td-max_packet_size;
if (td-remainder  count) {
/* we have a short packet */
td-short_pkt = 1;
 @@ -936,8 +936,8 @@
count = MUSB2_READ_2(sc, MUSB2_REG_RXCOUNT);
  
/* verify the packet byte count */
 -  if (count != td-max_frame_size) {
 -  if (count  td-max_frame_size) {
 +  if (count != td-max_packet_size) {
 +  if (count  td-max_packet_size) {
/* we have a short packet */
td-short_pkt = 1;
got_short = 1;
 @@ -1126,7 +1126,7 @@
}
  
/* check for short packet */
 -  count = td-max_frame_size;
 +  count = td-max_packet_size;
if (td-remainder  count) {
/* we have a short packet */
td-short_pkt = 1;
 @@ -1453,8 +1453,8 @@
/*
 * Check for short or invalid packet:
 */
 -  if (count != td-max_frame_size) {
 -  if (count  td-max_frame_size) {
 +  if (count != td-max_packet_size) {
 +  if (count  td-max_packet_size) {
/* we have a short packet */
td-short_pkt = 1;
got_short = 1;
 @@ -1592,7 +1592,7 @@
return (1); /* not complete */
}
/* check for short packet */
 -  count = td-max_frame_size;
 +  count = td-max_packet_size;
if (td-remainder  count) {
/* we have a short packet */
td-short_pkt = 1;
 @@ -1661,7 +1661,8 @@
}
  
/* Max packet size */
 -  MUSB2_WRITE_1(sc, MUSB2_REG_TXMAXP, td-max_packet);
 +  MUSB2_WRITE_2(sc, MUSB2_REG_TXMAXP, td-max_packet_size |
 +  ((td-max_packet_count - 1)  11));
  
/* write command */

Re: usb/181987: USB isochronous transfer of the USB driver (Mentor Graphics OTG: musb_otg) is not working.

2013-10-15 Thread SAITOU Toshihide
The following reply was made to PR usb/181987; it has been noted by GNATS.

From: SAITOU Toshihide to...@ruby.ocn.ne.jp
To: freebsd-gnats-sub...@freebsd.org
Cc:  
Subject: Re: usb/181987: USB isochronous transfer of the USB driver (Mentor
 Graphics OTG: musb_otg) is not working.
Date: Tue, 15 Oct 2013 22:17:17 +0900 (JST)

 In message: 525ce936.70...@bitfrost.no
 Hans Petter Selasky h...@bitfrost.no writes:
  On 09/10/13 13:01, SAITOU Toshihide wrote:
 
  Number: 181987
  Category:   usb
  Synopsis: USB isochronous transfer of the USB driver (Mentor
  Graphics OTG: musb_otg) is not working.
  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:   Tue Sep 10 11:10:00 UTC 2013
  Closed-Date:
  Last-Modified:
  Originator: SAITOU Toshihide
  Release:FreeBSD 10.0-CURRENT
  Organization:
  Environment:
  FreeBSD bbb 10.0-CURRENT FreeBSD 10.0-CURRENT #1: Mon Sep 9
  23:34:15 JST 2013
  toshi@fbsd:/usr/obj/arm.armv6/usr/src/sys/BEAGLEBONE arm
 
  Description:
  The patch attached is somewhat fixed the problem for the
  LOGICOOL C920 but still most UVC devices are not working.
 
  My guess is that the not working device requires three
  transactions per *microframe* for the data transfer rate as
  the video streaming but the current driver performs one
  transaction per microframe. The following page imply the
  existence of the undocumented setting to perform so.
  http://e2e.ti.com/support/embedded/wince/f/353/t/68966.aspx
 
  How-To-Repeat:
 
  Fix:
 
 
  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
 
  
  Hi,
  
  Can you please test the attached patch and report back?
  
  --HPS
 
 I tried to use a UVC device using libusb but couldn't get
 the data. The latter patch was the same result.
 
 FreeBSD revision is 255933.
 
 When libusb_submit_transfer's call back is called,
 actual_length of libusb_iso_packet_descriptor is 0 or 12.
 
 A snippet of ``sysctl hw.usb.debug=4'' is below:
 
 musbotg_device_isoc_enter: start next=537
 musbotg_ep_int_set: ep_no=1, on=1
 musbotg_host_data_rx: ep_no=1
 musbotg_host_data_rx: csr=0x01
 musbotg_host_data_rx: csrh=0x00
 musbotg_interrupt: real endpoint interrupt rx=0x0002, tx=0x
 musbotg_host_data_rx: ep_no=1
 musbotg_host_data_rx: csr=0x01
 musbotg_host_data_rx: count=0x0a80
 musbotg_channel_free: ep_no=1
 musbotg_ep_int_set: ep_no=1, on=0
 musbotg_device_done: xfer=0xc2c080c0, endpoint=0xc2ac3cb8, error=22
 
 It seems that more data are collected...
 
 
 Thanks,
 -- 
 SAITOU Toshihide
___
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/181987: commit references a PR

2013-10-15 Thread dfilter service
The following reply was made to PR usb/181987; it has been noted by GNATS.

From: dfil...@freebsd.org (dfilter service)
To: bug-follo...@freebsd.org
Cc:  
Subject: Re: usb/181987: commit references a PR
Date: Tue, 15 Oct 2013 17:11:22 + (UTC)

 Author: hselasky
 Date: Tue Oct 15 17:11:13 2013
 New Revision: 256548
 URL: http://svnweb.freebsd.org/changeset/base/256548
 
 Log:
   Correct programming of XXX_MAXP register. This register is 16-bit wide
   and not 8-bit. Fix support for isochronous transfers in USB host mode.
   Fix a whitespace while at it.
   
   MFC after:   1 week
   Reported by: SAITOU Toshihide to...@ruby.ocn.ne.jp
   PR:  usb/181987
 
 Modified:
   head/sys/dev/usb/controller/musb_otg.c
   head/sys/dev/usb/controller/musb_otg.h
 
 Modified: head/sys/dev/usb/controller/musb_otg.c
 ==
 --- head/sys/dev/usb/controller/musb_otg.c Tue Oct 15 17:03:02 2013
(r256547)
 +++ head/sys/dev/usb/controller/musb_otg.c Tue Oct 15 17:11:13 2013
(r256548)
 @@ -1661,7 +1661,7 @@ repeat:
}
  
/* Max packet size */
 -  MUSB2_WRITE_1(sc, MUSB2_REG_TXMAXP, td-max_packet);
 +  MUSB2_WRITE_2(sc, MUSB2_REG_TXMAXP, td-reg_max_packet);
  
/* write command */
MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL,
 @@ -1726,13 +1726,16 @@ repeat:
td-hport);
  
/* RX NAK timeout */
 -  MUSB2_WRITE_1(sc, MUSB2_REG_RXNAKLIMIT, MAX_NAK_TO);
 +  if (td-transfer_type  MUSB2_MASK_TI_PROTO_ISOC)
 +  MUSB2_WRITE_1(sc, MUSB2_REG_RXNAKLIMIT, 0);
 +  else
 +  MUSB2_WRITE_1(sc, MUSB2_REG_RXNAKLIMIT, MAX_NAK_TO);
  
/* Protocol, speed, device endpoint */
MUSB2_WRITE_1(sc, MUSB2_REG_RXTI, td-transfer_type);
  
/* Max packet size */
 -  MUSB2_WRITE_1(sc, MUSB2_REG_RXMAXP, td-max_packet);
 +  MUSB2_WRITE_2(sc, MUSB2_REG_RXMAXP, td-reg_max_packet);
  
/* Data Toggle */
csrh = MUSB2_READ_1(sc, MUSB2_REG_RXCSRH);
 @@ -1938,7 +1941,7 @@ musbotg_host_data_tx(struct musbotg_td *
return (0); /* complete */
}
  
 -  if (csr  MUSB2_MASK_CSRL_TXNAKTO ) {
 +  if (csr  MUSB2_MASK_CSRL_TXNAKTO) {
/* 
 * Flush TX FIFO before clearing NAK TO
 */
 @@ -2069,13 +2072,16 @@ musbotg_host_data_tx(struct musbotg_td *
td-hport);
  
/* TX NAK timeout */
 -  MUSB2_WRITE_1(sc, MUSB2_REG_TXNAKLIMIT, MAX_NAK_TO);
 +  if (td-transfer_type  MUSB2_MASK_TI_PROTO_ISOC)
 +  MUSB2_WRITE_1(sc, MUSB2_REG_TXNAKLIMIT, 0);
 +  else
 +  MUSB2_WRITE_1(sc, MUSB2_REG_TXNAKLIMIT, MAX_NAK_TO);
  
/* Protocol, speed, device endpoint */
MUSB2_WRITE_1(sc, MUSB2_REG_TXTI, td-transfer_type);
  
/* Max packet size */
 -  MUSB2_WRITE_1(sc, MUSB2_REG_TXMAXP, td-max_packet);
 +  MUSB2_WRITE_2(sc, MUSB2_REG_TXMAXP, td-reg_max_packet);
  
if (!td-transaction_started) {
csrh = MUSB2_READ_1(sc, MUSB2_REG_TXCSRH);
 @@ -2406,7 +2412,6 @@ musbotg_setup_standard_chain(struct usb_
  
if (xfer-flags_int.usb_mode == USB_MODE_HOST) {
speed =  usbd_get_speed(xfer-xroot-udev);
 -  xfer_type = xfer-endpoint-edesc-bmAttributes  UE_XFERTYPE;
  
switch (speed) {
case USB_SPEED_LOW:
 @@ -2444,7 +2449,6 @@ musbotg_setup_standard_chain(struct usb_
}
  
temp.transfer_type |= ep_no;
 -  td-max_packet = xfer-max_packet_size;
td-toggle = xfer-endpoint-toggle_next;
}
  
 @@ -2469,9 +2473,9 @@ musbotg_setup_standard_chain(struct usb_
x = 0;
}
  
 -  if (x != xfer-nframes) {
 -  tx = 0;
 +  tx = 0;
  
 +  if (x != xfer-nframes) {
if (xfer-endpointno  UE_DIR_IN)
tx = 1;
  
 @@ -2532,9 +2536,14 @@ musbotg_setup_standard_chain(struct usb_
  
} else {
  
 -  /* regular data transfer */
 -
 -  temp.short_pkt = (xfer-flags.force_short_xfer) ? 0 : 1;
 +  if (xfer-flags_int.isochronous_xfr) {
 +  /* isochronous data transfer */
 +  /* don't force short */
 +  temp.short_pkt = 1;
 +  } else {
 +  /* regular data transfer */
 +  temp.short_pkt = (xfer-flags.force_short_xfer 
? 0 : 1);
 +  }
}
  
musbotg_setup_standard_chain_sub(temp);
 @@ -3158,7 +3167,12 @@ musbotg_init(struct musbotg_softc *sc)
  
if (dynfifo) {
if (frx  (temp = nrx)) {
 - 

Apple Slim Keyboard USB Hub Power

2013-10-15 Thread Monty Chaney-Geib
I have an Apple Keyboard with Numeric Keypad, and I am having a problem
getting the built in USB hub to supply power to my devices. In OSX it will
change my iPod and do whatever I want it to, and in windows I found a
registry hack that allows it to function in the same manner. I was
wondering if there was a way I could do something similar in FreeBSD. I
recently posted this on the forums, but was referred here by a mod.
___
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