1. 03 Sep, 2014 33 commits
  2. 02 Sep, 2014 7 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