From patchwork Wed Oct 14 14:56:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jassi Brar X-Patchwork-Id: 54956 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by patches.linaro.org (Postfix) with ESMTPS id A61D220490 for ; Wed, 14 Oct 2015 14:56:46 +0000 (UTC) Received: by lbwr8 with SMTP id r8sf27421929lbw.0 for ; Wed, 14 Oct 2015 07:56:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=aH56sxjkWYfTqT5JkCAJDIHjgbFJRjvqflu8+bWErsw=; b=YGcQf2J0qiXoEtTRrzSTPGlTSiHYcb8q7wO3K9MA2/QeHwqlTfJ52PmlrA0otZZhG6 n4HVmfdCFT3BvO+/83pJioK2d98Nc70ZIhryS7qV0OXWxmZhftSMtjCkJUp6NI01Cikj 6POkz2Lv5d8xiximegCgVLAmsB9lDYNXk7YR/rycTFkShiJvCj8X7F6VN92e6s3UMQAM NxrDq0E0EIZszdkx6dvtryZwKvikly9Oa7f+Zhgn2KVyht86gIkAS4Vd1I64Wn9lLpTQ WyguJTUtosKvwtrPI2krqM4HgaeDHC/PH13TQv/KAgujhHpjbOJeDUldj+ntqiR97uar VTHg== X-Gm-Message-State: ALoCoQm/oG60hpwQ9OjnDV10P8YnCzTcghBWFWeekLmKSFWGFaI0WCzpJj2wAhbgi7vrl5THDiHU X-Received: by 10.180.210.71 with SMTP id ms7mr993111wic.4.1444834605610; Wed, 14 Oct 2015 07:56:45 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.31.207 with SMTP id f198ls52947lff.31.gmail; Wed, 14 Oct 2015 07:56:45 -0700 (PDT) X-Received: by 10.25.18.233 with SMTP id 102mr1217242lfs.96.1444834605282; Wed, 14 Oct 2015 07:56:45 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id uk5si5820312lbb.90.2015.10.14.07.56.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Oct 2015 07:56:45 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by lbbck17 with SMTP id ck17so48576894lbb.1 for ; Wed, 14 Oct 2015 07:56:45 -0700 (PDT) X-Received: by 10.112.168.228 with SMTP id zz4mr1885440lbb.73.1444834605167; Wed, 14 Oct 2015 07:56:45 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp60600lbq; Wed, 14 Oct 2015 07:56:44 -0700 (PDT) X-Received: by 10.50.45.33 with SMTP id j1mr4245109igm.61.1444834603886; Wed, 14 Oct 2015 07:56:43 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i10si7539681ioo.115.2015.10.14.07.56.43; Wed, 14 Oct 2015 07:56:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753454AbbJNO4n (ORCPT + 1 other); Wed, 14 Oct 2015 10:56:43 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:36501 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752506AbbJNO4m (ORCPT ); Wed, 14 Oct 2015 10:56:42 -0400 Received: by pabur7 with SMTP id ur7so7708035pab.3 for ; Wed, 14 Oct 2015 07:56:41 -0700 (PDT) X-Received: by 10.68.68.197 with SMTP id y5mr4142830pbt.88.1444834601669; Wed, 14 Oct 2015 07:56:41 -0700 (PDT) Received: from localhost.localdomain ([61.1.158.252]) by smtp.gmail.com with ESMTPSA id gi4sm10203534pbc.4.2015.10.14.07.56.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Oct 2015 07:56:40 -0700 (PDT) From: jaswinder.singh@linaro.org To: linux-usb@vger.kernel.org Cc: balbi@ti.com, stable@vger.kernel.org, Jassi Brar Subject: [PATCH] usb: gadget: function: acm: return zlp for OUT setup Date: Wed, 14 Oct 2015 20:26:30 +0530 Message-Id: <1444834590-25759-1-git-send-email-jassisinghbrar@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: stable-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: stable@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: jaswinder.singh@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Jassi Brar We must return 0 for any OUT setup request, otherwise protocol error may occur. Signed-off-by: Jassi Brar --- drivers/usb/gadget/function/f_acm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/function/f_acm.c b/drivers/usb/gadget/function/f_acm.c index aad8165..14d9e28 100644 --- a/drivers/usb/gadget/function/f_acm.c +++ b/drivers/usb/gadget/function/f_acm.c @@ -364,7 +364,7 @@ static int acm_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl) || w_index != acm->ctrl_id) goto invalid; - value = w_length; + value = 0; cdev->gadget->ep0->driver_data = acm; req->complete = acm_complete_set_line_coding; break;