Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354622
b: refs/heads/master
c: a9b8676
h: refs/heads/master
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Jan 25, 2013
1 parent e6bc291 commit 8ac72b0
Show file tree
Hide file tree
Showing 47 changed files with 1,234 additions and 475 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 52758bcb7c12bede2a81849dee13f1edcd44e1c1
refs/heads/master: a9b8676c17cee40ac78696bb56ab61d550382898
9 changes: 9 additions & 0 deletions trunk/Documentation/ABI/testing/sysfs-bus-usb
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,12 @@ Contact: Lan Tianyu <tianyu.lan@intel.com>
Description:
The /sys/bus/usb/devices/.../(hub interface)/portX
is usb port device's sysfs directory.

What: /sys/bus/usb/devices/.../(hub interface)/portX/connect_type
Date: January 2013
Contact: Lan Tianyu <tianyu.lan@intel.com>
Description:
Some platforms provide usb port connect types through ACPI.
This attribute is to expose these information to user space.
The file will read "hotplug", "wired" and "not used" if the
information is available, and "unknown" otherwise.
20 changes: 20 additions & 0 deletions trunk/Documentation/devicetree/bindings/usb/usb3503.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
SMSC USB3503 High-Speed Hub Controller

Required properties:
- compatible: Should be "smsc,usb3503".
- reg: Specifies the i2c slave address, it should be 0x08.
- connect-gpios: Should specify GPIO for connect.
- intn-gpios: Should specify GPIO for interrupt.
- reset-gpios: Should specify GPIO for reset.
- initial-mode: Should specify initial mode.
(1 for HUB mode, 2 for STANDBY mode)

Examples:
usb3503@08 {
compatible = "smsc,usb3503";
reg = <0x08>;
connect-gpios = <&gpx3 0 1>;
intn-gpios = <&gpx3 4 1>;
reset-gpios = <&gpx3 5 1>;
initial-mode = <1>;
};
2 changes: 1 addition & 1 deletion trunk/drivers/usb/c67x00/c67x00-ll-hpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ void c67x00_ll_hpi_disable_sofeop(struct c67x00_sie *sie)
/* -------------------------------------------------------------------------- */
/* Transactions */

static inline u16 ll_recv_msg(struct c67x00_device *dev)
static inline int ll_recv_msg(struct c67x00_device *dev)
{
u16 res;

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/usb/chipidea/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ static int ci_hdrc_probe(struct platform_device *pdev)
}

base = devm_request_and_ioremap(dev, res);
if (!res) {
if (!base) {
dev_err(dev, "can't request and ioremap resource\n");
return -ENOMEM;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/usb/core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG
usbcore-y := usb.o hub.o hcd.o urb.o message.o driver.o
usbcore-y += config.o file.o buffer.o sysfs.o endpoint.o
usbcore-y += devio.o notify.o generic.o quirks.o devices.o
usbcore-y += port.o

usbcore-$(CONFIG_PCI) += hcd-pci.o
usbcore-$(CONFIG_ACPI) += usb-acpi.o
Expand Down
13 changes: 10 additions & 3 deletions trunk/drivers/usb/core/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,17 +316,23 @@ static char *usb_dump_iad_descriptor(char *start, char *end,
*/
static char *usb_dump_config_descriptor(char *start, char *end,
const struct usb_config_descriptor *desc,
int active)
int active, int speed)
{
int mul;

if (start > end)
return start;
if (speed == USB_SPEED_SUPER)
mul = 8;
else
mul = 2;
start += sprintf(start, format_config,
/* mark active/actual/current cfg. */
active ? '*' : ' ',
desc->bNumInterfaces,
desc->bConfigurationValue,
desc->bmAttributes,
desc->bMaxPower * 2);
desc->bMaxPower * mul);
return start;
}

Expand All @@ -342,7 +348,8 @@ static char *usb_dump_config(int speed, char *start, char *end,
if (!config)
/* getting these some in 2.3.7; none in 2.3.6 */
return start + sprintf(start, "(null Cfg. desc.)\n");
start = usb_dump_config_descriptor(start, end, &config->desc, active);
start = usb_dump_config_descriptor(start, end, &config->desc, active,
speed);
for (i = 0; i < USB_MAXIADS; i++) {
if (config->intf_assoc[i] == NULL)
break;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/usb/core/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ int usb_choose_configuration(struct usb_device *udev)
*/

/* Rule out configs that draw too much bus current */
if (c->desc.bMaxPower * 2 > udev->bus_mA) {
if (usb_get_max_power(udev, c) > udev->bus_mA) {
insufficient_power++;
continue;
}
Expand Down
5 changes: 4 additions & 1 deletion trunk/drivers/usb/core/hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,10 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)
status = hcd->driver->hub_control (hcd,
typeReq, wValue, wIndex,
tbuf, wLength);

if (typeReq == GetHubDescriptor)
usb_hub_adjust_deviceremovable(hcd->self.root_hub,
(struct usb_hub_descriptor *)tbuf);
break;
error:
/* "protocol stall" on error */
Expand Down Expand Up @@ -2506,7 +2510,6 @@ int usb_add_hcd(struct usb_hcd *hcd,
}

/* starting here, usbcore will pay attention to this root hub */
rhdev->bus_mA = min(500u, hcd->power_budget);
if ((retval = register_root_hub(hcd)) != 0)
goto err_register_root_hub;

Expand Down
Loading

0 comments on commit 8ac72b0

Please sign in to comment.