From: Olav Kongas <ok@artecdesign.ee>
Date: Thu, 4 Aug 2005 13:54:08 +0000 (+0300)
Subject: [PATCH] USB: isp116x-hcd: per-port overcurrent reporting
X-Git-Tag: v2.6.14-rc1~492^2~18^2~37
X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=9d233d9faedfd8a4ee22288c1fdc698a6f75db21;p=linux-2.6-omap-h63xx.git

[PATCH] USB: isp116x-hcd: per-port overcurrent reporting

This patch sets the isp116x to report overcurrent always per-port.

Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---

diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c
index a3e881c6002..aeddef7a12a 100644
--- a/drivers/usb/host/isp116x-hcd.c
+++ b/drivers/usb/host/isp116x-hcd.c
@@ -1585,6 +1585,8 @@ static int isp116x_start(struct usb_hcd *hcd)
 	   be always set. Yet, instead, we request individual port
 	   power switching. */
 	val |= RH_A_PSM;
+	/* Report overcurrent per port */
+	val |= RH_A_OCPM;
 	isp116x_write_reg32(isp116x, HCRHDESCA, val);
 	isp116x->rhdesca = isp116x_read_reg32(isp116x, HCRHDESCA);
 
diff --git a/include/linux/usb_isp116x.h b/include/linux/usb_isp116x.h
index c028d724be9..8f0b3c22696 100644
--- a/include/linux/usb_isp116x.h
+++ b/include/linux/usb_isp116x.h
@@ -7,7 +7,7 @@
 struct isp116x_platform_data {
 	/* Enable internal resistors on downstream ports */
 	unsigned sel15Kres:1;
-	/* On-chip overcurrent protection */
+	/* On-chip overcurrent detection */
 	unsigned oc_enable:1;
 	/* INT output polarity */
 	unsigned int_act_high:1;