Message ID | c37cabb26020f051388500db9fe1a34587e4c76d.1657149962.git.Thinh.Nguyen@synopsys.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-scsi-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B29B1C433EF for <linux-scsi@archiver.kernel.org>; Wed, 6 Jul 2022 23:36:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234656AbiGFXgr (ORCPT <rfc822;linux-scsi@archiver.kernel.org>); Wed, 6 Jul 2022 19:36:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234610AbiGFXgm (ORCPT <rfc822;linux-scsi@vger.kernel.org>); Wed, 6 Jul 2022 19:36:42 -0400 Received: from smtprelay-out1.synopsys.com (smtprelay-out1.synopsys.com [149.117.73.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A750C2CCA8; Wed, 6 Jul 2022 16:36:41 -0700 (PDT) Received: from mailhost.synopsys.com (sv1-mailhost2.synopsys.com [10.205.2.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mailhost.synopsys.com", Issuer "SNPSica2" (verified OK)) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 8263340CAF; Wed, 6 Jul 2022 23:36:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1657150601; bh=bAS8o77Z1Y+tMzGOThOXTs6nCn/UzEd3nCbgY2zNJnA=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=PamxDTt/zxJOTIpaGJgHyUYsZvb+vRoUVGHQCiBW0CIcGh9r5QcTC46XukSFsLGkd dJphZBwReCoydzIL5nxf5MkXu0CEO+YHoCu4Lz+ptKzIXPuyKJRfkIeWbc+bDqtoCG Z7s4k1SGTks+ODWip2zoQrkl/bBQKd0KDumt2ULmDRPYphMt+5nUDG2fRu06VGGaUo EJeSrZGkbkNSBOj6qM8ejdi9y7UWHFetqaz7fMzNQRrNZh3RsoxCMjos+sdiWy1abt 15TGk2cSvAdtk2SbxKYUlYsSLJLfUk071A6eNntMZGXWf8Om3DJgfyPynB3FuWa97q yUoZZLDm8Srdw== Received: from te-lab16-v2 (nanobot.internal.synopsys.com [10.204.48.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mailhost.synopsys.com (Postfix) with ESMTPSA id 659F1A006F; Wed, 6 Jul 2022 23:36:40 +0000 (UTC) Received: by te-lab16-v2 (sSMTP sendmail emulation); Wed, 06 Jul 2022 16:36:40 -0700 Date: Wed, 06 Jul 2022 16:36:40 -0700 Message-Id: <c37cabb26020f051388500db9fe1a34587e4c76d.1657149962.git.Thinh.Nguyen@synopsys.com> In-Reply-To: <cover.1657149962.git.Thinh.Nguyen@synopsys.com> References: <cover.1657149962.git.Thinh.Nguyen@synopsys.com> X-SNPS-Relay: synopsys.com From: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Subject: [PATCH 22/36] usb: gadget: f_tcm: Use extra number of commands To: Felipe Balbi <balbi@kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Thinh Nguyen <Thinh.Nguyen@synopsys.com>, linux-usb@vger.kernel.org Cc: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Precedence: bulk List-ID: <linux-scsi.vger.kernel.org> X-Mailing-List: linux-scsi@vger.kernel.org |
Series |
usb: gadget: f_tcm: Enhance UASP driver
|
expand
|
diff --git a/drivers/usb/gadget/function/tcm.h b/drivers/usb/gadget/function/tcm.h index df768559fb60..c7e6d36afd3a 100644 --- a/drivers/usb/gadget/function/tcm.h +++ b/drivers/usb/gadget/function/tcm.h @@ -16,7 +16,7 @@ #define UASP_SS_EP_COMP_LOG_STREAMS 5 #define UASP_SS_EP_COMP_NUM_STREAMS (1 << UASP_SS_EP_COMP_LOG_STREAMS) -#define USBG_NUM_CMDS UASP_SS_EP_COMP_NUM_STREAMS +#define USBG_NUM_CMDS (UASP_SS_EP_COMP_NUM_STREAMS + 1) enum { USB_G_STR_INT_UAS = 0,
To properly respond to host sending more commands than the number of streams the device advertises, the device needs to be able to reject the command with a response. Allocate an extra request to handle 1 more command than the number of streams. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> --- drivers/usb/gadget/function/tcm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)