Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756389Ab3CZXQL (ORCPT ); Tue, 26 Mar 2013 19:16:11 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:53315 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754670Ab3CZXBv (ORCPT ); Tue, 26 Mar 2013 19:01:51 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alan Stern , Joseph Salisbury , Stephen Thirlwall Subject: [ 01/49] Revert "USB: EHCI: dont check DMA values in QH overlays" Date: Tue, 26 Mar 2013 16:00:58 -0700 Message-Id: <20130326225839.713484743@linuxfoundation.org> X-Mailer: git-send-email 1.8.1.rc1.5.g7e0651a In-Reply-To: <20130326225839.554028294@linuxfoundation.org> References: <20130326225839.554028294@linuxfoundation.org> User-Agent: quilt/0.60-5.1.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2121 Lines: 60 3.0-stable review patch. If anyone has any objections, please let me know. ------------------ This reverts commit 0319f9909ce68a7516dfc8d53400e07168d281a8, which is commit feca7746d5d9e84b105a613b7f3b6ad00d327372 upstream. It shouldn't have gone into this stable release. Signed-off-by: Greg Kroah-Hartman Cc: Alan Stern Cc: Joseph Salisbury Cc: Stephen Thirlwall --- drivers/usb/host/ehci-q.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) --- a/drivers/usb/host/ehci-q.c +++ b/drivers/usb/host/ehci-q.c @@ -137,7 +137,7 @@ qh_refresh (struct ehci_hcd *ehci, struc * qtd is updated in qh_completions(). Update the QH * overlay here. */ - if (qh->hw->hw_token & ACTIVE_BIT(ehci)) { + if (cpu_to_hc32(ehci, qtd->qtd_dma) == qh->hw->hw_current) { qh->hw->hw_qtd_next = qtd->hw_next; qtd = NULL; } @@ -450,19 +450,11 @@ qh_completions (struct ehci_hcd *ehci, s else if (last_status == -EINPROGRESS && !urb->unlinked) continue; - /* - * If this was the active qtd when the qh was unlinked - * and the overlay's token is active, then the overlay - * hasn't been written back to the qtd yet so use its - * token instead of the qtd's. After the qtd is - * processed and removed, the overlay won't be valid - * any more. - */ - if (state == QH_STATE_IDLE && - qh->qtd_list.next == &qtd->qtd_list && - (hw->hw_token & ACTIVE_BIT(ehci))) { + /* qh unlinked; token in overlay may be most current */ + if (state == QH_STATE_IDLE + && cpu_to_hc32(ehci, qtd->qtd_dma) + == hw->hw_current) { token = hc32_to_cpu(ehci, hw->hw_token); - hw->hw_token &= ~ACTIVE_BIT(ehci); /* An unlink may leave an incomplete * async transaction in the TT buffer. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/