1. 03 Sep, 2014 11 commits
    • Pratyush Anand's avatar
      USB: Fix persist resume of some SS USB devices · 438430f7
      Pratyush Anand authored
      commit a40178b2 upstream.
      
      Problem Summary: Problem has been observed generally with PM states
      where VBUS goes off during suspend. There are some SS USB devices which
      take longer time for link training compared to many others.  Such
      devices fail to reconnect with same old address which was associated
      with it before suspend.
      
      When system resumes, at some point of time (dpm_run_callback->
      usb_dev_resume->usb_resume->usb_resume_both->usb_resume_device->
      usb_port_resume) SW reads hub status. If device is present,
      then it finishes port resume and re-enumerates device with same
      address. If device is not present then, SW thinks that device was
      removed during suspend and therefore does logical disconnection
      and removes all the resource allocated for this device.
      
      Now, if I put sufficient delay just before root hub status read in
      usb_resume_device then, SW sees always that device is present. In normal
      course(without any delay) SW sees that no device is present and then SW
      removes all resource associated with the device at this port.  In the
      latter case, after sometime, device says that hey I am here, now host
      enumerates it, but with new address.
      
      Problem had been reproduced when I connect verbatim USB3.0 hard disc
      with my STiH407 XHCI host running with 3.10 kernel.
      
      I see that similar problem has been reported here.
      https://bugzilla.kernel.org/show_bug.cgi?id=53211
      Reading above it seems that bug was not in 3.6.6 and was present in 3.8
      and again it was not present for some in 3.12.6, while it was present
      for few others. I tested with 3.13-FC19 running at i686 desktop, problem
      was still there. However, I was failed to reproduce it with 3.16-RC4
      running at same i686 machine. I would say it is just a random
      observation. Problem for few devices is always there, as I am unable to
      find a proper fix for the issue.
      
      So, now question is what should be the amount of delay so that host is
      always able to recognize suspended device after resume.
      
      XHCI specs 4.19.4 says that when Link training is successful, port sets
      CSC bit to 1. So if SW reads port status before successful link
      training, then it will not find device to be present.  USB Analyzer log
      with such buggy devices show that in some cases device switch on the
      RX termination after long delay of host enabling the VBUS. In few other
      cases it has been seen that device fails to negotiate link training in
      first attempt. It has been reported till now that few devices take as
      long as 2000 ms to train the link after host enabling its VBUS and
      RX termination. This patch implements a 2000 ms timeout for CSC bit to set
      ie for link training. If in a case link trains before timeout, loop will
      exit earlier.
      
      This patch implements above delay, but only for SS device and when
      persist is enabled.
      
      So, for the good device overhead is almost none. While for the bad
      devices penalty could be the time which it take for link training.
      But, If a device was connected before suspend, and was removed
      while system was asleep, then the penalty would be the timeout ie
      2000 ms.
      
      Results:
      
      Verbatim USB SS hard disk connected with STiH407 USB host running 3.10
      Kernel resumes in 461 msecs without this patch, but hard disk is
      assigned a new device address. Same system resumes in 790 msecs with
      this patch, but with old device address.
      Signed-off-by: default avatarPratyush Anand <pratyush.anand@st.com>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      438430f7
    • Bryan O'Donoghue's avatar
      USB: ehci-pci: USB host controller support for Intel Quark X1000 · 7d8de293
      Bryan O'Donoghue authored
      commit 6e693739 upstream.
      
      The EHCI packet buffer in/out threshold is programmable for Intel Quark X1000
      USB host controller, and the default value is 0x20 dwords. The in/out threshold
      can be programmed to 0x80 dwords (512 Bytes) to maximize the perfomrance,
      but only when isochronous/interrupt transactions are not initiated by the USB
      host controller. This patch is to reconfigure the packet buffer in/out
      threshold as maximal as possible to maximize the performance, and 0x7F dwords
      (508 Bytes) should be used because the USB host controller initiates
      isochronous/interrupt transactions.
      Signed-off-by: default avatarBryan O'Donoghue <bryan.odonoghue@intel.com>
      Signed-off-by: default avatarAlvin (Weike) Chen <alvin.chen@intel.com>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Reviewed-by: default avatarJingoo Han <jg1.han@samsung.com>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      7d8de293
    • Patrick Riphagen's avatar
      USB: serial: ftdi_sio: Add support for new Xsens devices · 5dbc2ae5
      Patrick Riphagen authored
      commit 4bdcde35 upstream.
      
      This adds support for new Xsens devices, using Xsens' own Vendor ID.
      Signed-off-by: default avatarPatrick Riphagen <patrick.riphagen@xsens.com>
      Signed-off-by: default avatarFrans Klaver <frans.klaver@xsens.com>
      Cc: Johan Hovold <johan@kernel.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      5dbc2ae5
    • Patrick Riphagen's avatar
      USB: serial: ftdi_sio: Annotate the current Xsens PID assignments · 04bd57fa
      Patrick Riphagen authored
      commit 9273b8a2 upstream.
      
      The converters are used in specific products. It can be useful to know
      which they are exactly.
      Signed-off-by: default avatarPatrick Riphagen <patrick.riphagen@xsens.com>
      Signed-off-by: default avatarFrans Klaver <frans.klaver@xsens.com>
      Cc: Johan Hovold <johan@kernel.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      04bd57fa
    • Oliver Neukum's avatar
      USB: devio: fix issue with log flooding · 2ecbdb15
      Oliver Neukum authored
      commit d310d05f upstream.
      
      usbfs allows user space to pass down an URB which sets URB_SHORT_NOT_OK
      for output URBs. That causes usbcore to log messages without limit
      for a nonsensical disallowed combination. The fix is to silently drop
      the attribute in usbfs.
      The problem is reported to exist since 3.14
      https://www.virtualbox.org/ticket/13085Signed-off-by: default avatarOliver Neukum <oneukum@suse.de>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      2ecbdb15
    • Alan Stern's avatar
      USB: OHCI: don't lose track of EDs when a controller dies · bdd2e343
      Alan Stern authored
      commit 977dcfdc upstream.
      
      This patch fixes a bug in ohci-hcd.  When an URB is unlinked, the
      corresponding Endpoint Descriptor is added to the ed_rm_list and taken
      off the hardware schedule.  Once the ED is no longer visible to the
      hardware, finish_unlinks() handles the URBs that were unlinked or have
      completed.  If any URBs remain attached to the ED, the ED is added
      back to the hardware schedule -- but only if the controller is
      running.
      
      This fails when a controller dies.  A non-empty ED does not get added
      back to the hardware schedule and does not remain on the ed_rm_list;
      ohci-hcd loses track of it.  The remaining URBs cannot be unlinked,
      which causes the USB stack to hang.
      
      The patch changes finish_unlinks() so that non-empty EDs remain on
      the ed_rm_list if the controller isn't running.  This requires moving
      some of the existing code around, to avoid modifying the ED's hardware
      fields more than once.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      bdd2e343
    • Alan Stern's avatar
      USB: OHCI: fix bugs in debug routines · 6a04d05a
      Alan Stern authored
      commit 256dbcd8 upstream.
      
      The debug routine fill_async_buffer() in ohci-hcd is buggy: It never
      produces any output because it forgets to initialize the output buffer
      size.  Also, the debug routine ohci_dump() has an unused argument.
      
      This patch adds the correct initialization and removes the unused
      argument.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      6a04d05a
    • Jan Kara's avatar
      isofs: Fix unbounded recursion when processing relocated directories · e4ca8b78
      Jan Kara authored
      commit 410dd3cf upstream.
      
      We did not check relocated directory in any way when processing Rock
      Ridge 'CL' tag. Thus a corrupted isofs image can possibly have a CL
      entry pointing to another CL entry leading to possibly unbounded
      recursion in kernel code and thus stack overflow or deadlocks (if there
      is a loop created from CL entries).
      
      Fix the problem by not allowing CL entry to point to a directory entry
      with CL entry (such use makes no good sense anyway) and by checking
      whether CL entry doesn't point to itself.
      Reported-by: default avatarChris Evans <cevans@google.com>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      e4ca8b78
    • Jiri Kosina's avatar
      HID: fix a couple of off-by-ones · 1f78f21b
      Jiri Kosina authored
      commit 4ab25786 upstream.
      
      There are a few very theoretical off-by-one bugs in report descriptor size
      checking when performing a pre-parsing fixup. Fix those.
      Reported-by: default avatarBen Hawkes <hawkes@google.com>
      Reviewed-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      1f78f21b
    • Jiri Kosina's avatar
      HID: logitech: perform bounds checking on device_id early enough · 2ae8a666
      Jiri Kosina authored
      commit ad3e14d7 upstream.
      
      device_index is a char type and the size of paired_dj_deivces is 7
      elements, therefore proper bounds checking has to be applied to
      device_index before it is used.
      
      We are currently performing the bounds checking in
      logi_dj_recv_add_djhid_device(), which is too late, as malicious device
      could send REPORT_TYPE_NOTIF_DEVICE_UNPAIRED early enough and trigger the
      problem in one of the report forwarding functions called from
      logi_dj_raw_event().
      
      Fix this by performing the check at the earliest possible ocasion in
      logi_dj_raw_event().
      Reported-by: default avatarBen Hawkes <hawkes@google.com>
      Reviewed-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      2ae8a666
    • Bjorn Helgaas's avatar
      PCI: Add pci_upstream_bridge() · 5d1ab637
      Bjorn Helgaas authored
      commit c6bde215 upstream.
      
      This adds a pci_upstream_bridge() interface to find the PCI-to-PCI bridge
      upstream from a device.  This is typically just "dev->bus->self", but in
      the case of a VF on a virtual bus, we have to start from the corresponding
      PF.  Returns NULL if there is no upstream PCI bridge, i.e., if the device
      is on a root bus.
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Acked-by: default avatarYinghai Lu <yinghai@kernel.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      5d1ab637
  2. 02 Sep, 2014 9 commits
    • Gu Zheng's avatar
      bio-integrity: add "bip_max_vcnt" into struct bio_integrity_payload · c27a4fe1
      Gu Zheng authored
      commit cbcd1054 upstream.
      
      Commit 08778795 ("block: Fix nr_vecs for inline integrity vectors") from
      Martin introduces the function bip_integrity_vecs(get the useful vectors)
      to fix the issue about nr_vecs for inline integrity vectors that reported
      by David Milburn.
      
      But it seems that bip_integrity_vecs() will return the wrong number if the
      bio is not based on any bio_set for some reason(bio->bi_pool == NULL),
      because in that case, the bip_inline_vecs[0] is malloced directly.  So
      here we add the bip_max_vcnt to record the count of vector slots, and
      cleanup the function bip_integrity_vecs().
      Signed-off-by: default avatarGu Zheng <guz.fnst@cn.fujitsu.com>
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Kent Overstreet <kmo@daterainc.com>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      c27a4fe1
    • Lee, Chun-Yi's avatar
      PM / hibernate: avoid unsafe pages in e820 reserved regions · ab73940a
      Lee, Chun-Yi authored
      commit 84c91b7a upstream.
      
      When the machine doesn't well handle the e820 persistent when hibernate
      resuming, then it may cause page fault when writing image to snapshot
      buffer:
      
      [   17.929495] BUG: unable to handle kernel paging request at ffff880069d4f000
      [   17.933469] IP: [<ffffffff810a1cf0>] load_image_lzo+0x810/0xe40
      [   17.933469] PGD 2194067 PUD 77ffff067 PMD 2197067 PTE 0
      [   17.933469] Oops: 0002 [#1] SMP
      ...
      
      The ffff880069d4f000 page is in e820 reserved region of resume boot
      kernel:
      
      [    0.000000] BIOS-e820: [mem 0x0000000069d4f000-0x0000000069e12fff] reserved
      ...
      [    0.000000] PM: Registered nosave memory: [mem 0x69d4f000-0x69e12fff]
      
      So snapshot.c mark the pfn to forbidden pages map. But, this
      page is also in the memory bitmap in snapshot image because it's an
      original page used by image kernel, so it will also mark as an
      unsafe(free) page in prepare_image().
      
      That means the page in e820 when resuming mark as "forbidden" and
      "free", it causes get_buffer() treat it as an allocated unsafe page.
      Then snapshot_write_next() return this page to load_image, load_image
      writing content to this address, but this page didn't really allocated
      . So, we got page fault.
      
      Although the root cause is from BIOS, I think aggressive check and
      significant message in kernel will better then a page fault for
      issue tracking, especially when serial console unavailable.
      
      This patch adds code in mark_unsafe_pages() for check does free pages in
      nosave region. If so, then it print message and return fault to stop whole
      S4 resume process:
      
      [    8.166004] PM: Image loading progress:   0%
      [    8.658717] PM: 0x6796c000 in e820 nosave region: [mem 0x6796c000-0x6796cfff]
      [    8.918737] PM: Read 2511940 kbytes in 1.04 seconds (2415.32 MB/s)
      [    8.926633] PM: Error -14 resuming
      [    8.933534] PM: Failed to load hibernation image, recovering.
      Reviewed-by: default avatarTakashi Iwai <tiwai@suse.de>
      Acked-by: default avatarPavel Machek <pavel@ucw.cz>
      Signed-off-by: default avatarLee, Chun-Yi <jlee@suse.com>
      [rjw: Subject]
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      ab73940a
    • Wangzhao Cai's avatar
      HID: add quirk for 0x04d9:0xa096 device · 0325fb03
      Wangzhao Cai authored
      commit 30c6fd42 upstream.
      
      I am using a USB keyborad that give me "usb_submit_urb(ctrl) failed: -1" error
      when I plugin it.  and I need to wait for 10s for this device to be ready.
      
      By adding this quirks, the usb keyborad is usable right after plugin
      Signed-off-by: default avatarWangzhao Cai <microcaicai@gmail.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      0325fb03
    • Jiang Liu's avatar
      USB: core: hcd-pci: free IRQ before disabling PCI device when shutting down · e5063845
      Jiang Liu authored
      commit c5946f9d upstream.
      
      The assigned IRQ should be freed before calling pci_disable_device()
      when shutting down system, otherwise it will cause following warning.
      [  568.879482] ------------[ cut here ]------------
      [  568.884236] WARNING: CPU: 1 PID: 3300 at /home/konrad/ssd/konrad/xtt-i386/bootstrap/linux-usb/fs/proc/generic.c:521 remove_proc_entry+0x165/0x170()
      [  568.897846] remove_proc_entry: removing non-empty directory 'irq/16', leaking at least 'ohci_hcd:usb4'
      [  568.907430] Modules linked in: dm_multipath dm_mod iscsi_boot_sysfs iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi libcrc32c crc32c_generic sg sd_mod crct10dif_generic crc_t10dif crct10dif_common radeon fbcon tileblit ttm font bitblit softcursor ata_generic ahci libahci drm_kms_helper skge r8169 libata mii scsi_mod wmi acpi_cpufreq
      [  568.938539] CPU: 1 PID: 3300 Comm: init Tainted: G        W     3.16.0-rc5upstream-01651-g03b9189 #1
      [  568.947946] Hardware name: ECS A780GM-A Ultra/A780GM-A Ultra, BIOS 080015  04/01/2010
      [  568.956008]  00000209 ed0f1cd0 c1617946 c175403c ed0f1d00 c1090c3f c1754084 ed0f1d2c
      [  568.964068]  00000ce4 c175403c 00000209 c11f22a5 c11f22a5 f755e8c0 ed0f1d78 f755e90d
      [  568.972128]  ed0f1d18 c1090cde 00000009 ed0f1d10 c1754084 ed0f1d2c ed0f1d60 c11f22a5
      [  568.980194] Call Trace:
      [  568.982715]  [<c1617946>] dump_stack+0x48/0x60
      [  568.987294]  [<c1090c3f>] warn_slowpath_common+0x7f/0xa0
      [  569.003887]  [<c1090cde>] warn_slowpath_fmt+0x2e/0x30
      [  569.009092]  [<c11f22a5>] remove_proc_entry+0x165/0x170
      [  569.014476]  [<c10da6ca>] unregister_irq_proc+0xaa/0xc0
      [  569.019858]  [<c10d582f>] free_desc+0x1f/0x60
      [  569.024346]  [<c10d58aa>] irq_free_descs+0x3a/0x80
      [  569.029283]  [<c10d9e9d>] irq_dispose_mapping+0x2d/0x50
      [  569.034666]  [<c1078fd3>] mp_unmap_irq+0x73/0xa0
      [  569.039423]  [<c107196b>] acpi_unregister_gsi_ioapic+0x2b/0x40
      [  569.045431]  [<c107180f>] acpi_unregister_gsi+0xf/0x20
      [  569.050725]  [<c1339cad>] acpi_pci_irq_disable+0x4b/0x50
      [  569.056196]  [<c14daa38>] pcibios_disable_device+0x18/0x20
      [  569.061848]  [<c130123d>] do_pci_disable_device+0x4d/0x60
      [  569.067410]  [<c13012b7>] pci_disable_device+0x47/0xb0
      [  569.077814]  [<c14800b1>] usb_hcd_pci_shutdown+0x31/0x40
      [  569.083285]  [<c1304b19>] pci_device_shutdown+0x19/0x50
      [  569.088667]  [<c13fda64>] device_shutdown+0x14/0x120
      [  569.093777]  [<c10ac29d>] kernel_restart_prepare+0x2d/0x30
      [  569.099429]  [<c10ac41e>] kernel_restart+0xe/0x60
      [  569.109028]  [<c10ac611>] SYSC_reboot+0x191/0x220
      [  569.159269]  [<c10ac6ba>] SyS_reboot+0x1a/0x20
      [  569.163843]  [<c161c718>] sysenter_do_call+0x12/0x16
      [  569.168951] ---[ end trace ccc1ec4471c289c9 ]---
      Tested-by: default avatarAaron Lu <aaron.lu@intel.com>
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      e5063845
    • James P Michels III's avatar
      usb-core bInterval quirk · c877de31
      James P Michels III authored
      commit cd83ce9e upstream.
      
      This patch adds a usb quirk to support devices with interupt endpoints
      and bInterval values expressed as microframes. The quirk causes the
      parse endpoint function to modify the reported bInterval to a standards
      conforming value.
      
      There is currently code in the endpoint parser that checks for
      bIntervals that are outside of the valid range (1-16 for USB 2+ high
      speed and super speed interupt endpoints). In this case, the code assumes
      the bInterval is being reported in 1ms frames. As well, the correction
      is only applied if the original bInterval value is out of the 1-16 range.
      
      With this quirk applied to the device, the bInterval will be
      accurately adjusted from microframes to an exponent.
      Signed-off-by: default avatarJames P Michels III <james.p.michels@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      c877de31
    • Joonyoung Shim's avatar
      USB: add reset resume quirk for usb3503 · 0003ed46
      Joonyoung Shim authored
      commit 526a4045 upstream.
      
      The usb device will autoresume from choose_wakeup() if it is
      autosuspended with the wrong wakeup setting, but below errors occur
      because usb3503 misc driver will switch to standby mode when suspended.
      
      As add USB_QUIRK_RESET_RESUME, it can stop setting wrong wakeup from
      autosuspend_check().
      
      [    7.734717] usb 1-3: reset high-speed USB device number 3 using exynos-ehci
      [    7.854658] usb 1-3: device descriptor read/64, error -71
      [    8.079657] usb 1-3: device descriptor read/64, error -71
      [    8.294664] usb 1-3: reset high-speed USB device number 3 using exynos-ehci
      [    8.414658] usb 1-3: device descriptor read/64, error -71
      [    8.639657] usb 1-3: device descriptor read/64, error -71
      [    8.854667] usb 1-3: reset high-speed USB device number 3 using exynos-ehci
      [    9.264598] usb 1-3: device not accepting address 3, error -71
      [    9.374655] usb 1-3: reset high-speed USB device number 3 using exynos-ehci
      [    9.784601] usb 1-3: device not accepting address 3, error -71
      [    9.784838] usb usb1-port3: device 1-3 not suspended yet
      Signed-off-by: default avatarJoonyoung Shim <jy0922.shim@samsung.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      0003ed46
    • Preston Fick's avatar
      USB: serial: cp210x: Removing unncessary `usb_reset_device` on startup · 664dc48e
      Preston Fick authored
      commit 934ef5ac upstream.
      
      This `usb_reset_device` command has been around since the driver was
      originally reverse engineered. It doesn't cause much issue on single
      interface CP210x devices, but on the CP2105 and CP2108 with 2 and 4
      interfaces respectively it will cause instability on enumeration and
      delays enumeration noticably. There should be no reason to reset a device
      at startup, per the CP210x AN571 spec.
      Signed-off-by: default avatarPreston Fick <preston.fick@silabs.com>
      Cc: Johan Hovold <johan@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      664dc48e
    • Daniel Mack's avatar
      usb: musb: cppi41: fire hrtimer according to programmed channel length · bd78518b
      Daniel Mack authored
      commit 50aea6fc upstream.
      
      The musb/cppi41 code installs a hrtimer to work around DMA completion
      interrupts that have fired too early on AM335x hardware. This timer
      is currently programmed to first fire 140 microseconds after the DMA
      completion callback. According to the commit which introduced it
      (a655f481, "usb: musb: musb_cppi41: handle pre-mature TX complete
      interrupt"), that value is is considered a 'rule of thumb' that worked
      well with the test case described in the commit log.
      
      Test show, however, that for USB audio devices and much smaller packet
      sizes, the timer has to fire earlier in order to correctly handle the audio
      stream. The original test case had output transfer sizes of 1514 bytes, and
      a delay of 140 microseconds. For audio devices with 24 bytes channel size, 3
      microseconds seem to work well.
      
      Hence, let's assume that the time it takes to clear the bit correlates with
      the number of bytes transferred. The referenced commit log mentions such a
      suspicion as well. Let the timer fire in cppi41_channel->total_len/10
      microseconds to correctly handle both cases.
      
      Also, shorten the interval in which the timer fires again in case of
      a non-empty early_tx list.
      
      With these changes in place, both FS and HS audio devices appear to work
      well on AM335x hardware.
      Signed-off-by: default avatarDaniel Mack <zonque@gmail.com>
      Reported-by: default avatarSebastian Reimers <sebastian.reimers@googlemail.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      bd78518b
    • Kent Overstreet's avatar
      bcache: Minor journal fix · b4839e6c
      Kent Overstreet authored
      commit b3fa7e77 upstream.
      
      The real fix is where we check the bytes we need against how much is
      remaining - we also need to check for a journal entry bigger than our
      buffer, we'll never write those and it would be bad if we tried to read
      one.
      
      Also improve the diagnostic messages.
      Signed-off-by: default avatarKent Overstreet <kmo@daterainc.com>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      b4839e6c
  3. 26 Aug, 2014 20 commits