From owner-freebsd-usb@FreeBSD.ORG Sun Jul 21 19:31:21 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4E3132CD for ; Sun, 21 Jul 2013 19:31:21 +0000 (UTC) (envelope-from hps@bitfrost.no) Received: from mta.bitpro.no (mta.bitpro.no [92.42.64.202]) by mx1.freebsd.org (Postfix) with ESMTP id D2F70EB4 for ; Sun, 21 Jul 2013 19:31:20 +0000 (UTC) Received: from mail.lockless.no (mail.lockless.no [46.29.221.38]) by mta.bitpro.no (Postfix) with ESMTP id 5511A7A14B; Sun, 21 Jul 2013 21:31:13 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.lockless.no (Postfix) with ESMTP id C887B8EF629; Sun, 21 Jul 2013 21:31:16 +0200 (CEST) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at lockless.no Received: from mail.lockless.no ([127.0.0.1]) by localhost (mail.lockless.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Si1GiqZ2zMH0; Sun, 21 Jul 2013 21:31:15 +0200 (CEST) Received: from laptop015.hselasky.homeunix.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) by mail.lockless.no (Postfix) with ESMTPSA id 847768EF628; Sun, 21 Jul 2013 21:31:15 +0200 (CEST) Message-ID: <51EC375E.2030404@bitfrost.no> Date: Sun, 21 Jul 2013 21:32:46 +0200 From: Hans Petter Selasky Organization: Bitfrost A/S User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130522 Thunderbird/17.0.6 MIME-Version: 1.0 To: "freebsd-usb@freebsd.org" , bsd.gaijin@gmail.com Subject: Re: usb/180726: XHCI umass support breaks between r248085 and r252560 on 9-STABLE References: <201307211906.r6LJ6BU7024335@oldred.freebsd.org> In-Reply-To: <201307211906.r6LJ6BU7024335@oldred.freebsd.org> Content-Type: multipart/mixed; boundary="------------050502040601060004000209" X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jul 2013 19:31:21 -0000 This is a multi-part message in MIME format. --------------050502040601060004000209 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 07/21/13 21:06, Alexandre Kovalenko wrote: > >> Number: 180726 >> Category: usb >> Synopsis: XHCI umass support breaks between r248085 and r252560 on 9-STABLE >> 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: Sun Jul 21 19:10:00 UTC 2013 >> Closed-Date: >> Last-Modified: >> Originator: Alexandre Kovalenko >> Release: 9-STABLE >> Organization: >> Environment: > FreeBSD twinhead 9.2-BETA1 FreeBSD 9.2-BETA1 #11 r248085:253503: Sun Jul 21 14:29:42 EDT 2013 root@twinhead:/usr/obj/usr/src/sys/TWINHEAD amd64 >> Description: > > Three different external hard drives (Seagate, Western Digital and noname USB 3.0 enclosure) refused to be recognized as the umass devices. Reverting /usr/src/sys/dev/bsd/controller to r248085, building and loading just xhci module makes drives appear again. Below are snippets from the log in both cases: > Can you try: 1) Attached patch. 2) Non ASMedia USB 3.0 controller --HPS --------------050502040601060004000209 Content-Type: text/x-patch; name="xhci.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xhci.diff" diff --git a/sys/dev/usb/controller/xhci.c b/sys/dev/usb/controller/xhci.c index e6d5865..7070ef7 100644 --- a/sys/dev/usb/controller/xhci.c +++ b/sys/dev/usb/controller/xhci.c @@ -1654,7 +1654,7 @@ restart: /* fill out buffer pointers */ if (average == 0) { - npkt = 0; + npkt = 1; memset(&buf_res, 0, sizeof(buf_res)); } else { usbd_get_page(temp->pc, temp->offset + @@ -1691,9 +1691,7 @@ restart: switch (temp->trb_type) { case XHCI_TRB_TYPE_ISOCH: - /* BEI: Interrupts are inhibited until EOT */ dword = XHCI_TRB_3_CHAIN_BIT | XHCI_TRB_3_CYCLE_BIT | - XHCI_TRB_3_BEI_BIT | XHCI_TRB_3_TBC_SET(temp->tbc) | XHCI_TRB_3_TLBPC_SET(temp->tlbpc); if (td != td_first) { @@ -1728,10 +1726,8 @@ restart: dword |= XHCI_TRB_3_DIR_IN; break; default: /* XHCI_TRB_TYPE_NORMAL */ - /* BEI: Interrupts are inhibited until EOT */ dword = XHCI_TRB_3_CHAIN_BIT | XHCI_TRB_3_CYCLE_BIT | XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_NORMAL) | - XHCI_TRB_3_BEI_BIT | XHCI_TRB_3_TBC_SET(temp->tbc) | XHCI_TRB_3_TLBPC_SET(temp->tlbpc); if (temp->direction == UE_DIR_IN) --------------050502040601060004000209--