From patchwork Wed Oct 27 20:10:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wesley Cheng X-Patchwork-Id: 12588005 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01C32C433FE for ; Wed, 27 Oct 2021 20:10:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DDD4760FC0 for ; Wed, 27 Oct 2021 20:10:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240496AbhJ0UMp (ORCPT ); Wed, 27 Oct 2021 16:12:45 -0400 Received: from alexa-out-sd-02.qualcomm.com ([199.106.114.39]:40705 "EHLO alexa-out-sd-02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243830AbhJ0UMn (ORCPT ); Wed, 27 Oct 2021 16:12:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1635365418; x=1666901418; h=from:to:cc:subject:date:message-id:mime-version; bh=4sZ8+PsZnpALtmEwUku1TEagKL1r7jaVqsFdyy1aw4Y=; b=SGS5dtQQlWu11AYrT7dIBsjPi6oPtqFHLRQ2nVfT0n0mqSh1PBF7s+5t EUIPjB+4pGiY+QDldi1TNSrmmI8EYuxpHpR1DddLszxU7eWmDlUvowTKf Y1tkqNYk2iDQTcv07EdsrxJC8WwRcRoUtD4vkaVgKG5cquoMUV/NUKjLY w=; Received: from unknown (HELO ironmsg03-sd.qualcomm.com) ([10.53.140.143]) by alexa-out-sd-02.qualcomm.com with ESMTP; 27 Oct 2021 13:10:17 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg03-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2021 13:10:17 -0700 Received: from nalasex01b.na.qualcomm.com (10.47.209.197) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.7; Wed, 27 Oct 2021 13:10:17 -0700 Received: from wcheng-linux1.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.7; Wed, 27 Oct 2021 13:10:16 -0700 From: Wesley Cheng To: , CC: , , , Wesley Cheng Subject: [PATCH v3 0/2] Disable mass storage endpoints during disconnect Date: Wed, 27 Oct 2021 13:10:05 -0700 Message-ID: <1635365407-31337-1-git-send-email-quic_wcheng@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01b.na.qualcomm.com (10.47.209.197) Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Changes in v3: - Modify statement for usb_ep_enable(). - Add explicit statement mentioning that APIs can be called in atomic context. Changes in v2: - Revised comments for usb_ep_disable() as it should be safe to be executed in atomic contexts as well. Other FDs are currently calling ep disable during the disconnect event as well. This series calls the usb_ep_disable() API directly from fsg_disable() as there is a possibility that UDCs that support runtime PM may already be in a suspended state, leading to HW access while resources are disabled. Wesley Cheng (2): usb: gadget: udc: core: Revise comments for USB ep enable/disable usb: gadget: f_mass_storage: Disable eps during disconnect drivers/usb/gadget/function/f_mass_storage.c | 10 ++++++++++ drivers/usb/gadget/udc/core.c | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) Acked-by: Alan Stern