[Trac #526] Libertas wireless rendered unuseable due to certain commands

Zarro Boogs per Child bugtracker at laptop.org
Fri Dec 1 00:14:04 EST 2006


#526: Libertas wireless rendered unuseable due to certain commands
---------------------+------------------------------------------------------
 Reporter:  marcelo  |       Owner:  marcelo
     Type:  defect   |      Status:  new    
 Priority:  low      |   Milestone:  BTest-2
Component:  distro   |    Keywords:         
---------------------+------------------------------------------------------
 MAC register access commands (and possibly others, not seen it on any
 other though) can cause
 some sort of USB whackiness rendering the connection dead.

 Luckily I had USB debugging turned on, which gives us a special clue.

 {{{
 DNLD_CMD: Sent command 0x1a @ 176432
 DNLD_CMD: Command: 1a 00 10 00
 19 03 00 00 01 00 88 00 ff 00 00 00
 Leave: DownloadCommandToStation ,
 drivers/net/wireless/libertas/wlan_cmd.c:1278
 Leave: libertas_execute_next_command,
 drivers/net/wireless/libertas/wlan_cmd.c:2075
  ehci_hcd 0000:00:0f.5: devpath 4 ep3in 3strikes
 Enter: if_usb_receive, drivers/net/wireless/libertas/if_usb.c:564
 Leave: if_usb_receive, drivers/net/wireless/libertas/if_usb.c:661
  main-thread 111: IntCounter=0 CurrentTxSkb=00000000 dnld_sent=0
  main-thread sleeping... Conn=1
 IntC=0 PS_Mode=0 PS_State=0
 Leave: libertas_prepare_and_send_command,
 drivers/net/wireless/libertas/wlan_cmd.c:1718
 Enter: command_timer_fn, drivers/net/wireless/libertas/wlan_fw.c:382
 command_timer_fn fired.
 Re-sending same command as it timeout...!
 Enter: libertas_queue_cmd, drivers/net/wireless/libertas/wlan_cmd.c:1146
 }}}

 After the ehci_hcd debug the connections appears to be dead.

 Different occasion:
 {{{
 DNLD_CMD: Sent command 0x1a @ 176932
 DNLD_CMD: Command: 1a 00 10 00 19 03 00 00 01 00
 ehci_hcd 0000:00:0f.5: devpath 4 ep2out 3strikes
 URB in failure status
 O88 00 ff 00 00 00
 }}}


 The ehci_hcd debug msg comes from the EHCI queue handling
 (drivers/usb/host/ehci-q.c:)

 {{{
         /* serious "can't proceed" faults reported by the hardware */
         if (token & QTD_STS_HALT) {
                 if (token & QTD_STS_BABBLE) {
                         /* FIXME "must" disable babbling device's port too
 */
                         urb->status = -EOVERFLOW;
                 } else if (token & QTD_STS_MMF) {
                         /* fs/ls interrupt xfer missed the complete-split
 */
                         urb->status = -EPROTO;
                 } else if (token & QTD_STS_DBE) {
                         urb->status = (QTD_PID (token) == 1) /* IN ? */
                                 ? -ENOSR  /* hc couldn't read data */
                                 : -ECOMM; /* hc couldn't write data */
                 } else if (token & QTD_STS_XACT) {
                         /* timeout, bad crc, wrong PID, etc; retried */
                         if (QTD_CERR (token))
                                 urb->status = -EPIPE;
                         else {
                                 ehci_dbg (ehci, "devpath %s ep%d%s
 3strikes\n",
                                         urb->dev->devpath,
                                         usb_pipeendpoint (urb->pipe),
                                         usb_pipein (urb->pipe) ? "in" :
 "out");
                                 urb->status = -EPROTO;
                         }
 }}}

 And surprise:

 #define QTD_STS_XACT    (1 << 3)        /* device gave illegal response */

 Requires EHCI knowledge to better understand the problem. Will give the
 EHCI specs a try.

 HOW TO REPRODUCE:

 {{{
 -bash-3.1# mount | grep debugfs
 none on /mnt type debugfs (rw)
 -bash-3.1# pwd
 /mnt/libertas_wireless/eth0/registers
 # for i in `seq 0 4 512` ; do echo $i > rdmac ; cat rdmac ; done

 }}}

-- 
Ticket URL: <http://dev.laptop.org/ticket/526>
One Laptop Per Child <http://laptop.org/>



More information about the Bugs mailing list