Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751134AbdFANRx (ORCPT ); Thu, 1 Jun 2017 09:17:53 -0400 Received: from mga07.intel.com ([134.134.136.100]:17181 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750952AbdFANRw (ORCPT ); Thu, 1 Jun 2017 09:17:52 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,279,1493708400"; d="scan'208";a="975567470" Subject: Re: [LINUX PATCH] usb: xhci: Add toggle cycle bit for the last seg trb when cached ring is used To: Anurag Kumar Vulisha , mathias.nyman@intel.com, gregkh@linuxfoundation.org References: <1496238110-4998-1-git-send-email-anuragku@xilinx.com> Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, anirudh@xilinx.com, Anurag Kumar Vulisha From: Mathias Nyman Message-ID: <593014A0.9010509@linux.intel.com> Date: Thu, 1 Jun 2017 16:20:32 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <1496238110-4998-1-git-send-email-anuragku@xilinx.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1055 Lines: 26 On 31.05.2017 16:41, Anurag Kumar Vulisha wrote: > At present USB 2.0 cameras fail to play when run for 2nd time or greater. > This issue occurs only when previous endpoint cached ring is used instead > of allocating a new endpoint ring. The root cause of the problem narrows > down to the Toggle bit, which is not getting set on the last trb of the > cached ring last segment. When the controller fetches the last link trb > with no toggle bit set, abnormal behaviour is generated. > This patch solves that problem by adding the TOGGLE bit for the last trb > of the last segment of the cached ring. > > Signed-off-by: Anurag Kumar Vulisha Thanks, nice catch. I'm thinking about removing the whole endpoint ring caching instead. We are using more memory by caching the rings instead of freeing them, especially as we always try to allocate a new ring and only use the cached ones when we fail to allocate a new ring. Would you be willing to test a patch that removes the ring cache completely with your setup? Thanks Mathias