Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754477AbbGXNxj (ORCPT ); Fri, 24 Jul 2015 09:53:39 -0400 Received: from foo.stuge.se ([212.116.89.98]:56935 "EHLO foo.stuge.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754423AbbGXNxf (ORCPT ); Fri, 24 Jul 2015 09:53:35 -0400 Message-ID: <20150724135332.2022.qmail@stuge.se> Date: Fri, 24 Jul 2015 15:53:32 +0200 From: Peter Stuge To: Mathias Nyman Cc: arekm@maven.pl, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 1 Mail-Followup-To: Mathias Nyman , arekm@maven.pl, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org References: <201507181649.37745.a.miskiewicz@gmail.com> <201507202213.29189.a.miskiewicz@gmail.com> <55AE5B02.1000908@linux.intel.com> <201507221612.58846.a.miskiewicz@gmail.com> <55B228A4.2020604@linux.intel.com> <55B24006.7020300@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55B24006.7020300@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 666 Lines: 18 Mathias Nyman wrote: > +++ b/drivers/usb/host/xhci-ring.c > @@ -82,7 +82,7 @@ dma_addr_t xhci_trb_virt_to_dma(struct xhci_segment *seg, > return 0; > /* offset in TRBs */ > segment_offset = trb - seg->trbs; > - if (segment_offset > TRBS_PER_SEGMENT) > + if (segment_offset > TRBS_PER_SEGMENT - 1) Maybe change the > comparison to >= rather than add the extra "- 1"? //Peter -- 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/