linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/3] usb: dwc3: gadget: Fix incorrect DEPCMD and DGCMD status macros
@ 2015-05-21 10:16 Subbaraya Sundeep Bhatta
  2015-05-21 10:16 ` [PATCH v2 2/3] usb: dwc3: gadget: return error if command sent to DGCMD register fails Subbaraya Sundeep Bhatta
  2015-05-21 10:16 ` [PATCH v2 3/3] usb: dwc3: gadget: return error if command sent to DEPCMD " Subbaraya Sundeep Bhatta
  0 siblings, 2 replies; 23+ messages in thread
From: Subbaraya Sundeep Bhatta @ 2015-05-21 10:16 UTC (permalink / raw)
  To: balbi; +Cc: gregkh, linux-usb, linux-kernel, stable, Subbaraya Sundeep Bhatta

Fixed the incorrect macro definitions correctly as per databook.

Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
Fixes: b09bb64239c8 (usb: dwc3: gadget: implement Global Command support)
Cc: <stable@vger.kernel.org> #v3.5+
---
v2 changes:
	Added Fixes and Cc in commit message.

 drivers/usb/dwc3/core.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index fdab715..c0eafa6 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -339,7 +339,7 @@
 #define DWC3_DGCMD_SET_ENDPOINT_NRDY	0x0c
 #define DWC3_DGCMD_RUN_SOC_BUS_LOOPBACK	0x10
 
-#define DWC3_DGCMD_STATUS(n)		(((n) >> 15) & 1)
+#define DWC3_DGCMD_STATUS(n)		(((n) >> 12) & 0x0F)
 #define DWC3_DGCMD_CMDACT		(1 << 10)
 #define DWC3_DGCMD_CMDIOC		(1 << 8)
 
@@ -355,7 +355,7 @@
 #define DWC3_DEPCMD_PARAM_SHIFT		16
 #define DWC3_DEPCMD_PARAM(x)		((x) << DWC3_DEPCMD_PARAM_SHIFT)
 #define DWC3_DEPCMD_GET_RSC_IDX(x)	(((x) >> DWC3_DEPCMD_PARAM_SHIFT) & 0x7f)
-#define DWC3_DEPCMD_STATUS(x)		(((x) >> 15) & 1)
+#define DWC3_DEPCMD_STATUS(x)		(((x) >> 12) & 0x0F)
 #define DWC3_DEPCMD_HIPRI_FORCERM	(1 << 11)
 #define DWC3_DEPCMD_CMDACT		(1 << 10)
 #define DWC3_DEPCMD_CMDIOC		(1 << 8)
-- 
1.7.4


^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2015-07-20 18:37 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-21 10:16 [PATCH v2 1/3] usb: dwc3: gadget: Fix incorrect DEPCMD and DGCMD status macros Subbaraya Sundeep Bhatta
2015-05-21 10:16 ` [PATCH v2 2/3] usb: dwc3: gadget: return error if command sent to DGCMD register fails Subbaraya Sundeep Bhatta
2015-05-21 10:16 ` [PATCH v2 3/3] usb: dwc3: gadget: return error if command sent to DEPCMD " Subbaraya Sundeep Bhatta
2015-06-29 21:47   ` Felipe Balbi
2015-06-29 21:48     ` Felipe Balbi
2015-06-29 23:59       ` John Youn
2015-06-30  0:34         ` Felipe Balbi
2015-07-02  2:03       ` John Youn
2015-07-02  3:00         ` Felipe Balbi
2015-07-07  2:10           ` John Youn
2015-07-07  3:24             ` Felipe Balbi
     [not found]               ` <F1B223389110CE49B4CF055ABA2E5D3D7825118A@XAP-PVEXMBX02.xlnx.xilinx.com>
2015-07-11 19:29                 ` Felipe Balbi
2015-07-13 17:50                   ` John Youn
2015-07-13 18:58                     ` Felipe Balbi
2015-07-15  9:49                       ` Subbaraya Sundeep Bhatta
2015-07-20 17:51                         ` Felipe Balbi
2015-07-20 18:16                           ` John Youn
2015-07-20 18:37                             ` Felipe Balbi
2015-07-01  7:29     ` Subbaraya Sundeep Bhatta
2015-07-06 17:07       ` Felipe Balbi
2015-07-07  5:01         ` Subbaraya Sundeep Bhatta
2015-07-08  9:50         ` Subbaraya Sundeep Bhatta
2015-07-08 18:16           ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).