07 Sep, 2013

1 commit

  • Pull powerpc updates from Ben Herrenschmidt:
    "Here's the powerpc batch for this merge window. Some of the
    highlights are:

    - A bunch of endian fixes ! We don't have full LE support yet in that
    release but this contains a lot of fixes all over arch/powerpc to
    use the proper accessors, call the firmware with the right endian
    mode, etc...

    - A few updates to our "powernv" platform (non-virtualized, the one
    to run KVM on), among other, support for bridging the P8 LPC bus
    for UARTs, support and some EEH fixes.

    - Some mpc51xx clock API cleanups in preparation for a clock API
    overhaul

    - A pile of cleanups of our old math emulation code, including better
    support for using it to emulate optional FP instructions on
    embedded chips that otherwise have a HW FPU.

    - Some infrastructure in selftest, for powerpc now, but could be
    generalized, initially used by some tests for our perf instruction
    counting code.

    - A pile of fixes for hotplug on pseries (that was seriously
    bitrotting)

    - The usual slew of freescale embedded updates, new boards, 64-bit
    hiberation support, e6500 core PMU support, etc..."

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (146 commits)
    powerpc: Correct FSCR bit definitions
    powerpc/xmon: Fix printing of set of CPUs in xmon
    powerpc/pseries: Move lparcfg.c to platforms/pseries
    powerpc/powernv: Return secondary CPUs to firmware on kexec
    powerpc/btext: Fix CONFIG_PPC_EARLY_DEBUG_BOOTX on ppc32
    powerpc: Cleanup handling of the DSCR bit in the FSCR register
    powerpc/pseries: Child nodes are not detached by dlpar_detach_node
    powerpc/pseries: Add mising of_node_put in delete_dt_node
    powerpc/pseries: Make dlpar_configure_connector parent node aware
    powerpc/pseries: Do all node initialization in dlpar_parse_cc_node
    powerpc/pseries: Fix parsing of initial node path in update_dt_node
    powerpc/pseries: Pack update_props_workarea to map correctly to rtas buffer header
    powerpc/pseries: Fix over writing of rtas return code in update_dt_node
    powerpc/pseries: Fix creation of loop in device node property list
    powerpc: Skip emulating & leave interrupts off for kernel program checks
    powerpc: Add more exception trampolines for hypervisor exceptions
    powerpc: Fix location and rename exception trampolines
    powerpc: Add more trap names to xmon
    powerpc/pseries: Add a warning in the case of cross-cpu VPA registration
    powerpc: Update the 00-Index in Documentation/powerpc
    ...

    Linus Torvalds
     

04 Sep, 2013

3 commits

  • Pull driver core patches from Greg KH:
    "Here's the big driver core pull request for 3.12-rc1.

    Lots of tiny changes here fixing up the way sysfs attributes are
    created, to try to make drivers simpler, and fix a whole class race
    conditions with creations of device attributes after the device was
    announced to userspace.

    All the various pieces are acked by the different subsystem
    maintainers"

    * tag 'driver-core-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (119 commits)
    firmware loader: fix pending_fw_head list corruption
    drivers/base/memory.c: introduce help macro to_memory_block
    dynamic debug: line queries failing due to uninitialized local variable
    sysfs: sysfs_create_groups returns a value.
    debugfs: provide debugfs_create_x64() when disabled
    rbd: convert bus code to use bus_groups
    firmware: dcdbas: use binary attribute groups
    sysfs: add sysfs_create/remove_groups for when SYSFS is not enabled
    driver core: add #include to core files.
    HID: convert bus code to use dev_groups
    Input: serio: convert bus code to use drv_groups
    Input: gameport: convert bus code to use drv_groups
    driver core: firmware: use __ATTR_RW()
    driver core: core: use DEVICE_ATTR_RO
    driver core: bus: use DRIVER_ATTR_WO()
    driver core: create write-only attribute macros for devices and drivers
    sysfs: create __ATTR_WO()
    driver-core: platform: convert bus code to use dev_groups
    workqueue: convert bus code to use dev_groups
    MEI: convert bus code to use dev_groups
    ...

    Linus Torvalds
     
  • Pull char/misc patches from Greg KH:
    "Here is the big char/misc driver pull request for 3.12-rc1

    Lots of driver updates all over the char/misc tree, full details in
    the shortlog"

    * tag 'char-misc-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (62 commits)
    drivers: uio: Kconfig: add MMU dependancy for UIO
    drivers: uio: Add driver for Humusoft MF624 DAQ PCI card
    drivers: uio_pdrv_genirq: use dev_get_platdata()
    drivers: uio_pruss: use dev_get_platdata()
    drivers: uio_dmem_genirq: use dev_get_platdata()
    drivers: parport: Kconfig: exclude h8300 for PARPORT_PC
    drivers: misc: ti-st: fix potential race if st_kim_start fails
    Drivers: hv: vmbus: Do not attempt to negoatiate a new version prematurely
    misc: vmw_balloon: Remove braces to fix build for clang.
    Drivers: hv: vmbus: Fix a bug in the handling of channel offers
    vme: vme_ca91cx42.c: fix to pass correct device identity to free_irq()
    VMCI: Add support for virtual IOMMU
    VMCI: Remove non-blocking/pinned queuepair support
    uio: uio_pruss: remove unnecessary platform_set_drvdata()
    parport: amiga: remove unnecessary platform_set_drvdata()
    vme: vme_vmivme7805.c: add missing __iomem annotation
    vme: vme_ca91cx42.c: add missing __iomem annotation
    vme: vme_tsi148.c: add missing __iomem annotation
    drivers/misc/hpilo: Correct panic when an AUX iLO is detected
    uio: drop unused vma_count member in uio_device struct
    ...

    Linus Torvalds
     
  • Pull USB patches from Greg KH:
    "Here's the big USB driver pull request for 3.12-rc1

    Lots of USB driver fixes and updates. Nothing major, just the normal
    xhci, gadget, and other driver changes. Full details in the shortlog"

    * tag 'usb-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (352 commits)
    usbcore: fix incorrect type in assignment in descriptors_changed()
    usbcore: compare and release one bos descriptor in usb_reset_and_verify_device()
    ehci: remove debugging statement with ehci statistics in ehci_stop()
    ehci: remove duplicate debug_async_open() prototype in ehci-dbg.c
    ehci: enable debugging code when CONFIG_DYNAMIC_DEBUG is set
    ehci: remove ehci_vdbg() verbose debugging statements
    Documentation sysfs-bus-usb: Document which files are used by libusb
    Documentation sysfs-bus-usb: Document the speed file used by libusb
    Documentation sysfs-bus-usb: Move files with known users to stable
    USB: fix build error when CONFIG_PM_SLEEP isn't enabled
    usb: r8a66597-hcd: use platform_{get,set}_drvdata()
    usb: phy-tegra-usb: use platform_{get,set}_drvdata()
    usb: acm gadget: Null termintate strings table
    dma: cppi41: off by one in desc_to_chan()
    xhci: Fix warning introduced by disabling runtime PM.
    dev-core: fix build break when DEBUG is enabled
    USB: OHCI: Allow runtime PM without system sleep
    usb: ohci-at91: remove unnecessary dev_set_drvdata()
    usb: renesas_usbhs: use platform_{get,set}_drvdata()
    usb: fotg210-udc: use platform_{get,set}_drvdata()
    ...

    Linus Torvalds
     

31 Aug, 2013

9 commits


29 Aug, 2013

2 commits

  • …kernel/git/sarah/xhci into usb-next

    Sarah writes:

    xhci: Fix build breakage and new warnings.

    Hi Greg,

    This first patch should fix the build breakage Sedat Dilek reported.
    Apologizes for not including this patch before commit
    0730d52a86919300a39a2be37f6c140997dfb82f "xhci:prevent "callbacks suppressed"
    when debug is not enabled"

    The second patch fixes a new build warning introduced by commit
    c8476fb855434c733099079063990e5bfa7ecad6 "usb: xhci: Disable runtime PM suspend
    for quirky controllers", which was caught by the 0day build system.

    Sarah Sharp

    Greg Kroah-Hartman
     
  • The 0day build server caught a new build warning that is triggered when
    CONFIG_USB_DEFAULT_PERSIST is turned on:

    tree: git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci.git for-usb-next
    head: 0730d52a86919300a39a2be37f6c140997dfb82f
    commit: c8476fb855434c733099079063990e5bfa7ecad6 [1/3] usb: xhci: Disable runtime PM suspend for quirky controllers
    config: i386-randconfig-r6-0826 (attached as .config)

    All warnings:

    drivers/usb/host/xhci.c: In function 'xhci_free_dev':
    >> drivers/usb/host/xhci.c:3560:17: warning: unused variable 'dev' [-Wunused-variable]
    struct device *dev = hcd->self.controller;
    ^
    drivers/usb/host/xhci.c: In function 'xhci_alloc_dev':
    >> drivers/usb/host/xhci.c:3648:17: warning: unused variable 'dev' [-Wunused-variable]
    struct device *dev = hcd->self.controller;
    ^

    vim +/dev +3560 drivers/usb/host/xhci.c

    3554 * disabled. Free any HC data structures associated with that device.
    3555 */
    3556 void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev)
    3557 {
    3558 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
    3559 struct xhci_virt_device *virt_dev;
    > 3560 struct device *dev = hcd->self.controller;
    3561 unsigned long flags;
    3562 u32 state;
    3563 int i, ret;
    3564
    3565 #ifndef CONFIG_USB_DEFAULT_PERSIST
    3566 /*
    3567 * We called pm_runtime_get_noresume when the device was attached.
    3568 * Decrement the counter here to allow controller to runtime suspend
    3569 * if no devices remain.
    3570 */
    3571 if (xhci->quirks & XHCI_RESET_ON_RESUME)
    3572 pm_runtime_put_noidle(dev);
    3573 #endif
    3574
    ...
    3641 /*
    3642 * Returns 0 if the xHC ran out of device slots, the Enable Slot command
    3643 * timed out, or allocating memory failed. Returns 1 on success.
    3644 */
    3645 int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev)
    3646 {
    3647 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
    > 3648 struct device *dev = hcd->self.controller;
    3649 unsigned long flags;
    3650 int timeleft;
    3651 int ret;

    Fix this.

    Signed-off-by: Sarah Sharp
    Cc: Shawn Nematbakhsh

    Sarah Sharp
     

28 Aug, 2013

25 commits

  • Since ohci-hcd supports runtime PM, the .pm field in its pci_driver
    structure should be protected by CONFIG_PM rather than
    CONFIG_PM_SLEEP.

    Without this change, OHCI controllers won't do runtime suspend if
    system suspend or hibernation isn't enabled.

    Signed-off-by: Alan Stern
    cc:
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • Unnecessary dev_set_drvdata() is removed, because the driver core
    clears the driver data to NULL after device_release or on probe failure.

    Signed-off-by: Libo Chen
    Signed-off-by: Greg Kroah-Hartman

    Libo Chen
     
  • Use the wrapper functions for getting and setting the driver data using
    platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
    so we can directly pass a struct platform_device.

    Signed-off-by: Libo Chen
    Signed-off-by: Greg Kroah-Hartman

    Libo Chen
     
  • Use the wrapper functions for getting and setting the driver data using
    platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
    so we can directly pass a struct platform_device.

    Signed-off-by: Libo Chen
    Signed-off-by: Greg Kroah-Hartman

    Libo Chen
     
  • …/balbi/usb into usb-next

    Felipe writes:

    usb: patches for v3.12 merge window (part 2)

    Here's a set of important fixes for v3.12 merge
    window which have been pending in the mailing list
    for quite some time.

    We have use-after-free fixes, signedness fixes,
    more of HAS_DMA dependencies, fixes for NULL pointer
    deferences, build fixes and some other fixes to
    the musb driver caused by recent patches.

    Patches are quite small and contain valuable fixes
    which will give us a much better -rc1 release.

    Please consider merging

    Signed-of-by: Felipe Balbi <balbi@ti.com>

    Greg Kroah-Hartman
     
  • Convert the usbsorage sysfs attribute to use the _RW macro to make it
    easier to determine the permissions for the file.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Dan Carpenter's automatic Smatch checker found an anomaly in the ux500
    MUSB driver, whereby board data was checked before use in all but one
    occasion. It is believed that it needs to be checked every time.

    Smatch complaint:
    drivers/usb/musb/ux500_dma.c:335 ux500_dma_controller_start()
    error: we previously assumed 'data' could be null (see line 313)

    Cc: Felipe Balbi
    Cc: Greg Kroah-Hartman
    Cc: linux-usb@vger.kernel.org
    Cc: Dan Carpenter
    Signed-off-by: Lee Jones
    Signed-off-by: Felipe Balbi

    Lee Jones
     
  • The "goto out" statements were wrong. We aren't holding any locks at
    that point so we should return directly.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Felipe Balbi

    Dan Carpenter
     
  • "ret" needs to be signed for the error handling to work.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Felipe Balbi

    Dan Carpenter
     
  • ffs_data_put() can sometimes free "ffs" so I have moved the call down
    a line below the dereference.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Felipe Balbi

    Dan Carpenter
     
  • The call to put_dev() releases "dev". Hopefully, we don't need to set
    the state to STATE_DEV_DISABLED anyway so I have removed those lines.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Felipe Balbi

    Dan Carpenter
     
  • …/git/sarah/xhci into usb-next

    Sarah writes:

    xhci: Bug fixes for 3.12.

    Hi Greg,

    Here's three low-priority bug fixes that should be queued for 3.12.
    They disable runtime PM for hosts that need the XHCI_RESET_ON_RESUME
    quirk, fix USB 2.0 Link PM on hosts that don't have BESL support, and
    prevent a bunch of log spam.

    Please pull into usb-next for 3.12.

    Sarah Sharp

    Greg Kroah-Hartman
     
  • otg.h header file was included twice.

    Signed-off-by: Sachin Kamat
    Signed-off-by: Felipe Balbi

    Sachin Kamat
     
  • Commit 94ae9843 (usb: phy: rename all phy drivers to phy-$name-usb.c)
    renamed drivers/usb/phy/otg_fsm.h to drivers/usb/phy/phy-fsm-usb.h
    but changed drivers/usb/phy/phy-fsm-usb.c to include not existing
    "phy-otg-fsm.h" instead of new "phy-fsm-usb.h". This breaks building:
    ...
    drivers/usb/phy/phy-fsm-usb.c:32:25: fatal error: phy-otg-fsm.h: No such file or directory
    compilation terminated.
    make[3]: *** [drivers/usb/phy/phy-fsm-usb.o] Error 1

    This commit also missed to modify drivers/usb/phy/phy-fsl-usb.h
    to include new "phy-fsm-usb.h" instead of "otg_fsm.h" resulting
    in another build breakage:
    ...
    In file included from drivers/usb/phy/phy-fsl-usb.c:46:0:
    drivers/usb/phy/phy-fsl-usb.h:18:21: fatal error: otg_fsm.h: No such file or directory
    compilation terminated.
    make[3]: *** [drivers/usb/phy/phy-fsl-usb.o] Error 1

    Fix both issues.

    Signed-off-by: Anatolij Gustschin
    Cc: stable@vger.kernel.org
    Signed-off-by: Felipe Balbi

    Anatolij Gustschin
     
  • Convert all USB gadget sysfs attributes to use the _RO or _RW variants,
    to make them easier to audit and ensure that the permissions are
    correct.

    Note, two are left using the DEVICE_ATTR() macro, as there is no
    DEVICE_ATTR_WO() in Linus's tree, that will happen after 3.12-rc1 is
    out, a follow-on patch will be sent then.

    Reviewed-by: Felipe Balbi
    Acked-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    --
    drivers/usb/gadget/composite.c | 8 +++-----
    drivers/usb/gadget/dummy_hcd.c | 8 ++++----
    drivers/usb/gadget/f_mass_storage.c | 14 ++++++--------
    drivers/usb/gadget/net2272.c | 4 ++--
    drivers/usb/gadget/net2280.c | 18 +++++++++---------
    drivers/usb/gadget/storage_common.c | 25 ++++++++++++-------------
    drivers/usb/gadget/udc-core.c | 14 +++++++-------
    7 files changed, 43 insertions(+), 48 deletions(-)

    Greg Kroah-Hartman
     
  • This is what I observe:
    On the first connect, the musb starts with DEVCTL.Session set. On
    disconnect, musb_core calls try_idle. That functions removes the Session
    bit signalizing that the session is over (something that only in OTG is
    required). A new device, that is plugged, is no longer recognized.
    I've setup a timer and checked the DEVCTL register and I haven't seen a
    change in VBus and I saw the B-Device bit set. After setting the IDDIG
    into A mode and forcing the device to behave like a A device, I didn't
    see a change.
    Neither VBUS goes to 0b11 nor does a session start request comes.
    In the TI-v3.2 kernel they skip to call musb_platform_try_idle() in the
    OTG_STATE_A_WAIT_BCON state while not in OTG mode.
    Since the second port hast a standard A plug the patch changes the port
    to run in host mode only and skips the timer which would remove
    DEVCTL.Session so we can reconnect to another device later.

    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Felipe Balbi

    Sebastian Andrzej Siewior
     
  • Quite early on init there is an vbus / drvvbus interrupt comming and the
    dsps code sets is_active to one. As a result we see a lot of

    |musb_bus_suspend 2459: trying to suspend as a_wait_bcon while active

    until a device is plugged in with pm_runtime enabled in the kernel.
    After checking davinci, am35, da8xx I noticed that dsps is actually the
    only one doing this.
    So remove it and we won't flooded with mesages and the idle port can be
    suspended.

    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Felipe Balbi

    Sebastian Andrzej Siewior
     
  • This relfects the code and dts requires changes due to recent .dts
    binding updates:
    - use mg prefix for the Metor Graphics specific attributes
    - use power in mA not in mA/2 as specifed in the USB2.0 specification
    - remove the child node for USB. This is driver specific on won't be
    reflected in the device tree
    - use the "mentor" prefix instead of "mg".
    - use "dr_mode" istead of "mg,port-mode" for the port mode. The former
    is used by a few other drivers.

    Cc: Rob Herring
    Cc: Pawel Moll
    Cc: Mark Rutland
    Cc: Stephen Warren
    Cc: Ian Campbell
    Cc: devicetree@vger.kernel.org
    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Felipe Balbi

    Sebastian Andrzej Siewior
     
  • musb_shutdown() removes always USB host and device.
    musb_init_controller() adds host and device depending on port_mode. If
    port mode is set to HOST then the removal of UDC leads only to:
    |(NULL device *): gadget not registered.
    and nothing else happens. If port mode is set to DEVICE and we remove
    the host then we oops in usb_remove_hcd().
    This patch ensures that we only remove host in OTG/host mode and device
    only in OTG/device mode to avoid any trouble.

    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Felipe Balbi

    Sebastian Andrzej Siewior
     
  • devm_ioremap_resource returns an ERR_PTR value, not NULL, on failure.
    Furthermore, the value returned by devm_ioremap_resource should be tested.

    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @@
    expression e,e1;
    statement S;
    @@

    *e = devm_ioremap_resource(...);
    if (!e1) S

    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Felipe Balbi

    Julia Lawall
     
  • If NO_DMA=y:

    drivers/built-in.o: In function `net2272_done':
    drivers/usb/gadget/net2272.c:386: undefined reference to `usb_gadget_unmap_request'
    drivers/built-in.o: In function `net2272_queue':
    drivers/usb/gadget/net2272.c:848: undefined reference to `usb_gadget_map_request'

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Felipe Balbi

    Geert Uytterhoeven
     
  • If NO_DMA=y:

    drivers/built-in.o: In function `sudmac_free_channel':
    drivers/usb/gadget/r8a66597-udc.c:676: undefined reference to `usb_gadget_unmap_request'
    drivers/built-in.o: In function `sudmac_alloc_channel':
    drivers/usb/gadget/r8a66597-udc.c:666: undefined reference to `usb_gadget_map_request'

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Felipe Balbi

    Geert Uytterhoeven
     
  • If NO_DMA=y:

    drivers/built-in.o: In function `fusb300_set_idma':
    drivers/usb/gadget/fusb300_udc.c:946: undefined reference to `usb_gadget_map_request'
    drivers/usb/gadget/fusb300_udc.c:958: undefined reference to `usb_gadget_unmap_request'

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Felipe Balbi

    Geert Uytterhoeven
     
  • Since commit 511f3c53 (usb: gadget: udc-core: fix a regression during
    gadget driver unbinding) usb_gadget_remove_driver will pass NULL for
    the driver argument.

    Signed-off-by: Maarten ter Huurne
    Signed-off-by: Felipe Balbi

    Maarten ter Huurne
     
  • Add the missing unlock before return from function cppi41_dma_callback()
    in the error handling case.

    Signed-off-by: Wei Yongjun
    Signed-off-by: Felipe Balbi

    Wei Yongjun