aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2010-03-04 11:32:30 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-20 16:21:31 -0400
commit288ead45fa6637e959015d055304f521cbbc0575 (patch)
treeb150572e95760f26f905802269b3a76da0260976 /drivers/usb
parent45f30e0bdadd4660383250e85b543b0bea05413d (diff)
USB: remove bogus USB_PORT_FEAT_*_SPEED symbols
This patch (as1348) removes the bogus USB_PORT_FEAT_{HIGHSPEED,SUPERSPEED} symbols from ch11.h. No such features are defined by the USB spec. (There is a PORT_LOWSPEED feature, but the spec doesn't mention it except to say that host software should never use it.) The speed indicators are port statuses, not port features. As a temporary workaround for the xhci-hcd driver, a fictional USB_PORT_STAT_SUPER_SPEED symbol is added. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/core/hub.c8
-rw-r--r--drivers/usb/host/ehci.h8
-rw-r--r--drivers/usb/host/isp1760-hcd.c2
-rw-r--r--drivers/usb/host/oxu210hp-hcd.c4
-rw-r--r--drivers/usb/host/r8a66597-hcd.c7
-rw-r--r--drivers/usb/host/sl811-hcd.c6
-rw-r--r--drivers/usb/host/xhci-hub.c8
7 files changed, 21 insertions, 22 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 1883c3c7b69b..5ac27ed0c635 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -153,11 +153,11 @@ static int usb_reset_and_verify_device(struct usb_device *udev);
153 153
154static inline char *portspeed(int portstatus) 154static inline char *portspeed(int portstatus)
155{ 155{
156 if (portstatus & (1 << USB_PORT_FEAT_HIGHSPEED)) 156 if (portstatus & USB_PORT_STAT_HIGH_SPEED)
157 return "480 Mb/s"; 157 return "480 Mb/s";
158 else if (portstatus & (1 << USB_PORT_FEAT_LOWSPEED)) 158 else if (portstatus & USB_PORT_STAT_LOW_SPEED)
159 return "1.5 Mb/s"; 159 return "1.5 Mb/s";
160 else if (portstatus & (1 << USB_PORT_FEAT_SUPERSPEED)) 160 else if (portstatus & USB_PORT_STAT_SUPER_SPEED)
161 return "5.0 Gb/s"; 161 return "5.0 Gb/s";
162 else 162 else
163 return "12 Mb/s"; 163 return "12 Mb/s";
@@ -3075,7 +3075,7 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1,
3075 if (!(hcd->driver->flags & HCD_USB3)) 3075 if (!(hcd->driver->flags & HCD_USB3))
3076 udev->speed = USB_SPEED_UNKNOWN; 3076 udev->speed = USB_SPEED_UNKNOWN;
3077 else if ((hdev->parent == NULL) && 3077 else if ((hdev->parent == NULL) &&
3078 (portstatus & (1 << USB_PORT_FEAT_SUPERSPEED))) 3078 (portstatus & USB_PORT_STAT_SUPER_SPEED))
3079 udev->speed = USB_SPEED_SUPER; 3079 udev->speed = USB_SPEED_SUPER;
3080 else 3080 else
3081 udev->speed = USB_SPEED_UNKNOWN; 3081 udev->speed = USB_SPEED_UNKNOWN;
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index 556c0b48f3ab..4ebe9ad209e4 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -556,20 +556,20 @@ ehci_port_speed(struct ehci_hcd *ehci, unsigned int portsc)
556 case 0: 556 case 0:
557 return 0; 557 return 0;
558 case 1: 558 case 1:
559 return (1<<USB_PORT_FEAT_LOWSPEED); 559 return USB_PORT_STAT_LOW_SPEED;
560 case 2: 560 case 2:
561 default: 561 default:
562 return (1<<USB_PORT_FEAT_HIGHSPEED); 562 return USB_PORT_STAT_HIGH_SPEED;
563 } 563 }
564 } 564 }
565 return (1<<USB_PORT_FEAT_HIGHSPEED); 565 return USB_PORT_STAT_HIGH_SPEED;
566} 566}
567 567
568#else 568#else
569 569
570#define ehci_is_TDI(e) (0) 570#define ehci_is_TDI(e) (0)
571 571
572#define ehci_port_speed(ehci, portsc) (1<<USB_PORT_FEAT_HIGHSPEED) 572#define ehci_port_speed(ehci, portsc) USB_PORT_STAT_HIGH_SPEED
573#endif 573#endif
574 574
575/*-------------------------------------------------------------------------*/ 575/*-------------------------------------------------------------------------*/
diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c
index c7ac1d97d176..cfdac6da9556 100644
--- a/drivers/usb/host/isp1760-hcd.c
+++ b/drivers/usb/host/isp1760-hcd.c
@@ -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
116static unsigned int isp1760_readl(__u32 __iomem *regs) 116static unsigned int isp1760_readl(__u32 __iomem *regs)
117{ 117{
diff --git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb/host/oxu210hp-hcd.c
index 2891203200ce..8f04c0afa59f 100644
--- a/drivers/usb/host/oxu210hp-hcd.c
+++ b/drivers/usb/host/oxu210hp-hcd.c
@@ -3153,10 +3153,10 @@ static inline unsigned int oxu_port_speed(struct oxu_hcd *oxu,
3153 case 0: 3153 case 0:
3154 return 0; 3154 return 0;
3155 case 1: 3155 case 1:
3156 return 1 << USB_PORT_FEAT_LOWSPEED; 3156 return USB_PORT_STAT_LOW_SPEED;
3157 case 2: 3157 case 2:
3158 default: 3158 default:
3159 return 1 << USB_PORT_FEAT_HIGHSPEED; 3159 return USB_PORT_STAT_HIGH_SPEED;
3160 } 3160 }
3161} 3161}
3162 3162
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index 1398de140ead..a004a1220848 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -1059,12 +1059,11 @@ static void r8a66597_usb_connect(struct r8a66597 *r8a66597, int port)
1059 u16 speed = get_rh_usb_speed(r8a66597, port); 1059 u16 speed = get_rh_usb_speed(r8a66597, port);
1060 struct r8a66597_root_hub *rh = &r8a66597->root_hub[port]; 1060 struct r8a66597_root_hub *rh = &r8a66597->root_hub[port];
1061 1061
1062 rh->port &= ~((1 << USB_PORT_FEAT_HIGHSPEED) | 1062 rh->port &= ~(USB_PORT_STAT_HIGH_SPEED | USB_PORT_STAT_LOW_SPEED);
1063 (1 << USB_PORT_FEAT_LOWSPEED));
1064 if (speed == HSMODE) 1063 if (speed == HSMODE)
1065 rh->port |= (1 << USB_PORT_FEAT_HIGHSPEED); 1064 rh->port |= USB_PORT_STAT_HIGH_SPEED;
1066 else if (speed == LSMODE) 1065 else if (speed == LSMODE)
1067 rh->port |= (1 << USB_PORT_FEAT_LOWSPEED); 1066 rh->port |= USB_PORT_STAT_LOW_SPEED;
1068 1067
1069 rh->port &= ~(1 << USB_PORT_FEAT_RESET); 1068 rh->port &= ~(1 << USB_PORT_FEAT_RESET);
1070 rh->port |= 1 << USB_PORT_FEAT_ENABLE; 1069 rh->port |= 1 << USB_PORT_FEAT_ENABLE;
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
index 8f2f477890c4..dcd7fab7179c 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
@@ -1121,7 +1121,7 @@ sl811h_timer(unsigned long _sl811)
1121 u8 signaling = sl811->ctrl1 & SL11H_CTL1MASK_FORCE; 1121 u8 signaling = sl811->ctrl1 & SL11H_CTL1MASK_FORCE;
1122 const u32 mask = (1 << USB_PORT_FEAT_CONNECTION) 1122 const u32 mask = (1 << USB_PORT_FEAT_CONNECTION)
1123 | (1 << USB_PORT_FEAT_ENABLE) 1123 | (1 << USB_PORT_FEAT_ENABLE)
1124 | (1 << USB_PORT_FEAT_LOWSPEED); 1124 | USB_PORT_STAT_LOW_SPEED;
1125 1125
1126 spin_lock_irqsave(&sl811->lock, flags); 1126 spin_lock_irqsave(&sl811->lock, flags);
1127 1127
@@ -1162,7 +1162,7 @@ sl811h_timer(unsigned long _sl811)
1162 } else { 1162 } else {
1163 sl811->port1 |= mask; 1163 sl811->port1 |= mask;
1164 if (irqstat & SL11H_INTMASK_DP) 1164 if (irqstat & SL11H_INTMASK_DP)
1165 sl811->port1 &= ~(1 << USB_PORT_FEAT_LOWSPEED); 1165 sl811->port1 &= ~USB_PORT_STAT_LOW_SPEED;
1166 sl811->irq_enable = SL11H_INTMASK_INSRMV | SL11H_INTMASK_RD; 1166 sl811->irq_enable = SL11H_INTMASK_INSRMV | SL11H_INTMASK_RD;
1167 } 1167 }
1168 1168
@@ -1173,7 +1173,7 @@ sl811h_timer(unsigned long _sl811)
1173#ifdef USE_B 1173#ifdef USE_B
1174 sl811->irq_enable |= SL11H_INTMASK_DONE_B; 1174 sl811->irq_enable |= SL11H_INTMASK_DONE_B;
1175#endif 1175#endif
1176 if (sl811->port1 & (1 << USB_PORT_FEAT_LOWSPEED)) { 1176 if (sl811->port1 & USB_PORT_STAT_LOW_SPEED) {
1177 sl811->ctrl1 |= SL11H_CTL1MASK_LSPD; 1177 sl811->ctrl1 |= SL11H_CTL1MASK_LSPD;
1178 ctrl2 |= SL811HS_CTL2MASK_DSWAP; 1178 ctrl2 |= SL811HS_CTL2MASK_DSWAP;
1179 } 1179 }
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index 208b805b80eb..dd69df1e4558 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -64,15 +64,15 @@ static void xhci_hub_descriptor(struct xhci_hcd *xhci,
64static unsigned int xhci_port_speed(unsigned int port_status) 64static unsigned int xhci_port_speed(unsigned int port_status)
65{ 65{
66 if (DEV_LOWSPEED(port_status)) 66 if (DEV_LOWSPEED(port_status))
67 return 1 << USB_PORT_FEAT_LOWSPEED; 67 return USB_PORT_STAT_LOW_SPEED;
68 if (DEV_HIGHSPEED(port_status)) 68 if (DEV_HIGHSPEED(port_status))
69 return 1 << USB_PORT_FEAT_HIGHSPEED; 69 return USB_PORT_STAT_HIGH_SPEED;
70 if (DEV_SUPERSPEED(port_status)) 70 if (DEV_SUPERSPEED(port_status))
71 return 1 << USB_PORT_FEAT_SUPERSPEED; 71 return USB_PORT_STAT_SUPER_SPEED;
72 /* 72 /*
73 * FIXME: Yes, we should check for full speed, but the core uses that as 73 * FIXME: Yes, we should check for full speed, but the core uses that as
74 * a default in portspeed() in usb/core/hub.c (which is the only place 74 * a default in portspeed() in usb/core/hub.c (which is the only place
75 * USB_PORT_FEAT_*SPEED is used). 75 * USB_PORT_STAT_*_SPEED is used).
76 */ 76 */
77 return 0; 77 return 0;
78} 78}