Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754873AbbEUKcV (ORCPT ); Thu, 21 May 2015 06:32:21 -0400 Received: from mail-bl2on0086.outbound.protection.outlook.com ([65.55.169.86]:60971 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754514AbbEUKcO (ORCPT ); Thu, 21 May 2015 06:32:14 -0400 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none; From: Subbaraya Sundeep Bhatta To: CC: , , , , "Subbaraya Sundeep Bhatta" Subject: [PATCH v2 3/3] usb: dwc3: gadget: return error if command sent to DEPCMD register fails Date: Thu, 21 May 2015 15:46:48 +0530 Message-ID: <1432203408-5482-3-git-send-email-sbhatta@xilinx.com> X-Mailer: git-send-email 1.7.4 In-Reply-To: <1432203408-5482-1-git-send-email-sbhatta@xilinx.com> References: <1432203408-5482-1-git-send-email-sbhatta@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-21558.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11OLC002;1:4mptJ63H2Szqj/evS5yPaXxeM7QQxmzYqfvlqMDVzZk1aMBi1kZYtwF66QOb1Ib9Xq+p+FgLKh6ptUhiicjWT0r/8/L/Z6RlN4YU8jbyM7h509sH4LPluizNnnDeqJuuLjsXETdw2jgVYhfpnGyKP9Mso2lQh1FRODWgJ/n4Zr4igc8oTRnvBV7jO9eWgJ0zRFA19LsjsEizBiw+u3zFjVuDjchPLZIwZj0iN2le0b+hmD13xxmZp9I1nFL/uDuip+9yaV4q5c+4w41i5EFK3f6BIawj7yth6sTkcsIzwR4mV7BNQaB5JpZTT5+6Hv0n X-Forefront-Antispam-Report: CIP:149.199.60.83;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(438002)(189002)(199003)(36386004)(189998001)(52956003)(46386002)(110136002)(33646002)(77156002)(62966003)(45336002)(19580395003)(19580405001)(4001540100001)(6806004)(87936001)(46102003)(92566002)(81156007)(107886002)(50226001)(48376002)(86362001)(2950100001)(50466002)(50986999)(76176999)(5001830100001)(103686003)(64706001)(229853001)(47776003)(106466001)(5001960100002)(2351001)(42186005)(5001860100001)(36756003)(63266004)(107986001)(4001430100001)(90966001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN1BFFO11HUB029;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;PTR:unknown-60-83.xilinx.com;MX:1;A:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11HUB029;2:F3G/6RiARyVKm2GzqwToDyjCi3reRH4JNj1kLhglZgKaarC+rPok4uQdO1/TDJkK;2:TKlhKlGfiDQyPLl2Yh2ePVtt7kG/uekB4qNkaKYoho8KrNpKhqsS8SCiQRkigNkoungusVFPK6pt5tvAimrTRevYXltNkAHzB8sbtOdhOFxHa/T83jzo9G6VelLG65ECxg6phkXpuGNnUKDAU0FXKZDWUdCmFoJ6rub5whK01ABUsp2nmU6Pt7JLfhHFrGudp4qZ83U4f9jiXZZUlIDqe5g+g3fVtdCSHaQ6gO0pav8=;6:4y/gxe1HJBscaCPAX80mU1wd1+L0f9gNalvmenDY4TdQfx/Hvj9tLdcef0JO2QF+NtzPoXU9FrO1P6b/kIKvh7Hr5AbJp3tb9vaTGf5cmbWjRYWzhso6xSygt+GX384DoLUhedYdgpr06iJ6DtdLzFN/RgNmZZpXbFTfpObD4OIaF0WMLcIn6Zc3pZ2/MVEwj48HLdDsBIg71axdetT97PSAodurNTci//rnVDi6X1vQf6F2bMxPpmmY2vJss4J1+2FL+qSsl+7FI9DS/e9rbim37hWr1JKmgEPpic/lFIbJddans4VAHs1OU8KezshKuYXAXwHZyB3D6c9v72R96GfBS5LDKcbBiYOrzYAb1KH24ym1O4VqPo5nilPGc3LPQ6Il5o8cYdGZQ/jLLe5R5kop7YHASlxgTcuEmfCsr+AkBYa9xbcEEHHdwlq/1xr12X3eANCstEg2yKZiw4pxBehVgottk8yW51bBDfV62ADuRXLJBu0JXP+E2cCCqlNp X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN1BFFO11HUB029; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BN1BFFO11HUB029;BCL:0;PCL:0;RULEID:;SRVR:BN1BFFO11HUB029; X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11HUB029;3:YnHiAUKzy4e47+aq5fi6dWEAH/4r3imgn+aU9RPoVVHcL0PtlIVpLLjl3x5vvmbvaXiRO1D3pdnVO9xIXf4OUv4WGuWbFrRr2LEQ8a/P7v3DYBN1Ay8x78ODgTk6vAIQmWNSsMFxGv8VoaXh3hhg7/CDLUEjbD73PPNGG5IXUDOjy/P7+Tnx9JSBzQmnhXsN5aTyoY2pNO173gu7UbYuGBY43oSKBSHiHrGRXD/DT9LZIbxSQtckyexmHclDAxA7hOw4L+2FXn8JngxVMBpSGo87MIxnDyDacAgJ5jjmGWw= X-Forefront-PRVS: 0583A86C08 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN1BFFO11HUB029;9:dbkClsDoS/m8mmEctGRoiSm9kYS1h2ktA6O4VcXb?= =?us-ascii?Q?kCCgbkdOTEUOxYSx1MvSZf8eGh7w2Ht+Qmp12zI/WRM8vWk4EOwOM/q1eKik?= =?us-ascii?Q?EIT2iGOZpm5Jf7lu5dFddlVBJdTZrEkfojnY3Zl4+YLRGJ5TAM6F5T3nhIAH?= =?us-ascii?Q?mK1r0i44RchMuC1eZVKXZZABdT1Mt7kAAd1oTqk98YY8s9X4u2wXR5vsAUfE?= =?us-ascii?Q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T0XpJiWl?= =?us-ascii?Q?RI+ctmWnrhy+45qnUaOmSND1aPhIj6KR?= X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11HUB029;3:neZxwAyxJs84n6ZB1rpfThki39QWoasGIpihDQtKiGvberxlUfSnRXL3NUsTytL9Ok/fzWucivA6yfb5HaQz2J8sfJooscZi/MqH87/pRjjWZca3Q5jfUi2d1VGJfvwyqdpNizSX1r6bged9gJF1CA==;10:hxCMDZ75KVrPPhkamomQuXhBcuXqLim5Ac2pYYOzMZDo59h0GmY1ZNoMm2iVng3CnvELHXfCdxYN9dMQehTlNk3FGI6SNSPeBtgTMX7Bp3g= X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2015 10:16:56.9923 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1BFFO11HUB029 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1053 Lines: 34 We need to return error to caller if command is not sent to controller succesfully. Signed-off-by: Subbaraya Sundeep Bhatta Fixes: 72246da40f37 (usb: Introduce DesignWare USB3 DRD Driver) Cc: --- v2 changes: Added Fixes and Cc in commit message. drivers/usb/dwc3/gadget.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index fcbe120..55b5edc 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -330,6 +330,8 @@ int dwc3_send_gadget_ep_cmd(struct dwc3 *dwc, unsigned ep, dwc3_trace(trace_dwc3_gadget, "Command Complete --> %d", DWC3_DEPCMD_STATUS(reg)); + if (DWC3_DEPCMD_STATUS(reg)) + return -EINVAL; return 0; } -- 1.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/