Skip to contentSkip to conversation

usb: Prevent using reserved registers on DM36x usb

PATCH Superseded Andrew Murray 3 participants 5 messages Sep 29, 2013 – Oct 10, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 usb: Prevent using reserved registers on DM36x usb

The musb driver defines and uses MUSB_CSR0_H_DIS_PING, however this bit is reserved on the DM36x. Thus this patch ensures that the reserved bit is not accesssed.

It has been observed that some USB devices will fail to enumerate with errors such as 'error in inquiry' without this patch.

See http://www.ti.com/litv/pdf/sprufh9a for details.

---
 drivers/usb/musb/musb_hcd.c |   19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)
drivers/usb/musb/musb_hcd.c +14 -5
index 3dc5d6a..ae39c4a 100644
@@ -417,8 +417,12 @@ static int ctrlreq_out_data_phase(struct usb_device *dev, u32 len, void *buffer)
 
 		/* Set TXPKTRDY bit */
 		csr = readw(&musbr->txcsr);
-		writew(csr | MUSB_CSR0_H_DIS_PING | MUSB_CSR0_TXPKTRDY,
-					&musbr->txcsr);
+			
+		csr |= MUSB_CSR0_TXPKTRDY;
+#if !defined(CONFIG_SOC_DM365)
+		csr |= MUSB_CSR0_H_DIS_PING;
+#endif
+		writew(csr, &musbr->txcsr);
 		result = wait_until_ep0_ready(dev, MUSB_CSR0_TXPKTRDY);
 		if (result < 0)
 			break;
@@ -439,8 +443,10 @@ static int ctrlreq_out_status_phase(struct usb_device *dev)
 
 	/* Set the StatusPkt bit */
 	csr = readw(&musbr->txcsr);
-	csr |= (MUSB_CSR0_H_DIS_PING | MUSB_CSR0_TXPKTRDY |
-			MUSB_CSR0_H_STATUSPKT);
+	csr |= (MUSB_CSR0_TXPKTRDY | MUSB_CSR0_H_STATUSPKT);
+#if !defined(CONFIG_SOC_DM365)
+	csr |= MUSB_CSR0_H_DIS_PING;
+#endif
 	writew(csr, &musbr->txcsr);
 
 	/* Wait until TXPKTRDY bit is cleared */
@@ -457,7 +463,10 @@ static int ctrlreq_in_status_phase(struct usb_device *dev)
 	int result;
 
 	/* Set the StatusPkt bit and ReqPkt bit */
-	csr = MUSB_CSR0_H_DIS_PING | MUSB_CSR0_H_REQPKT | MUSB_CSR0_H_STATUSPKT;
+	csr = MUSB_CSR0_H_REQPKT | MUSB_CSR0_H_STATUSPKT;
+#if !defined(CONFIG_SOC_DM365)
+	csr |= MUSB_CSR0_H_DIS_PING;
+#endif
 	writew(csr, &musbr->txcsr);
 	result = wait_until_ep0_ready(dev, MUSB_CSR0_H_REQPKT);
 
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v2 1/1 usb: Prevent using reserved registers on DM36x usb

Dear Andrew Murray,

Quoted 4 lines

The musb driver defines and uses MUSB_CSR0_H_DIS_PING, however this bit is reserved on the DM36x. Thus this patch ensures that the reserved bit is not accesssed.

Quoted 8 lines

It has been observed that some USB devices will fail to enumerate with errors such as 'error in inquiry' without this patch.

See http://www.ti.com/litv/pdf/sprufh9a for details.

Tom, can you check this and if it's OK with you, pick this by hand?

For my part, I'm fine here,

Best regards,
Marek Vasut

#2 lore raw

PATCH v2 1/1 usb: Prevent using reserved registers on DM36x usb

Quoted 15 lines · Marek Vasut

Dear Andrew Murray,

Quoted 4 lines

The musb driver defines and uses MUSB_CSR0_H_DIS_PING, however this bit is reserved on the DM36x. Thus this patch ensures that the reserved bit is not accesssed.

Quoted 8 lines

It has been observed that some USB devices will fail to enumerate with errors such as 'error in inquiry' without this patch.

See http://www.ti.com/litv/pdf/sprufh9a for details.

Quoted 5 lines

Tom, can you check this and if it's OK with you, pick this by hand?

For my part, I'm fine here,

Tom, was this version OK?

Andrew Murray

#3 lore raw

PATCH v2 1/1 usb: Prevent using reserved registers on DM36x usb

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 16 lines · Andrew Murray
Quoted 15 lines · Marek Vasut

Dear Andrew Murray,

Quoted 12 lines

The musb driver defines and uses MUSB_CSR0_H_DIS_PING, however this bit is reserved on the DM36x. Thus this patch ensures that the reserved bit is not accesssed.

It has been observed that some USB devices will fail to enumerate with errors such as 'error in inquiry' without this patch.

See http://www.ti.com/litv/pdf/sprufh9a for details.

Quoted 7 lines
Quoted 5 lines

Tom, can you check this and if it's OK with you, pick this by hand?

For my part, I'm fine here,

Tom, was this version OK?

Yes, this is now in master, sorry I've been slacking in sending my replies to all patches.

- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJSVZYHAAoJENk4IS6UOR1WJzIP/3mWVIYFD041O91GjbyNymW3 5Tjh7zXQ0MjrHHD86diZk4EsdhS3ucfQ1YP9yiDM4DhruGiO0MGRheQoND6MxqAK Ab7q3QBDp5qdIvoepUb8UZVe15IK5PyZ86q3xraJYZ4uN6lS+FfnP//3UwdgD/Sr bw+9vfHWFjmZvPVOXQoMebmnClWaHY5MCjkMwi4K4/DYjWcWyQLA9tAotvMa/Xhc yBx1jwnTtqBAMWJnJD+ZTKkssPLZTF+B/IV+waZIX5upviV5fg1JKtdwRw0BAQUz SATsWiKAEczztYttQfz39lzyOS+VFvtYKDEJb8B24BlFRn11udgZk4RNKWixxDCT j7+q74e4mVzD529Qb5aqhf5PyyaKcmxlkHDHk3xRRGsaUOHLLv/j/pXUGG7CAc7d v9oGIpa9J4fIN8y8im1tMfJjXuq/gspqTmJo0F0tfUtzUHIJIXy7zptmhANoVLu2 nmL+owCesTlLQc0y6gQMUXAqiBdBSzSgMkGmcSkD+J+C6XfdSZBTu9zX3dUDmX7y tuwx01l9k6iP8oqC7TQGycLgWNzenJH2YuvFS3yctTtwmQd0RtqbSHgCzW7FjAzX WFRUzTLz20OtR0O+sXCKtxnv/BvwkE3i4Ohe+LRJxCuorIa8KMRad+88sMaya927 2LgEI3U1cQrpT2zgZ6QN
=zGv4
-----END PGP SIGNATURE-----

#4 lore raw

PATCH v2 1/1 usb: Prevent using reserved registers on DM36x usb

In reply to Andrew Murray
Quoted 7 lines · Andrew Murray

The musb driver defines and uses MUSB_CSR0_H_DIS_PING, however this bit is reserved on the DM36x. Thus this patch ensures that the reserved bit is not accesssed.

It has been observed that some USB devices will fail to enumerate with errors such as 'error in inquiry' without this patch.

Quoted 6 lines

See http://www.ti.com/litv/pdf/sprufh9a for details.

Applied to u-boot/master (and thanks for the reminder) !

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131010/1d88c51d/attachment.pgp>