15 Oct, 2020

2 commits

  • The typec_bus.rst asks for documentation of those two
    functions, but they don't exist:

    ./drivers/usb/typec/bus.c:1: warning: 'typec_altmode_unregister_driver' not found
    ./drivers/usb/typec/bus.c:1: warning: 'typec_altmode_register_driver' not found

    Also, they're not declared on bus.c but, instead, at a header
    file (typec_altmode.h).

    So, add documentation for both functions at the header and
    change the kernel-doc markup under typec_bus.rst to point
    to the right place.

    While here, also place the documentation for both structs
    declared on typec_altmode.h at the rst file.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • The :c:type:`foo` only works properly with structs before
    Sphinx 3.x.

    On Sphinx 3.x, structs should now be declared using the
    .. c:struct, and referenced via :c:struct tag.

    As we now have the automarkup.py macro, that automatically
    convert:
    struct foo

    into cross-references, let's get rid of that, solving
    several warnings when building docs with Sphinx 3.x.

    Reviewed-by: André Almeida # blk-mq.rst
    Reviewed-by: Takashi Iwai # sound
    Reviewed-by: Mike Rapoport
    Reviewed-by: Greg Kroah-Hartman
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

06 Aug, 2020

1 commit

  • Pull USB/Thunderbolt updates from Greg KH:
    "Here is the large set of USB and Thunderbolt patches for 5.9-rc1.

    Nothing really magic/major in here, just lots of little changes and
    updates:

    - clean up language usages in USB core and some drivers

    - Thunderbolt driver updates and additions

    - USB Gadget driver updates

    - dwc3 driver updates (like always...)

    - build with "W=1" warning fixups

    - mtu3 driver updates

    - usb-serial driver updates and device ids

    - typec additions and updates for new hardware

    - xhci debug code updates for future platforms

    - cdns3 driver updates

    - lots of other minor driver updates and fixes and cleanups

    All of these have been in linux-next for a while with no reported
    issues"

    * tag 'usb-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (330 commits)
    usb: common: usb-conn-gpio: Register charger
    usb: mtu3: simplify mtu3_req_complete()
    usb: mtu3: clear dual mode of u3port when disable device
    usb: mtu3: use MTU3_EP_WEDGE flag
    usb: mtu3: remove useless member @busy in mtu3_ep struct
    usb: mtu3: remove repeated error log
    usb: mtu3: add ->udc_set_speed()
    usb: mtu3: introduce a funtion to check maximum speed
    usb: mtu3: clear interrupts status when disable interrupts
    usb: mtu3: reinitialize CSR registers
    usb: mtu3: fix macro for maximum number of packets
    usb: mtu3: remove unnecessary pointer checks
    usb: xhci: Fix ASMedia ASM1142 DMA addressing
    usb: xhci: define IDs for various ASMedia host controllers
    usb: musb: convert to devm_platform_ioremap_resource_byname
    usb: gadget: tegra-xudc: convert to devm_platform_ioremap_resource_byname
    usb: gadget: r8a66597: convert to devm_platform_ioremap_resource_byname
    usb: dwc3: convert to devm_platform_ioremap_resource_byname
    usb: cdns3: convert to devm_platform_ioremap_resource_byname
    usb: phy: am335x: convert to devm_platform_ioremap_resource_byname
    ...

    Linus Torvalds
     

10 Jul, 2020

1 commit


27 Jun, 2020

3 commits

  • A big set of fixes and RST conversions from Mauro. He swears that this is
    the last RST conversion set, which is certainly cause for celebration.

    Jonathan Corbet
     
  • Rationale:
    Reduces attack surface on kernel devs opening the links for MITM
    as HTTPS traffic is much harder to manipulate.

    Deterministic algorithm:
    For each file:
    If not .svg:
    For each line:
    If doesn't contain `\bxmlns\b`:
    For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
    If both the HTTP and HTTPS versions
    return 200 OK and serve the same content:
    Replace HTTP with HTTPS.

    Signed-off-by: Alexander A. Klimov
    Link: https://lore.kernel.org/r/20200621133512.46311-1-grandmaster@al2klimov.de
    Signed-off-by: Jonathan Corbet

    Alexander A. Klimov
     
  • As we moved those files to core-api, fix references to point
    to their newer locations.

    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/37b2fd159fbc7655dbf33b3eb1215396a25f6344.1592895969.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

08 Jun, 2020

1 commit

  • Rationale:
    Reduces attack surface on kernel devs opening the links for MITM
    as HTTPS traffic is much harder to manipulate.

    Deterministic algorithm:
    For each file:
    For each line:
    If doesn't contain `\bxmlns\b`:
    For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
    If both the HTTP and HTTPS versions
    return 200 OK and serve the same content:
    Replace HTTP with HTTPS.

    Signed-off-by: Alexander A. Klimov
    Link: https://lore.kernel.org/r/20200526060544.25127-1-grandmaster@al2klimov.de
    Signed-off-by: Jonathan Corbet

    Alexander A. Klimov
     

11 Apr, 2020

1 commit

  • Pull Documentation fixes from Jonathan Corbet:
    "A handful of late-arriving fixes for the documentation tree"

    * tag 'docs-5.7-2' of git://git.lwn.net/linux:
    Documentation: android: binderfs: add 'stats' mount option
    Documentation: driver-api/usb/writing_usb_driver.rst Updates documentation links
    docs: driver-api: address duplicate label warning
    Documentation: sysrq: fix RST formatting
    docs: kernel-parameters.txt: Fix broken references
    docs: kernel-parameters.txt: Remove nompx
    docs: filesystems: fix typo in qnx6.rst

    Linus Torvalds
     

08 Apr, 2020

1 commit


13 Feb, 2020

1 commit

  • Using the generic notification chain is not reasonable with
    the alternate modes because it would require dependencies
    between the drivers of the components that need the
    notifications, and the typec drivers.

    There are no users for the alternate mode notifications, so
    removing the chain and the API for it completely.

    Signed-off-by: Heikki Krogerus
    Link: https://lore.kernel.org/r/20200211112531.86510-6-heikki.krogerus@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman

    Heikki Krogerus
     

15 Jun, 2019

1 commit

  • Convert the PM documents to ReST, in order to allow them to
    build with Sphinx.

    The conversion is actually:
    - add blank lines and indentation in order to identify paragraphs;
    - fix tables markups;
    - add some lists markups;
    - mark literal blocks;
    - adjust title markups.

    At its new index.rst, let's add a :orphan: while this is not linked to
    the main index.rst file, in order to avoid build warnings.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Bjorn Helgaas
    Acked-by: Mark Brown
    Acked-by: Srivatsa S. Bhat (VMware)

    Mauro Carvalho Chehab
     

20 Apr, 2019

1 commit

  • The syzkaller fuzzer reported a bug in the USB hub driver which turned
    out to be caused by a negative runtime-PM usage counter. This allowed
    a hub to be runtime suspended at a time when the driver did not expect
    it. The symptom is a WARNING issued because the hub's status URB is
    submitted while it is already active:

    URB 0000000031fb463e submitted while active
    WARNING: CPU: 0 PID: 2917 at drivers/usb/core/urb.c:363

    The negative runtime-PM usage count was caused by an unfortunate
    design decision made when runtime PM was first implemented for USB.
    At that time, USB class drivers were allowed to unbind from their
    interfaces without balancing the usage counter (i.e., leaving it with
    a positive count). The core code would take care of setting the
    counter back to 0 before allowing another driver to bind to the
    interface.

    Later on when runtime PM was implemented for the entire kernel, the
    opposite decision was made: Drivers were required to balance their
    runtime-PM get and put calls. In order to maintain backward
    compatibility, however, the USB subsystem adapted to the new
    implementation by keeping an independent usage counter for each
    interface and using it to automatically adjust the normal usage
    counter back to 0 whenever a driver was unbound.

    This approach involves duplicating information, but what is worse, it
    doesn't work properly in cases where a USB class driver delays
    decrementing the usage counter until after the driver's disconnect()
    routine has returned and the counter has been adjusted back to 0.
    Doing so would cause the usage counter to become negative. There's
    even a warning about this in the USB power management documentation!

    As it happens, this is exactly what the hub driver does. The
    kick_hub_wq() routine increments the runtime-PM usage counter, and the
    corresponding decrement is carried out by hub_event() in the context
    of the hub_wq work-queue thread. This work routine may sometimes run
    after the driver has been unbound from its interface, and when it does
    it causes the usage counter to go negative.

    It is not possible for hub_disconnect() to wait for a pending
    hub_event() call to finish, because hub_disconnect() is called with
    the device lock held and hub_event() acquires that lock. The only
    feasible fix is to reverse the original design decision: remove the
    duplicate interface-specific usage counter and require USB drivers to
    balance their runtime PM gets and puts. As far as I know, all
    existing drivers currently do this.

    Signed-off-by: Alan Stern
    Reported-and-tested-by: syzbot+7634edaea4d0b341c625@syzkaller.appspotmail.com
    CC:
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     

19 Dec, 2018

1 commit


02 Jul, 2018

1 commit


24 May, 2018

1 commit


21 May, 2018

2 commits


22 Apr, 2018

1 commit

  • Using reStructuredText literal-block element with ascii-art.
    That prevents the ascii art from being processed as
    reStructuredText.

    Reported-by: Masanari Iida
    Fixes: bdecb33af34f ("usb: typec: API for controlling USB Type-C Multiplexers")
    Signed-off-by: Heikki Krogerus
    Reviewed-by: Jani Nikula
    Tested-by: Jani Nikula
    Reported-by: Hans de Goede
    Signed-off-by: Greg Kroah-Hartman

    Heikki Krogerus
     

05 Apr, 2018

1 commit

  • Pull USB/PHY updates from Greg KH:
    "Here is the big set of USB and PHY driver patches for 4.17-rc1.

    Lots of USB typeC work happened this round, with code moving from the
    staging directory into the "real" part of the kernel, as well as new
    infrastructure being added to be able to handle the different types of
    "roles" that typeC requires.

    There is also the normal huge set of USB gadget controller and driver
    updates, along with XHCI changes, and a raft of other tiny fixes all
    over the USB tree. And the PHY driver updates are merged in here as
    well as they interacted with the USB drivers in some places.

    All of these have been in linux-next for a while with no reported
    issues"

    * tag 'usb-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (250 commits)
    Revert "USB: serial: ftdi_sio: add Id for Physik Instrumente E-870"
    usb: musb: gadget: misplaced out of bounds check
    usb: chipidea: imx: Fix ULPI on imx53
    usb: chipidea: imx: Cleanup ci_hdrc_imx_platform_flag
    usb: chipidea: usbmisc: small clean up
    usb: chipidea: usbmisc: evdo can be set e/o reset
    usb: chipidea: usbmisc: evdo is only specific to OTG port
    USB: serial: ftdi_sio: add Id for Physik Instrumente E-870
    usb: dwc3: gadget: never call ->complete() from ->ep_queue()
    usb: gadget: udc: core: update usb_ep_queue() documentation
    usb: host: Remove the deprecated ATH79 USB host config options
    usb: roles: Fix return value check in intel_xhci_usb_probe()
    USB: gadget: f_midi: fixing a possible double-free in f_midi
    usb: core: Add USB_QUIRK_DELAY_CTRL_MSG to usbcore quirks
    usb: core: Copy parameter string correctly and remove superfluous null check
    USB: announce bcdDevice as well as idVendor, idProduct.
    USB:fix USB3 devices behind USB3 hubs not resuming at hibernate thaw
    usb: hub: Reduce warning to notice on power loss
    USB: serial: ftdi_sio: add support for Harman FirmwareHubEmulator
    USB: serial: cp210x: add ELDAT Easywave RX09 id
    ...

    Linus Torvalds
     

26 Mar, 2018

1 commit

  • The blackfin architecture is getting removed, so we can clean up
    all the special cases in the musb driver.

    Acked-by: Greg Kroah-Hartman
    Acked-by: Aaron Wu
    Acked-by: Bin Liu
    Cc: Stephen Rothwell
    [arnd: adding in fixups from Aaron and Stephen]
    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     

22 Mar, 2018

1 commit

  • USB Type-C connectors consist of various muxes and switches
    that route the pins on the connector to the right locations.
    The USB Type-C drivers need to be able to control the muxes,
    as they are the ones that know things like the cable plug
    orientation, and the current mode that was negotiated with
    the partner.

    This introduces a small API for registering and controlling
    cable plug orientation switches, and separate small API for
    registering and controlling pin multiplexer/demultiplexer
    switches that are needed with Accessory/Alternate Modes.

    Reviewed-by: Hans de Goede
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Heikki Krogerus
    Signed-off-by: Greg Kroah-Hartman

    Heikki Krogerus
     

22 Dec, 2017

1 commit


12 Dec, 2017

1 commit

  • This link is dead:

    $ curl -vI http://usb.cs.tum.edu/usbdoc
    * Could not resolve host: usb.cs.tum.edu
    * Closing connection 0
    curl: (6) Could not resolve host: usb.cs.tum.edu

    I found the document somewhere else. Let's replace it.

    Signed-off-by: Stefan Tatschner
    Signed-off-by: Jonathan Corbet

    Stefan Tatschner
     

13 Oct, 2017

1 commit


20 Jun, 2017

1 commit


02 Jun, 2017

2 commits


21 Apr, 2017

2 commits


12 Apr, 2017

10 commits