USB: rename USB_SPEED_VARIABLE to USB_SPEED_WIRELESS
It's really the wireless speed, so rename the thing to make more sense. Based on a recommendation from David Vrabel Cc: David Vrabel <david.vrabel@csr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
16985408b5
commit
551cdbbeb1
|
@ -144,7 +144,7 @@ static int valid_args(__u32 rhport, enum usb_device_speed speed)
|
||||||
case USB_SPEED_LOW:
|
case USB_SPEED_LOW:
|
||||||
case USB_SPEED_FULL:
|
case USB_SPEED_FULL:
|
||||||
case USB_SPEED_HIGH:
|
case USB_SPEED_HIGH:
|
||||||
case USB_SPEED_VARIABLE:
|
case USB_SPEED_WIRELESS:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
usbip_uerr("speed %d\n", speed);
|
usbip_uerr("speed %d\n", speed);
|
||||||
|
|
|
@ -1990,7 +1990,7 @@ static int hub_port_wait_reset(struct usb_hub *hub, int port1,
|
||||||
if (!(portstatus & USB_PORT_STAT_RESET) &&
|
if (!(portstatus & USB_PORT_STAT_RESET) &&
|
||||||
(portstatus & USB_PORT_STAT_ENABLE)) {
|
(portstatus & USB_PORT_STAT_ENABLE)) {
|
||||||
if (hub_is_wusb(hub))
|
if (hub_is_wusb(hub))
|
||||||
udev->speed = USB_SPEED_VARIABLE;
|
udev->speed = USB_SPEED_WIRELESS;
|
||||||
else if (portstatus & USB_PORT_STAT_HIGH_SPEED)
|
else if (portstatus & USB_PORT_STAT_HIGH_SPEED)
|
||||||
udev->speed = USB_SPEED_HIGH;
|
udev->speed = USB_SPEED_HIGH;
|
||||||
else if (portstatus & USB_PORT_STAT_LOW_SPEED)
|
else if (portstatus & USB_PORT_STAT_LOW_SPEED)
|
||||||
|
@ -2689,7 +2689,7 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
|
||||||
*/
|
*/
|
||||||
switch (udev->speed) {
|
switch (udev->speed) {
|
||||||
case USB_SPEED_SUPER:
|
case USB_SPEED_SUPER:
|
||||||
case USB_SPEED_VARIABLE: /* fixed at 512 */
|
case USB_SPEED_WIRELESS: /* fixed at 512 */
|
||||||
udev->ep0.desc.wMaxPacketSize = cpu_to_le16(512);
|
udev->ep0.desc.wMaxPacketSize = cpu_to_le16(512);
|
||||||
break;
|
break;
|
||||||
case USB_SPEED_HIGH: /* fixed at 64 */
|
case USB_SPEED_HIGH: /* fixed at 64 */
|
||||||
|
@ -2717,7 +2717,7 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
|
||||||
case USB_SPEED_SUPER:
|
case USB_SPEED_SUPER:
|
||||||
speed = "super";
|
speed = "super";
|
||||||
break;
|
break;
|
||||||
case USB_SPEED_VARIABLE:
|
case USB_SPEED_WIRELESS:
|
||||||
speed = "variable";
|
speed = "variable";
|
||||||
type = "Wireless ";
|
type = "Wireless ";
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -115,7 +115,7 @@ show_speed(struct device *dev, struct device_attribute *attr, char *buf)
|
||||||
case USB_SPEED_HIGH:
|
case USB_SPEED_HIGH:
|
||||||
speed = "480";
|
speed = "480";
|
||||||
break;
|
break;
|
||||||
case USB_SPEED_VARIABLE:
|
case USB_SPEED_WIRELESS:
|
||||||
speed = "480";
|
speed = "480";
|
||||||
break;
|
break;
|
||||||
case USB_SPEED_SUPER:
|
case USB_SPEED_SUPER:
|
||||||
|
|
|
@ -437,7 +437,7 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
|
||||||
case USB_ENDPOINT_XFER_INT:
|
case USB_ENDPOINT_XFER_INT:
|
||||||
/* too small? */
|
/* too small? */
|
||||||
switch (dev->speed) {
|
switch (dev->speed) {
|
||||||
case USB_SPEED_VARIABLE:
|
case USB_SPEED_WIRELESS:
|
||||||
if (urb->interval < 6)
|
if (urb->interval < 6)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
break;
|
break;
|
||||||
|
@ -453,7 +453,7 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
|
||||||
if (urb->interval > (1 << 15))
|
if (urb->interval > (1 << 15))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
max = 1 << 15;
|
max = 1 << 15;
|
||||||
case USB_SPEED_VARIABLE:
|
case USB_SPEED_WIRELESS:
|
||||||
if (urb->interval > 16)
|
if (urb->interval > 16)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
break;
|
break;
|
||||||
|
@ -480,7 +480,7 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
if (dev->speed != USB_SPEED_VARIABLE) {
|
if (dev->speed != USB_SPEED_WIRELESS) {
|
||||||
/* Round down to a power of 2, no more than max */
|
/* Round down to a power of 2, no more than max */
|
||||||
urb->interval = min(max, 1 << ilog2(urb->interval));
|
urb->interval = min(max, 1 << ilog2(urb->interval));
|
||||||
}
|
}
|
||||||
|
|
|
@ -454,7 +454,7 @@ int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *ud
|
||||||
case USB_SPEED_LOW:
|
case USB_SPEED_LOW:
|
||||||
slot_ctx->dev_info |= (u32) SLOT_SPEED_LS;
|
slot_ctx->dev_info |= (u32) SLOT_SPEED_LS;
|
||||||
break;
|
break;
|
||||||
case USB_SPEED_VARIABLE:
|
case USB_SPEED_WIRELESS:
|
||||||
xhci_dbg(xhci, "FIXME xHCI doesn't support wireless speeds\n");
|
xhci_dbg(xhci, "FIXME xHCI doesn't support wireless speeds\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
break;
|
break;
|
||||||
|
@ -498,7 +498,7 @@ int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *ud
|
||||||
case USB_SPEED_LOW:
|
case USB_SPEED_LOW:
|
||||||
ep0_ctx->ep_info2 |= MAX_PACKET(8);
|
ep0_ctx->ep_info2 |= MAX_PACKET(8);
|
||||||
break;
|
break;
|
||||||
case USB_SPEED_VARIABLE:
|
case USB_SPEED_WIRELESS:
|
||||||
xhci_dbg(xhci, "FIXME xHCI doesn't support wireless speeds\n");
|
xhci_dbg(xhci, "FIXME xHCI doesn't support wireless speeds\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -868,7 +868,7 @@ static struct usb_wireless_cap_descriptor wusb_cap_descr_default = {
|
||||||
* reference that we'll drop.
|
* reference that we'll drop.
|
||||||
*
|
*
|
||||||
* First we need to determine if the device is a WUSB device (else we
|
* First we need to determine if the device is a WUSB device (else we
|
||||||
* ignore it). For that we use the speed setting (USB_SPEED_VARIABLE)
|
* ignore it). For that we use the speed setting (USB_SPEED_WIRELESS)
|
||||||
* [FIXME: maybe we'd need something more definitive]. If so, we track
|
* [FIXME: maybe we'd need something more definitive]. If so, we track
|
||||||
* it's usb_busd and from there, the WUSB HC.
|
* it's usb_busd and from there, the WUSB HC.
|
||||||
*
|
*
|
||||||
|
|
|
@ -775,7 +775,7 @@ enum usb_device_speed {
|
||||||
USB_SPEED_UNKNOWN = 0, /* enumerating */
|
USB_SPEED_UNKNOWN = 0, /* enumerating */
|
||||||
USB_SPEED_LOW, USB_SPEED_FULL, /* usb 1.1 */
|
USB_SPEED_LOW, USB_SPEED_FULL, /* usb 1.1 */
|
||||||
USB_SPEED_HIGH, /* usb 2.0 */
|
USB_SPEED_HIGH, /* usb 2.0 */
|
||||||
USB_SPEED_VARIABLE, /* wireless (usb 2.5) */
|
USB_SPEED_WIRELESS, /* wireless (usb 2.5) */
|
||||||
USB_SPEED_SUPER, /* usb 3.0 */
|
USB_SPEED_SUPER, /* usb 3.0 */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue