diff options
Diffstat (limited to 'drivers/usb/host/isp1760-hcd.c')
-rw-r--r-- | drivers/usb/host/isp1760-hcd.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c index 9f01293600b0..dbcafa29c775 100644 --- a/drivers/usb/host/isp1760-hcd.c +++ b/drivers/usb/host/isp1760-hcd.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
16 | #include <linux/usb.h> | 16 | #include <linux/usb.h> |
17 | #include <linux/usb/hcd.h> | ||
17 | #include <linux/debugfs.h> | 18 | #include <linux/debugfs.h> |
18 | #include <linux/uaccess.h> | 19 | #include <linux/uaccess.h> |
19 | #include <linux/io.h> | 20 | #include <linux/io.h> |
@@ -21,7 +22,6 @@ | |||
21 | #include <asm/unaligned.h> | 22 | #include <asm/unaligned.h> |
22 | #include <asm/cacheflush.h> | 23 | #include <asm/cacheflush.h> |
23 | 24 | ||
24 | #include "../core/hcd.h" | ||
25 | #include "isp1760-hcd.h" | 25 | #include "isp1760-hcd.h" |
26 | 26 | ||
27 | static struct kmem_cache *qtd_cachep; | 27 | static struct kmem_cache *qtd_cachep; |
@@ -111,7 +111,7 @@ struct isp1760_qh { | |||
111 | u32 ping; | 111 | u32 ping; |
112 | }; | 112 | }; |
113 | 113 | ||
114 | #define ehci_port_speed(priv, portsc) (1 << USB_PORT_FEAT_HIGHSPEED) | 114 | #define ehci_port_speed(priv, portsc) USB_PORT_STAT_HIGH_SPEED |
115 | 115 | ||
116 | static unsigned int isp1760_readl(__u32 __iomem *regs) | 116 | static unsigned int isp1760_readl(__u32 __iomem *regs) |
117 | { | 117 | { |
@@ -713,12 +713,11 @@ static int check_error(struct ptd *ptd) | |||
713 | u32 dw3; | 713 | u32 dw3; |
714 | 714 | ||
715 | dw3 = le32_to_cpu(ptd->dw3); | 715 | dw3 = le32_to_cpu(ptd->dw3); |
716 | if (dw3 & DW3_HALT_BIT) | 716 | if (dw3 & DW3_HALT_BIT) { |
717 | error = -EPIPE; | 717 | error = -EPIPE; |
718 | 718 | ||
719 | if (dw3 & DW3_ERROR_BIT) { | 719 | if (dw3 & DW3_ERROR_BIT) |
720 | printk(KERN_ERR "error bit is set in DW3\n"); | 720 | pr_err("error bit is set in DW3\n"); |
721 | error = -EPIPE; | ||
722 | } | 721 | } |
723 | 722 | ||
724 | if (dw3 & DW3_QTD_ACTIVE) { | 723 | if (dw3 & DW3_QTD_ACTIVE) { |
@@ -1923,7 +1922,7 @@ static int isp1760_hub_control(struct usb_hcd *hcd, u16 typeReq, | |||
1923 | * Even if OWNER is set, so the port is owned by the | 1922 | * Even if OWNER is set, so the port is owned by the |
1924 | * companion controller, khubd needs to be able to clear | 1923 | * companion controller, khubd needs to be able to clear |
1925 | * the port-change status bits (especially | 1924 | * the port-change status bits (especially |
1926 | * USB_PORT_FEAT_C_CONNECTION). | 1925 | * USB_PORT_STAT_C_CONNECTION). |
1927 | */ | 1926 | */ |
1928 | 1927 | ||
1929 | switch (wValue) { | 1928 | switch (wValue) { |
@@ -1987,7 +1986,7 @@ static int isp1760_hub_control(struct usb_hcd *hcd, u16 typeReq, | |||
1987 | 1986 | ||
1988 | /* wPortChange bits */ | 1987 | /* wPortChange bits */ |
1989 | if (temp & PORT_CSC) | 1988 | if (temp & PORT_CSC) |
1990 | status |= 1 << USB_PORT_FEAT_C_CONNECTION; | 1989 | status |= USB_PORT_STAT_C_CONNECTION << 16; |
1991 | 1990 | ||
1992 | 1991 | ||
1993 | /* whoever resumes must GetPortStatus to complete it!! */ | 1992 | /* whoever resumes must GetPortStatus to complete it!! */ |
@@ -2007,7 +2006,7 @@ static int isp1760_hub_control(struct usb_hcd *hcd, u16 typeReq, | |||
2007 | /* resume completed? */ | 2006 | /* resume completed? */ |
2008 | else if (time_after_eq(jiffies, | 2007 | else if (time_after_eq(jiffies, |
2009 | priv->reset_done)) { | 2008 | priv->reset_done)) { |
2010 | status |= 1 << USB_PORT_FEAT_C_SUSPEND; | 2009 | status |= USB_PORT_STAT_C_SUSPEND << 16; |
2011 | priv->reset_done = 0; | 2010 | priv->reset_done = 0; |
2012 | 2011 | ||
2013 | /* stop resume signaling */ | 2012 | /* stop resume signaling */ |
@@ -2031,7 +2030,7 @@ static int isp1760_hub_control(struct usb_hcd *hcd, u16 typeReq, | |||
2031 | if ((temp & PORT_RESET) | 2030 | if ((temp & PORT_RESET) |
2032 | && time_after_eq(jiffies, | 2031 | && time_after_eq(jiffies, |
2033 | priv->reset_done)) { | 2032 | priv->reset_done)) { |
2034 | status |= 1 << USB_PORT_FEAT_C_RESET; | 2033 | status |= USB_PORT_STAT_C_RESET << 16; |
2035 | priv->reset_done = 0; | 2034 | priv->reset_done = 0; |
2036 | 2035 | ||
2037 | /* force reset to complete */ | 2036 | /* force reset to complete */ |
@@ -2062,18 +2061,18 @@ static int isp1760_hub_control(struct usb_hcd *hcd, u16 typeReq, | |||
2062 | printk(KERN_ERR "Warning: PORT_OWNER is set\n"); | 2061 | printk(KERN_ERR "Warning: PORT_OWNER is set\n"); |
2063 | 2062 | ||
2064 | if (temp & PORT_CONNECT) { | 2063 | if (temp & PORT_CONNECT) { |
2065 | status |= 1 << USB_PORT_FEAT_CONNECTION; | 2064 | status |= USB_PORT_STAT_CONNECTION; |
2066 | /* status may be from integrated TT */ | 2065 | /* status may be from integrated TT */ |
2067 | status |= ehci_port_speed(priv, temp); | 2066 | status |= ehci_port_speed(priv, temp); |
2068 | } | 2067 | } |
2069 | if (temp & PORT_PE) | 2068 | if (temp & PORT_PE) |
2070 | status |= 1 << USB_PORT_FEAT_ENABLE; | 2069 | status |= USB_PORT_STAT_ENABLE; |
2071 | if (temp & (PORT_SUSPEND|PORT_RESUME)) | 2070 | if (temp & (PORT_SUSPEND|PORT_RESUME)) |
2072 | status |= 1 << USB_PORT_FEAT_SUSPEND; | 2071 | status |= USB_PORT_STAT_SUSPEND; |
2073 | if (temp & PORT_RESET) | 2072 | if (temp & PORT_RESET) |
2074 | status |= 1 << USB_PORT_FEAT_RESET; | 2073 | status |= USB_PORT_STAT_RESET; |
2075 | if (temp & PORT_POWER) | 2074 | if (temp & PORT_POWER) |
2076 | status |= 1 << USB_PORT_FEAT_POWER; | 2075 | status |= USB_PORT_STAT_POWER; |
2077 | 2076 | ||
2078 | put_unaligned(cpu_to_le32(status), (__le32 *) buf); | 2077 | put_unaligned(cpu_to_le32(status), (__le32 *) buf); |
2079 | break; | 2078 | break; |