Skip to contentSkip to conversation

usb: early: Correct the endpoint type value for bulk in endpoint

PATCH In review Lu Baolu 2 participants 3 messages Nov 28, 2017 USB

lore
Share & tools
lore

Lu Baolu

author
#0 lore raw

PATCH 1/1 usb: early: Correct the endpoint type value for bulk in endpoint

This corrects the endpiont type value set to the DbC bulk in endpoint. The previous value doesn't cause any problems because that we now only use the bulk out endpoint. Set the hardware with the correct value any way.

---
 drivers/usb/early/xhci-dbc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/early/xhci-dbc.c +1 -1
index 8a700b4..e15e896 100644
@@ -328,7 +328,7 @@ static void xdbc_mem_init(void)
 	ep_in = (struct xdbc_ep_context *)&ctx->in;
 
 	ep_in->ep_info1		= 0;
-	ep_in->ep_info2		= cpu_to_le32(EP_TYPE(BULK_OUT_EP) | MAX_PACKET(1024) | MAX_BURST(max_burst));
+	ep_in->ep_info2		= cpu_to_le32(EP_TYPE(BULK_IN_EP) | MAX_PACKET(1024) | MAX_BURST(max_burst));
 	ep_in->deq		= cpu_to_le64(xdbc.in_seg.dma | xdbc.in_ring.cycle_state);
 
 	/* Set DbC context and info registers: */
Signature · 1 line
2.7.4
#1 lore raw
Quoted 15 lines · Lu Baolu

This corrects the endpiont type value set to the DbC bulk in endpoint. The previous value doesn't cause any problems because that we now only use the bulk out endpoint. Set the hardware with the correct value any way.

---
 drivers/usb/early/xhci-dbc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/early/xhci-dbc.c +0 -0
index 8a700b4..e15e896 100644

drivers/usb/early/xhci-dbc.c static void xdbc_mem_init(void) · line 331

Quoted 5 lines
drivers/usb/early/xhci-dbc.c +1 -1
@@ -328,7 +328,7 @@ static void xdbc_mem_init(void)
 	ep_in = (struct xdbc_ep_context *)&ctx->in;
 
 	ep_in->ep_info1		= 0;
-	ep_in->ep_info2		= cpu_to_le32(EP_TYPE(BULK_OUT_EP) | MAX_PACKET(1024) | MAX_BURST(max_burst));
+	ep_in->ep_info2		= cpu_to_le32(EP_TYPE(BULK_IN_EP) | MAX_PACKET(1024) | MAX_BURST(max_burst));

Should this go to the stable kernels? If so, how far back?

thanks,

greg k-h

author
#2 lore raw

Hi,

Quoted 18 lines · Greg Kroah-Hartman
Quoted 17 lines · Lu Baolu

This corrects the endpiont type value set to the DbC bulk in endpoint. The previous value doesn't cause any problems because that we now only use the bulk out endpoint. Set the hardware with the correct value any way.

---
 drivers/usb/early/xhci-dbc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/early/xhci-dbc.c +0 -0
index 8a700b4..e15e896 100644
@@ -328,7 +328,7 @@ static void xdbc_mem_init(void)
 	ep_in = (struct xdbc_ep_context *)&ctx->in;
 
Quoted 5 lines

drivers/usb/early/xhci-dbc.c static void xdbc_mem_init(void) · line 331

Quoted 3 lines
drivers/usb/early/xhci-dbc.c +1 -1
 	ep_in->ep_info1		= 0;
-	ep_in->ep_info2		= cpu_to_le32(EP_TYPE(BULK_OUT_EP) | MAX_PACKET(1024) | MAX_BURST(max_burst));
+	ep_in->ep_info2		= cpu_to_le32(EP_TYPE(BULK_IN_EP) | MAX_PACKET(1024) | MAX_BURST(max_burst));

Should this go to the stable kernels? If so, how far back?

This doesn't cause any real problem. We currently only use the bulk-out endpoint for early-printk. So I don't think there is a need to back port it.

Best regards,
Lu Baolu