Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 971f115a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (172 commits)
  USB: Add support for SuperSpeed isoc endpoints
  xhci: Clean up cycle bit math used during stalls.
  xhci: Fix cycle bit calculation during stall handling.
  xhci: Update internal dequeue pointers after stalls.
  USB: Disable auto-suspend for USB 3.0 hubs.
  USB: Remove bogus USB_PORT_STAT_SUPER_SPEED symbol.
  xhci: Return canceled URBs immediately when host is halted.
  xhci: Fixes for suspend/resume of shared HCDs.
  xhci: Fix re-init on power loss after resume.
  xhci: Make roothub functions deal with device removal.
  xhci: Limit roothub ports to 15 USB3 & 31 USB2 ports.
  xhci: Return a USB 3.0 hub descriptor for USB3 roothub.
  xhci: Register second xHCI roothub.
  xhci: Change xhci_find_slot_id_by_port() API.
  xhci: Refactor bus suspend state into a struct.
  xhci: Index with a port array instead of PORTSC addresses.
  USB: Set usb_hcd->state and flags for shared roothubs.
  usb: Make core allocate resources per PCI-device.
  usb: Store bus type in usb_hcd, not in driver flags.
  usb: Change usb_hcd->bandwidth_mutex to a pointer.
  ...
parents 2e270d84 500132a0
Loading
Loading
Loading
Loading
+9 −33
Original line number Diff line number Diff line
@@ -12,6 +12,10 @@ Controller Drivers (HCD). So, if HCD is buggy, the traces reported by
usbmon may not correspond to bus transactions precisely. This is the same
situation as with tcpdump.

Two APIs are currently implemented: "text" and "binary". The binary API
is available through a character device in /dev namespace and is an ABI.
The text API is deprecated since 2.6.35, but available for convenience.

* How to use usbmon to collect raw text traces

Unlike the packet socket, usbmon has an interface which provides traces
@@ -162,39 +166,11 @@ Here is the list of words, from left to right:
  not machine words, but really just a byte stream split into words to make
  it easier to read. Thus, the last word may contain from one to four bytes.
  The length of collected data is limited and can be less than the data length
  report in Data Length word.

Here is an example of code to read the data stream in a well known programming
language:

class ParsedLine {
	int data_len;		/* Available length of data */
	byte data[];

	void parseData(StringTokenizer st) {
		int availwords = st.countTokens();
		data = new byte[availwords * 4];
		data_len = 0;
		while (st.hasMoreTokens()) {
			String data_str = st.nextToken();
			int len = data_str.length() / 2;
			int i;
			int b;	// byte is signed, apparently?! XXX
			for (i = 0; i < len; i++) {
				// data[data_len] = Byte.parseByte(
				//     data_str.substring(i*2, i*2 + 2),
				//     16);
				b = Integer.parseInt(
				     data_str.substring(i*2, i*2 + 2),
				     16);
				if (b >= 128)
					b *= -1;
				data[data_len] = (byte) b;
				data_len++;
			}
		}
	}
}
  reported in the Data Length word. In the case of an Isochronous input (Zi)
  completion where the received data is sparse in the buffer, the length of
  the collected data can be greater than the Data Length value (because Data
  Length counts only the bytes that were received whereas the Data words
  contain the entire transfer buffer).

Examples:

+1 −1
Original line number Diff line number Diff line
@@ -229,7 +229,7 @@ usbfs-$(CONFIG_ARCH_OMAP_OTG) := usb-fs.o
obj-y					+= $(usbfs-m) $(usbfs-y)
obj-y					+= usb-musb.o
obj-$(CONFIG_MACH_OMAP2_TUSB6010)	+= usb-tusb6010.o
obj-y					+= usb-ehci.o
obj-y					+= usb-host.o

onenand-$(CONFIG_MTD_ONENAND_OMAP2)	:= gpmc-onenand.o
obj-y					+= $(onenand-m) $(onenand-y)
+5 −5
Original line number Diff line number Diff line
@@ -653,11 +653,11 @@ static void enable_board_wakeup_source(void)
		OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
}

static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
static const struct usbhs_omap_board_data usbhs_bdata __initconst = {

	.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
	.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
	.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
	.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
	.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
	.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,

	.phy_reset  = true,
	.reset_gpio_port[0]  = 57,
@@ -816,7 +816,7 @@ static void __init omap_3430sdp_init(void)
	board_flash_init(sdp_flash_partitions, chip_sel_3430);
	sdp3430_display_init();
	enable_board_wakeup_source();
	usb_ehci_init(&ehci_pdata);
	usbhs_init(&usbhs_bdata);
}

MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
+5 −5
Original line number Diff line number Diff line
@@ -54,11 +54,11 @@ static void enable_board_wakeup_source(void)
		OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
}

static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
static const struct usbhs_omap_board_data usbhs_bdata __initconst = {

	.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
	.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
	.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
	.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
	.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
	.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,

	.phy_reset  = true,
	.reset_gpio_port[0]  = 126,
@@ -211,7 +211,7 @@ static void __init omap_sdp_init(void)
	board_smc91x_init();
	board_flash_init(sdp_flash_partitions, chip_sel_sdp);
	enable_board_wakeup_source();
	usb_ehci_init(&ehci_pdata);
	usbhs_init(&usbhs_bdata);
}

MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
+1 −19
Original line number Diff line number Diff line
@@ -44,7 +44,6 @@
#define ETH_KS8851_IRQ			34
#define ETH_KS8851_POWER_ON		48
#define ETH_KS8851_QUART		138
#define OMAP4SDP_MDM_PWR_EN_GPIO	157
#define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO	184
#define OMAP4_SFH7741_ENABLE_GPIO		188

@@ -251,16 +250,6 @@ static void __init omap_4430sdp_init_irq(void)
	gic_init_irq();
}

static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
	.port_mode[0]	= EHCI_HCD_OMAP_MODE_PHY,
	.port_mode[1]	= EHCI_HCD_OMAP_MODE_UNKNOWN,
	.port_mode[2]	= EHCI_HCD_OMAP_MODE_UNKNOWN,
	.phy_reset	= false,
	.reset_gpio_port[0]  = -EINVAL,
	.reset_gpio_port[1]  = -EINVAL,
	.reset_gpio_port[2]  = -EINVAL,
};

static struct omap_musb_board_data musb_board_data = {
	.interface_type		= MUSB_INTERFACE_UTMI,
	.mode			= MUSB_OTG,
@@ -272,6 +261,7 @@ static struct twl4030_usb_data omap4_usbphy_data = {
	.phy_exit	= omap4430_phy_exit,
	.phy_power	= omap4430_phy_power,
	.phy_set_clock	= omap4430_phy_set_clk,
	.phy_suspend	= omap4430_phy_suspend,
};

static struct omap2_hsmmc_info mmc[] = {
@@ -576,14 +566,6 @@ static void __init omap_4430sdp_init(void)
	omap_serial_init();
	omap4_twl6030_hsmmc_init(mmc);

	/* Power on the ULPI PHY */
	status = gpio_request(OMAP4SDP_MDM_PWR_EN_GPIO, "USBB1 PHY VMDM_3V3");
	if (status)
		pr_err("%s: Could not get USBB1 PHY GPIO\n", __func__);
	else
		gpio_direction_output(OMAP4SDP_MDM_PWR_EN_GPIO, 1);

	usb_ehci_init(&ehci_pdata);
	usb_musb_init(&musb_board_data);

	status = omap_ethernet_init();
Loading