From patchwork Thu Dec 10 10:47:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ikjoon Jang X-Patchwork-Id: 11964135 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81A4DC4361B for ; Thu, 10 Dec 2020 10:49:16 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3B9BE2388B for ; Thu, 10 Dec 2020 10:49:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3B9BE2388B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=5fbWqO4VKVZ7phWEwHMlUqPsOCfRO0sE700OE+BtNa0=; b=k6qdDy8cRgBER+iUcnZU+GJ1nK JvymfTCEkOnZwMgNYeGJAoCBUuQ3cj0UkGf64YmfsUXQTyXuDkrqSwnQJQPs1KaziQNGLKxizMsLW 2O3vNRYTO6qkTS/bTsKw1ir+YdDkaFSu7oaETflo1VMQD40KW+7xqOC2fBsBZhBi2jSXRhJVL4Reu dajQ9BAFIY75I+GkuM6l2NnAU5FAGz6xECN3ddzKjRvqpgaH/wG5gmCbc6TLTWL0sgwJ+33qYGAKW wyPnm8V5yiQ1unelzbQABsT4MuwIFpSp9cWGr8g/vwtl0pZtkxRnw1jWRHU32Lur5xXWbjDMaQ8jH RcEipQKA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1knJUO-0002kK-Bu; Thu, 10 Dec 2020 10:48:00 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1knJUK-0002iI-7g for linux-arm-kernel@lists.infradead.org; Thu, 10 Dec 2020 10:47:58 +0000 Received: by mail-pg1-x543.google.com with SMTP id n1so1136880pge.8 for ; Thu, 10 Dec 2020 02:47:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/1CLF3jhgzuG8CXsCmdXZEYaITzNoEWk6wc5CrYfURY=; b=MYtZnMZka/yCtbeqjEtHPQMPRp1pS+LV5yBBJOSv5CxwHvamurnZGghYtmeuTU8F61 sDFbaTQ5Vh11gbpI41KxB+fM6OZ66qRVUMM00yzvye7KdgyP9tov+Pi9eAdXP0k5Qz7R uSrEc6Xw6liW70X0OkD8dzvMZDS8DkyvuyhmY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/1CLF3jhgzuG8CXsCmdXZEYaITzNoEWk6wc5CrYfURY=; b=dziwcUBWDOM4rB+oFV9HeU/O3dZdcPUYUGSPpIumJ0NB/3rpl0Qc3ns8r/YvBcdAo6 U+LkR1rqF/tz425Bat7kmFH7SPiotRrdxS95nTPExotIyDoQoz4srsAo2AwgEvR87E4B rakPyx2dt6gkjYgXDcvDWrReAZZlkEmsdmnOrZrcitSqcgkVshG+Xe+aCe/eqyPypGnh +6ciLSFCRUfLvPN0LWgJVHou7y0I4T5nVeHIKOCTerFM/0NQ2U5cH3PDEQ7LUxS9uqYt jT0zM/gO7fvSJ/jw+TA/w11z44PvmYbwawJaMiMUzt6YjYgl8Ipp7mbuoIjgrLtpKYB0 GFTw== X-Gm-Message-State: AOAM532QpDbs13ZVEye7VaNu/63CEhvbgch0s4DgwoVMMG0lxXyFQynn wU+5M/g3a6p/O1/w3mrqHb3oDA== X-Google-Smtp-Source: ABdhPJz1UOPyHnOnpgetFP3LmdV2keXwZM75/Y/XQxXs0IUr220E0wzUZTDhvJvtJum/Y71jRrXerg== X-Received: by 2002:a62:d142:0:b029:19e:6b61:7f80 with SMTP id t2-20020a62d1420000b029019e6b617f80mr6244596pfl.9.1607597272744; Thu, 10 Dec 2020 02:47:52 -0800 (PST) Received: from ikjn-p920.tpe.corp.google.com ([2401:fa00:1:b:f693:9fff:fef4:a8fc]) by smtp.gmail.com with ESMTPSA id y1sm6386658pff.17.2020.12.10.02.47.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Dec 2020 02:47:52 -0800 (PST) From: Ikjoon Jang To: linux-mediatek@lists.infradead.org, linux-usb@vger.kernel.org Subject: [PATCH v2 0/3] Release allocated periodic bandwidth data from reset_bandwidth() Date: Thu, 10 Dec 2020 18:47:44 +0800 Message-Id: <20201210104747.3416781-1-ikjn@chromium.org> X-Mailer: git-send-email 2.29.2.576.ga3fc446d84-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201210_054756_332000_6EFD5BA8 X-CRM114-Status: GOOD ( 10.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhanyong Wang , Mathias Nyman , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Tianping Fang , Matthias Brugger , Chunfeng Yun , Ikjoon Jang , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org xhci-mtk releases allocated TT bandwidth data only when whole endpoints of a device are dropped as there're only {add|drop}_endpoint() hooks are defined. This patchset adds more hooks and releases all bandwidth data from reset_bandwidth() path, not drop_endpoint(). Changes in v2: - fix a 0-day warning from unused variable - split one big patch into three patches - bugfix in hw flags Ikjoon Jang (3): usb: xhci-mtk: code cleanups in getting bandwidth table usb: xhci-mtk: delay association of tt and ep usb: xhci-mtk: fix unreleased bandwidth data drivers/usb/host/xhci-mtk-sch.c | 180 ++++++++++++++++++++------------ drivers/usb/host/xhci-mtk.h | 13 +++ drivers/usb/host/xhci.c | 9 ++ 3 files changed, 133 insertions(+), 69 deletions(-)