Re: root mount from usb-connected hard drive fails after upgrade to FreeBSD 8.2-stable

2011-11-05 Thread Torfinn Ingolfsen
On Sat, 05 Nov 2011 18:01:10 +0100
Hans Petter Selasky  wrote:

> On Saturday 05 November 2011 16:51:46 Torfinn Ingolfsen wrote:
> > Then I upgraded FreeBSD on that partition to 8.2-stable, and now the
> > machine won't mount root from that device at all. I had to load the old
> > kernel and boot from that. Here is usbconfig output for the usb docking
> > station:
> 
> Hi,
> 
> Did you try to press "." during the mount root prompt?

Yes, I tried that - it didn't help.
(Has anyone actually got this particular hint to work? Or is it just "myth"?)

> There has been a couple of threads where you can set:
> 
> kern.cam.boot_delay=1000
> 
> http://forum.pfsense.org/index.php?topic=39047.0

Of course! (smacks forehead)
Adding
kern.cam.boot_delay=1
to /boot/loader.conf fixed the issue.
Thanks!
-- 
Torfinn

___
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: root mount from usb-connected hard drive fails after upgrade to FreeBSD 8.2-stable

2011-11-05 Thread Hans Petter Selasky
On Saturday 05 November 2011 16:51:46 Torfinn Ingolfsen wrote:
> Then I upgraded FreeBSD on that partition to 8.2-stable, and now the
> machine won't mount root from that device at all. I had to load the old
> kernel and boot from that. Here is usbconfig output for the usb docking
> station:

Hi,

Did you try to press "." during the mount root prompt?

There has been a couple of threads where you can set:

kern.cam.boot_delay=1000

http://forum.pfsense.org/index.php?topic=39047.0

--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"


root mount from usb-connected hard drive fails after upgrade to FreeBSD 8.2-stable

2011-11-05 Thread Torfinn Ingolfsen
Hi,

While testing FreeBSD on a new machine[1] with the Asus E35M1-I motherboard, I 
put a sata hard drive into an external "docking station"[2]
which connects via usb to the machine, and installed FreeBSD 8.2-release / 
amd64 on the hard drive. This worked fine, with just an occasional problem:
sometimes automatic root mount would fail, amd I would have to manually input 
"ufs:/dev/da0s1a" and then it would mount root and continue to boot.

Then I upgraded FreeBSD on that partition to 8.2-stable, and now the machine 
won't mount root from that device at all. I had to load the old kernel and boot 
from that.
Here is usbconfig output for the usb docking station:
root@kg-f3# usbconfig -u 3 -a 2 dump_device_desc
ugen3.2:  at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0200
  bDeviceClass = 0x
  bDeviceSubClass = 0x
  bDeviceProtocol = 0x
  bMaxPacketSize0 = 0x0040
  idVendor = 0x13fd
  idProduct = 0x1240
  bcdDevice = 0x0104
  iManufacturer = 0x0001  
  iProduct = 0x0002  
  iSerialNumber = 0x0003  
  bNumConfigurations = 0x0001 

and config:
root@kg-f3# usbconfig -u 3 -a 2 dump_curr_config_desc
ugen3.2:  at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON


 Configuration index 0

bLength = 0x0009
bDescriptorType = 0x0002
wTotalLength = 0x0020
bNumInterfaces = 0x0001
bConfigurationValue = 0x0001
iConfiguration = 0x  
bmAttributes = 0x00c0
bMaxPower = 0x0001

Interface 0
  bLength = 0x0009
  bDescriptorType = 0x0004
  bInterfaceNumber = 0x
  bAlternateSetting = 0x
  bNumEndpoints = 0x0002
  bInterfaceClass = 0x0008
  bInterfaceSubClass = 0x0006
  bInterfaceProtocol = 0x0050
  iInterface = 0x  

 Endpoint 0
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0081  
bmAttributes = 0x0002  
wMaxPacketSize = 0x0200
bInterval = 0x
bRefresh = 0x
bSynchAddress = 0x

 Endpoint 1
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0002  
bmAttributes = 0x0002  
wMaxPacketSize = 0x0200
bInterval = 0x
bRefresh = 0x
bSynchAddress = 0x 

Any hints on what the problem might be?
Details, such as dmesg output (normal and verbose) on the FreeBSD page for the 
machine[3].
References:
1) http://sites.google.com/site/tingox/asus_e35m1-i
2) http://www.deltaco.se/products/items/itemid/(SI-7908US)/index.aspx
3) http://sites.google.com/site/tingox/asus_e35m1-i_freebsd
-- 
Torfinn

___
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 3 issues

2011-11-05 Thread Hans Petter Selasky
On Friday 04 November 2011 12:33:53 Jan Henrik Sylvester wrote:
> On 11/04/2011 10:18, Hans Petter Selasky wrote:
> > On Thursday 03 November 2011 22:04:44 Xin LI wrote:
> >> Xin LI
> > 
> > Please try the following patch:
> > 
> > http://svn.freebsd.org/changeset/base/227075
> > 
> > Then send me the XHCI attach error.
> > 
> > Probably something which we can fix.
> 
> Ok, I have found a minute to test 9.0-RC1 + 227075:
> 
> xhci0:  mem 0xf1f0-0xf1f0 irq
> 19 at device 0.0 on pci5
> xhci0: 32 byte context size.
> xhci0: Controller reset timeout.
> xhci0: XHCI halt/start/probe failed err=18
> WARNING: A USB process has been left suspended
> device_attach: xhci0 attach returned 6
> 
> BTW: I think it is this device from "pciconf -l":
> xhci0@pci0:5:0:0:   class=0x0c0330 card=0x10001d5c chip=0x10001b73
> rev=0x01 hdr=0x00
> 
> Thanks,
> Jan Henrik

Hi,

In sys/dev/usb/controller/xhci.c

Try to increase the usb_pause_mtx() from hz/1000 to hz/100.

If that doesn't work try to continue, even if the HC is not clearing the HCRST 
bit. Also print "temp" at the end of the loop.

/* Reset controller */
XWRITE4(sc, oper, XHCI_USBCMD, XHCI_CMD_HCRST);

for (i = 0; i != 100; i++) {
usb_pause_mtx(NULL, hz / 1000);
temp = XREAD4(sc, oper, XHCI_USBCMD) &
(XHCI_CMD_HCRST | XHCI_STS_CNR);
if (!temp)
break;
}

if (temp) {
device_printf(sc->sc_bus.parent, "Controller "
"reset timeout.\n");
return (USB_ERR_IOERROR);
}

--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: usb/162307: [uslcom][patch] cp2103 usb-to-serial driver does not support modem control lines

2011-11-05 Thread Hans Petter Selasky
The following reply was made to PR usb/162307; it has been noted by GNATS.

From: Hans Petter Selasky 
To: freebsd-usb@freebsd.org
Cc: JD Louw ,
 freebsd-gnats-sub...@freebsd.org
Subject: Re: usb/162307: [uslcom][patch] cp2103 usb-to-serial driver does not 
support modem control lines
Date: Sat, 5 Nov 2011 13:02:05 +0100

 On Saturday 05 November 2011 11:51:14 JD Louw wrote:
 > usb/162307
 
 Committed with some modifications:
 
 1) control transfers automatically clear-stall.
 2) control transfers should have a timeout
 3) flowcontrol[2,3] must be zeroed
 4) flowcontrol must be stored in little endian format
 5) reduce the interval a little bit, because it is blocking other control 
 transfers to this device.
 6) reduce control transfer buffer to the request plus 8 bytes, of which only 1 
 byte is used.
 
 Please verify and check that my modifications to your patch are correct:
 http://svn.freebsd.org/changeset/base/227108
 
 Thanks for the patch!
 
 --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: usb/162307: commit references a PR

2011-11-05 Thread dfilter service
The following reply was made to PR usb/162307; it has been noted by GNATS.

From: dfil...@freebsd.org (dfilter service)
To: bug-follo...@freebsd.org
Cc:  
Subject: Re: usb/162307: commit references a PR
Date: Sat,  5 Nov 2011 12:02:09 + (UTC)

 Author: hselasky
 Date: Sat Nov  5 12:01:51 2011
 New Revision: 227108
 URL: http://svn.freebsd.org/changeset/base/227108
 
 Log:
   Implement support for modem control lines.
   Don't short terminate transmitted BULK data.
   Assume that the chip reads one USB packet at a time.
   
   PR:  usb/162307
   MFC after:   3 days
 
 Modified:
   head/sys/dev/usb/serial/uslcom.c
 
 Modified: head/sys/dev/usb/serial/uslcom.c
 ==
 --- head/sys/dev/usb/serial/uslcom.c   Sat Nov  5 11:18:46 2011
(r227107)
 +++ head/sys/dev/usb/serial/uslcom.c   Sat Nov  5 12:01:51 2011
(r227108)
 @@ -63,43 +63,61 @@ SYSCTL_INT(_hw_usb_uslcom, OID_AUTO, deb
  
  #define   USLCOM_SET_DATA_BITS(x) ((x) << 8)
  
 +/* Request types */
  #define   USLCOM_WRITE0x41
  #define   USLCOM_READ 0xc1
  
 +/* Request codes */
  #define   USLCOM_UART 0x00
  #define   USLCOM_BAUD_RATE0x01
  #define   USLCOM_DATA 0x03
  #define   USLCOM_BREAK0x05
  #define   USLCOM_CTRL 0x07
 +#define   USLCOM_RCTRL0x08
 +#define   USLCOM_SET_FLOWCTRL 0x13
  
 +/* USLCOM_UART values */
  #define   USLCOM_UART_DISABLE 0x00
  #define   USLCOM_UART_ENABLE  0x01
  
 +/* USLCOM_CTRL/USLCOM_RCTRL values */
  #define   USLCOM_CTRL_DTR_ON  0x0001  
  #define   USLCOM_CTRL_DTR_SET 0x0100
  #define   USLCOM_CTRL_RTS_ON  0x0002
  #define   USLCOM_CTRL_RTS_SET 0x0200
  #define   USLCOM_CTRL_CTS 0x0010
  #define   USLCOM_CTRL_DSR 0x0020
 +#define   USLCOM_CTRL_RI  0x0040
  #define   USLCOM_CTRL_DCD 0x0080
  
 +/* USLCOM_BAUD_RATE values */
  #define   USLCOM_BAUD_REF 0x384000
  
 +/* USLCOM_DATA values */
  #define   USLCOM_STOP_BITS_1  0x00
  #define   USLCOM_STOP_BITS_2  0x02
 -
  #define   USLCOM_PARITY_NONE  0x00
  #define   USLCOM_PARITY_ODD   0x10
  #define   USLCOM_PARITY_EVEN  0x20
  
  #define   USLCOM_PORT_NO  0x /* XXX think this should be 0 
--hps */
  
 +/* USLCOM_BREAK values */
  #define   USLCOM_BREAK_OFF0x00
  #define   USLCOM_BREAK_ON 0x01
  
 +/* USLCOM_SET_FLOWCTRL values - 1st word */
 +#define   USLCOM_FLOW_DTR_ON  0x0001
 +#define   USLCOM_FLOW_CTS_HS  0x0008 /* CTS handshake */
 +#define   USLCOM_FLOW_RESERVED0xFF80
 +/* USLCOM_SET_FLOWCTRL values - 2nd word */
 +#define   USLCOM_FLOW_RTS_ON  0x0040
 +#define   USLCOM_FLOW_RTS_HS  0x0080 /* RTS handshake */
 +
  enum {
USLCOM_BULK_DT_WR,
USLCOM_BULK_DT_RD,
 +  USLCOM_CTRL_DT_RD,
USLCOM_N_TRANSFER,
  };
  
 @@ -121,6 +139,7 @@ static device_detach_t uslcom_detach;
  
  static usb_callback_t uslcom_write_callback;
  static usb_callback_t uslcom_read_callback;
 +static usb_callback_t uslcom_control_callback;
  
  static void uslcom_open(struct ucom_softc *);
  static void uslcom_close(struct ucom_softc *);
 @@ -143,7 +162,7 @@ static const struct usb_config uslcom_co
.endpoint = UE_ADDR_ANY,
.direction = UE_DIR_OUT,
.bufsize = USLCOM_BULK_BUF_SIZE,
 -  .flags = {.pipe_bof = 1,.force_short_xfer = 1,},
 +   .flags = {.pipe_bof = 1,},
.callback = &uslcom_write_callback,
},
  
 @@ -155,6 +174,16 @@ static const struct usb_config uslcom_co
.flags = {.pipe_bof = 1,.short_xfer_ok = 1,},
.callback = &uslcom_read_callback,
},
 +  [USLCOM_CTRL_DT_RD] = {
 +  .type = UE_CONTROL,
 +  .endpoint = 0x00,
 +  .direction = UE_DIR_ANY,
 +  .interval = 150,/* poll status every 150 ms */
 +  .bufsize = sizeof(struct usb_device_request) + 8,
 +  .flags = {.pipe_bof = 1,},
 +  .callback = &uslcom_control_callback,
 +  .timeout = 1000,/* 1 second timeout */
 +  },
  };
  
  static struct ucom_callback uslcom_callback = {
 @@ -371,6 +400,8 @@ uslcom_open(struct ucom_softc *ucom)
&req, NULL, 0, 1000)) {
DPRINTF("UART enable failed (ignored)\n");
}
 +  /* Start polling status */
 +  usbd_transfer_start(sc->sc_xfer[USLCOM_CTRL_DT_RD]);
  }
  
  static void
 @@ -379,13 +410,16 @@ uslcom_close(struct ucom_softc *ucom)
struct uslcom_softc *sc = ucom->sc_parent;
struct usb_device_request req;
  
 +  /* Stop polling status */
 +  usbd_transfer_stop(sc->sc_xfer[USLCOM_CTRL_D

Re: usb/162307: [uslcom][patch] cp2103 usb-to-serial driver does not support modem control lines

2011-11-05 Thread Hans Petter Selasky
On Saturday 05 November 2011 11:51:14 JD Louw wrote:
> usb/162307

Committed with some modifications:

1) control transfers automatically clear-stall.
2) control transfers should have a timeout
3) flowcontrol[2,3] must be zeroed
4) flowcontrol must be stored in little endian format
5) reduce the interval a little bit, because it is blocking other control 
transfers to this device.
6) reduce control transfer buffer to the request plus 8 bytes, of which only 1 
byte is used.

Please verify and check that my modifications to your patch are correct:
http://svn.freebsd.org/changeset/base/227108

Thanks for the patch!

--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: usb/162306: usb devices cant get address asignation, no memories, no wireless usb, no nothing, sorry my english, am cuban

2011-11-05 Thread Hans Petter Selasky
The following reply was made to PR usb/162306; it has been noted by GNATS.

From: Hans Petter Selasky 
To: freebsd-usb@freebsd.org
Cc: yoandy ,
 freebsd-gnats-sub...@freebsd.org
Subject: Re: usb/162306: usb devices cant get address asignation, no memories, 
no wireless usb, no nothing, sorry my english, am cuban
Date: Sat, 5 Nov 2011 12:26:24 +0100

 On Saturday 05 November 2011 08:25:42 yoandy wrote:
 > >Number: 162306
 > >Category:   usb
 > >Synopsis:   usb devices cant get address asignation, no memories, no
 > >wireless usb, no nothing, sorry my english, am cuban Confidential:   no
 > >Severity:   serious
 > >Priority:   high
 > >Responsible:freebsd-usb
 > >State:  open
 > >Quarter:
 > >Keywords:
 > >Date-Required:
 > >Class:  sw-bug
 > >Submitter-Id:   current-users
 > >Arrival-Date:   Sat Nov 05 07:30:18 UTC 2011
 > >Closed-Date:
 > >Last-Modified:
 > >Originator: yoandy
 > >Release:FreeBSD 8.2
 > 
 > >Organization:
 > casa
 > 
 > >Environment:
 > 
 > >Description:
 > usb_alloc_device: set address 2 failed (USB_ERR_STALLED, ignored)
 > 
 > usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_STALLED,
 > ignored)
 > 
 > usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_STALLED,
 > ignored)
 > 
 > ugen1.2:  at usbus1 (disconnected)
 > 
 > uhub_reattach_port: could not allocate new device
 > 
 > uhub_explore: illegal enable change, port 1
 > 
 > >How-To-Repeat:
 > usb_alloc_device: set address 2 failed (USB_ERR_STALLED, ignored)
 > 
 > usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_STALLED,
 > ignored)
 > 
 > usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_STALLED,
 > ignored)
 > 
 > ugen1.2:  at usbus1 (disconnected)
 > 
 > uhub_reattach_port: could not allocate new device
 > 
 > uhub_explore: illegal enable change, port 1
 > 
 
 Hi,
 
 Could you show more of dmesg?
 
 Like xhci,ehci,ohci and uhci?
 
 --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: usb/162306: usb devices cant get address asignation, no memories, no wireless usb, no nothing, sorry my english, am cuban

2011-11-05 Thread Hans Petter Selasky
On Saturday 05 November 2011 08:25:42 yoandy wrote:
> >Number: 162306
> >Category:   usb
> >Synopsis:   usb devices cant get address asignation, no memories, no
> >wireless usb, no nothing, sorry my english, am cuban Confidential:   no
> >Severity:   serious
> >Priority:   high
> >Responsible:freebsd-usb
> >State:  open
> >Quarter:
> >Keywords:
> >Date-Required:
> >Class:  sw-bug
> >Submitter-Id:   current-users
> >Arrival-Date:   Sat Nov 05 07:30:18 UTC 2011
> >Closed-Date:
> >Last-Modified:
> >Originator: yoandy
> >Release:FreeBSD 8.2
> 
> >Organization:
> casa
> 
> >Environment:
> 
> >Description:
> usb_alloc_device: set address 2 failed (USB_ERR_STALLED, ignored)
> 
> usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_STALLED,
> ignored)
> 
> usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_STALLED,
> ignored)
> 
> ugen1.2:  at usbus1 (disconnected)
> 
> uhub_reattach_port: could not allocate new device
> 
> uhub_explore: illegal enable change, port 1
> 
> >How-To-Repeat:
> usb_alloc_device: set address 2 failed (USB_ERR_STALLED, ignored)
> 
> usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_STALLED,
> ignored)
> 
> usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_STALLED,
> ignored)
> 
> ugen1.2:  at usbus1 (disconnected)
> 
> uhub_reattach_port: could not allocate new device
> 
> uhub_explore: illegal enable change, port 1
> 

Hi,

Could you show more of dmesg?

Like xhci,ehci,ohci and uhci?

--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"


usb/162307: [uslcom][patch] cp2103 usb-to-serial driver does not support modem control lines

2011-11-05 Thread JD Louw

>Number: 162307
>Category:   usb
>Synopsis:   [uslcom][patch] cp2103 usb-to-serial driver does not support 
>modem control lines
>Confidential:   no
>Severity:   non-critical
>Priority:   medium
>Responsible:freebsd-usb
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 05 11:00:21 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: JD Louw
>Release:FreeBSD 8.1-RELEASE i386
>Organization:
Nanoteq
>Environment:
FreeBSD jdl-desktop.lan 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Thu Dec 30 10:20:16 
SAST 2010 j...@jdl-desktop.lan:/usr/obj/usr/src/sys/MYKERNEL2  i386
>Description:
The current cp2103 driver lacks modem control line status updates (CTS, DTS, 
RI, DCD). Also missing is hardware flow control mode.
>How-To-Repeat:
Connect a cp2103 adapter to any modem-like device and notice the modem status 
lines are not updated.
>Fix:
The attached patch adds hardware flow control as well as a polling usb transfer 
mechanism to update the modem status lines.

Patch attached with submission follows:

--- /usr/src/sys/dev/usb/serial/uslcom.c2010-06-14 04:09:06.0 
+0200
+++ uslcom.c2011-11-05 09:33:04.0 +0200
@@ -64,43 +64,61 @@
 
 #defineUSLCOM_SET_DATA_BITS(x) ((x) << 8)
 
+/* Request types */
 #defineUSLCOM_WRITE0x41
 #defineUSLCOM_READ 0xc1
 
+/* Request codes */
 #defineUSLCOM_UART 0x00
 #defineUSLCOM_BAUD_RATE0x01
 #defineUSLCOM_DATA 0x03
 #defineUSLCOM_BREAK0x05
 #defineUSLCOM_CTRL 0x07
+#defineUSLCOM_RCTRL0x08
+#defineUSLCOM_SET_FLOWCTRL 0x13
 
+/* USLCOM_UART values */
 #defineUSLCOM_UART_DISABLE 0x00
 #defineUSLCOM_UART_ENABLE  0x01
 
+/* USLCOM_CTRL/USLCOM_RCTRL values */
 #defineUSLCOM_CTRL_DTR_ON  0x0001  
 #defineUSLCOM_CTRL_DTR_SET 0x0100
 #defineUSLCOM_CTRL_RTS_ON  0x0002
 #defineUSLCOM_CTRL_RTS_SET 0x0200
 #defineUSLCOM_CTRL_CTS 0x0010
 #defineUSLCOM_CTRL_DSR 0x0020
+#defineUSLCOM_CTRL_RI  0x0040
 #defineUSLCOM_CTRL_DCD 0x0080
 
+/* USLCOM_BAUD_RATE values */
 #defineUSLCOM_BAUD_REF 0x384000
 
+/* USLCOM_DATA values */
 #defineUSLCOM_STOP_BITS_1  0x00
 #defineUSLCOM_STOP_BITS_2  0x02
-
 #defineUSLCOM_PARITY_NONE  0x00
 #defineUSLCOM_PARITY_ODD   0x10
 #defineUSLCOM_PARITY_EVEN  0x20
 
 #defineUSLCOM_PORT_NO  0x /* XXX think this should be 0 
--hps */
 
+/* USLCOM_BREAK values */
 #defineUSLCOM_BREAK_OFF0x00
 #defineUSLCOM_BREAK_ON 0x01
 
+/* USLCOM_SET_FLOWCTRL values - 1st word */
+#defineUSLCOM_FLOW_DTR_ON  0x0001
+#defineUSLCOM_FLOW_CTS_HS  0x0008 /* CTS handshake */
+#defineUSLCOM_FLOW_RESERVED0xFF80
+/* USLCOM_SET_FLOWCTRL values - 2nd word */
+#defineUSLCOM_FLOW_RTS_ON  0x0040
+#defineUSLCOM_FLOW_RTS_HS  0x0080 /* RTS handshake */
+
 enum {
USLCOM_BULK_DT_WR,
USLCOM_BULK_DT_RD,
+   USLCOM_CTRL_DT_RD,
USLCOM_N_TRANSFER,
 };
 
@@ -122,6 +140,7 @@
 
 static usb_callback_t uslcom_write_callback;
 static usb_callback_t uslcom_read_callback;
+static usb_callback_t uslcom_control_callback;
 
 static void uslcom_open(struct ucom_softc *);
 static void uslcom_close(struct ucom_softc *);
@@ -144,7 +163,7 @@
.endpoint = UE_ADDR_ANY,
.direction = UE_DIR_OUT,
.bufsize = USLCOM_BULK_BUF_SIZE,
-   .flags = {.pipe_bof = 1,.force_short_xfer = 1,},
+   .flags = {.pipe_bof = 1,/*.force_short_xfer = 1,*/},
.callback = &uslcom_write_callback,
},
 
@@ -156,6 +175,15 @@
.flags = {.pipe_bof = 1,.short_xfer_ok = 1,},
.callback = &uslcom_read_callback,
},
+   [USLCOM_CTRL_DT_RD] = {
+   .type = UE_CONTROL,
+   .endpoint = 0x00,
+   .direction = UE_DIR_ANY,
+   .interval = 250, /* poll status every 250 ms */
+   .bufsize = USLCOM_BULK_BUF_SIZE,
+   .flags = {.pipe_bof = 1,.short_xfer_ok = 1,},
+   .callback = &uslcom_control_callback,
+   },
 };
 
 static struct ucom_callback uslcom_callback = {
@@ -262,6 +290,7 @@
mtx_lock(&sc->sc_mtx);
usbd_xfer_set_stall(sc->sc_xfer[USLCOM_BULK_DT_WR]);
usbd_xfer_set_stall(sc->sc_xfer[USLCOM_BULK_DT_RD]);
+   usbd_xfer_set_stall(sc->sc_xfer[USLCOM_CTRL_DT_RD]);
mtx_unlock(&sc->sc_mtx);
 
error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc,
@@ -306,6 +335,8 @@
&req, NULL, 0, 1000)) {

usb/162306: usb devices cant get address asignation, no memories, no wireless usb, no nothing, sorry my english, am cuban

2011-11-05 Thread yoandy

>Number: 162306
>Category:   usb
>Synopsis:   usb devices cant get address asignation, no memories, no 
>wireless usb, no nothing, sorry my english, am cuban
>Confidential:   no
>Severity:   serious
>Priority:   high
>Responsible:freebsd-usb
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 05 07:30:18 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: yoandy
>Release:FreeBSD 8.2
>Organization:
casa
>Environment:
>Description:
usb_alloc_device: set address 2 failed (USB_ERR_STALLED, ignored)

usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_STALLED, ignored)

usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_STALLED, ignored)

ugen1.2:  at usbus1 (disconnected)

uhub_reattach_port: could not allocate new device

uhub_explore: illegal enable change, port 1
>How-To-Repeat:
usb_alloc_device: set address 2 failed (USB_ERR_STALLED, ignored)

usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_STALLED, ignored)

usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_STALLED, ignored)

ugen1.2:  at usbus1 (disconnected)

uhub_reattach_port: could not allocate new device

uhub_explore: illegal enable change, port 1
>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"