Deleted Added
full compact
musb_otg.c (191402) musb_otg.c (192499)
1/* $FreeBSD: head/sys/dev/usb/controller/musb_otg.c 191402 2009-04-22 17:08:16Z thompsa $ */
1/* $FreeBSD: head/sys/dev/usb/controller/musb_otg.c 192499 2009-05-21 00:04:17Z thompsa $ */
2/*-
3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.

--- 1426 unchanged lines hidden (view full) ---

1436static void
1437musbotg_device_done(struct usb2_xfer *xfer, usb2_error_t error)
1438{
1439 USB_BUS_LOCK_ASSERT(xfer->xroot->bus, MA_OWNED);
1440
1441 DPRINTFN(2, "xfer=%p, pipe=%p, error=%d\n",
1442 xfer, xfer->pipe, error);
1443
2/*-
3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.

--- 1426 unchanged lines hidden (view full) ---

1436static void
1437musbotg_device_done(struct usb2_xfer *xfer, usb2_error_t error)
1438{
1439 USB_BUS_LOCK_ASSERT(xfer->xroot->bus, MA_OWNED);
1440
1441 DPRINTFN(2, "xfer=%p, pipe=%p, error=%d\n",
1442 xfer, xfer->pipe, error);
1443
1444 if (xfer->flags_int.usb2_mode == USB_MODE_DEVICE) {
1444 if (xfer->flags_int.usb_mode == USB_MODE_DEVICE) {
1445
1446 musbotg_ep_int_set(xfer, 0);
1447
1448 DPRINTFN(14, "disabled interrupts on endpoint\n");
1449 }
1450 /* dequeue transfer and start next transfer */
1451 usb2_transfer_done(xfer, error);
1452}

--- 187 unchanged lines hidden (view full) ---

1640 struct musbotg_softc *sc;
1641 struct usb2_endpoint_descriptor *ed;
1642
1643 DPRINTFN(4, "pipe=%p\n", pipe);
1644
1645 USB_BUS_LOCK_ASSERT(udev->bus, MA_OWNED);
1646
1647 /* check mode */
1445
1446 musbotg_ep_int_set(xfer, 0);
1447
1448 DPRINTFN(14, "disabled interrupts on endpoint\n");
1449 }
1450 /* dequeue transfer and start next transfer */
1451 usb2_transfer_done(xfer, error);
1452}

--- 187 unchanged lines hidden (view full) ---

1640 struct musbotg_softc *sc;
1641 struct usb2_endpoint_descriptor *ed;
1642
1643 DPRINTFN(4, "pipe=%p\n", pipe);
1644
1645 USB_BUS_LOCK_ASSERT(udev->bus, MA_OWNED);
1646
1647 /* check mode */
1648 if (udev->flags.usb2_mode != USB_MODE_DEVICE) {
1648 if (udev->flags.usb_mode != USB_MODE_DEVICE) {
1649 /* not supported */
1650 return;
1651 }
1652 /* get softc */
1653 sc = MUSBOTG_BUS2SC(udev->bus);
1654
1655 /* get endpoint descriptor */
1656 ed = pipe->edesc;

--- 1011 unchanged lines hidden (view full) ---

2668static void
2669musbotg_pipe_init(struct usb2_device *udev, struct usb2_endpoint_descriptor *edesc,
2670 struct usb2_pipe *pipe)
2671{
2672 struct musbotg_softc *sc = MUSBOTG_BUS2SC(udev->bus);
2673
2674 DPRINTFN(2, "pipe=%p, addr=%d, endpt=%d, mode=%d (%d)\n",
2675 pipe, udev->address,
1649 /* not supported */
1650 return;
1651 }
1652 /* get softc */
1653 sc = MUSBOTG_BUS2SC(udev->bus);
1654
1655 /* get endpoint descriptor */
1656 ed = pipe->edesc;

--- 1011 unchanged lines hidden (view full) ---

2668static void
2669musbotg_pipe_init(struct usb2_device *udev, struct usb2_endpoint_descriptor *edesc,
2670 struct usb2_pipe *pipe)
2671{
2672 struct musbotg_softc *sc = MUSBOTG_BUS2SC(udev->bus);
2673
2674 DPRINTFN(2, "pipe=%p, addr=%d, endpt=%d, mode=%d (%d)\n",
2675 pipe, udev->address,
2676 edesc->bEndpointAddress, udev->flags.usb2_mode,
2676 edesc->bEndpointAddress, udev->flags.usb_mode,
2677 sc->sc_rt_addr);
2678
2679 if (udev->device_index != sc->sc_rt_addr) {
2680
2677 sc->sc_rt_addr);
2678
2679 if (udev->device_index != sc->sc_rt_addr) {
2680
2681 if (udev->flags.usb2_mode != USB_MODE_DEVICE) {
2681 if (udev->flags.usb_mode != USB_MODE_DEVICE) {
2682 /* not supported */
2683 return;
2684 }
2685 if ((udev->speed != USB_SPEED_FULL) &&
2686 (udev->speed != USB_SPEED_HIGH)) {
2687 /* not supported */
2688 return;
2689 }

--- 30 unchanged lines hidden ---
2682 /* not supported */
2683 return;
2684 }
2685 if ((udev->speed != USB_SPEED_FULL) &&
2686 (udev->speed != USB_SPEED_HIGH)) {
2687 /* not supported */
2688 return;
2689 }

--- 30 unchanged lines hidden ---