17 Mar, 2014

1 commit

  • Merge "mvebu drivers for v3.15" from Jason Cooper:

    pull request #1:

    - mvebu mbus
    - use of_find_matching_node_and_match

    - rtc
    - use PTR_ERR_OR_ZERO in isl12057
    - work around issue in mv where date returned is 2038

    - kirkwood -> mach-mvebu
    - various Kconfig oneliners to allow building kirkwood in -mvebu/

    pull request #2:

    - reset
    - re-use qnap-poweroff driver for Synology NASs

    * tag 'mvebu-drivers-3.15-2' of git://git.infradead.org/linux-mvebu:
    Power: Reset: Generalize qnap-poweroff to work on Synology devices.
    drivers: Enable building of Kirkwood drivers for mach-mvebu
    rtc: mv: reset date if after year 2038
    rtc: isl12057: use PTR_ERR_OR_ZERO to fix coccinelle warnings
    bus: mvebu-mbus: make use of of_find_matching_node_and_match

    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     

04 Mar, 2014

1 commit

  • The Synology NAS devices use a very similar mechanism to QNAP NAS
    devices to power off. Both send a single charactor command to a PIC,
    over the second serial port. However the baud rate and the command
    differ. Generalize the driver to support this.

    Signed-off-by: Ben Peddell
    Signed-off-by: Andrew Lunn
    Acked-by: Jason Cooper
    Cc: Anton Vorontsov
    Cc: Dmitry Eremin-Solenikov
    Cc: David Woodhouse
    Signed-off-by: Jason Cooper

    Andrew Lunn
     

26 Feb, 2014

1 commit

  • …it/galak/linux-qcom into next/drivers

    Merge "qcom driver changes for v3.15" from Kumar Gala:

    We've split Qualcomm MSM support into legacy and multiplatform. These
    drivers are only relevant on the multiplatform supported SoCs so switch the
    Kconfig depends to ARCH_QCOM.

    * tag 'qcom-drivers-for-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/linux-qcom:
    gpio: msm: switch Kconfig to ARCH_QCOM depends
    hwrng: msm: switch Kconfig to ARCH_QCOM depends
    power: reset: msm - switch Kconfig to ARCH_QCOM depends
    drm/msm: drop ARCH_MSM Kconfig depend
    tty: serial: msm: Enable building msm_serial for ARCH_QCOM

    Arnd Bergmann
     

15 Feb, 2014

1 commit

  • Pull battery fixes from Dmitry Eremin-Solenikov:

    - Fix NULL pointer dereference in max17040 driver

    - Add bq2415x dts bindings documentation

    - Fix misleading comment in ds2782 driver

    - Remove useless check in isp1704 charger driver.

    * tag 'for-v3.14-fixes' of git://git.infradead.org/battery-2.6:
    power: max17040: Fix NULL pointer dereference when there is no platform_data
    dt: binding documentation for bq2415x charger
    isp1704_charger: remove useless check in isp1704_charger_probe()
    power: ds2782_battery: Typo in comment

    Linus Torvalds
     

13 Feb, 2014

1 commit


02 Feb, 2014

1 commit

  • Fix NULL pointer dereference of "chip->pdata" if platform_data was not
    supplied to the driver.

    The driver during probe stored the pointer to the platform_data:
    chip->pdata = client->dev.platform_data;
    Later it was dereferenced in max17040_get_online() and
    max17040_get_status().

    If platform_data was not supplied, the NULL pointer exception would
    happen:

    [ 6.626094] Unable to handle kernel of a at virtual address 00000000
    [ 6.628557] pgd = c0004000
    [ 6.632868] [00000000] *pgd=66262564
    [ 6.634636] Unable to handle kernel paging request at virtual address e6262000
    [ 6.642014] pgd = de468000
    [ 6.644700] [e6262000] *pgd=00000000
    [ 6.648265] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
    [ 6.653552] Modules linked in:
    [ 6.656598] CPU: 0 PID: 31 Comm: kworker/0:1 Not tainted 3.10.14-02717-gc58b4b4 #505
    [ 6.664334] Workqueue: events max17040_work
    [ 6.668488] task: dfa11b80 ti: df9f6000 task.ti: df9f6000
    [ 6.673873] PC is at show_pte+0x80/0xb8
    [ 6.677687] LR is at show_pte+0x3c/0xb8
    [ 6.681503] pc : [] lr : [] psr: 600f0113
    [ 6.681503] sp : df9f7d58 ip : 600f0113 fp : 00000009
    [ 6.692965] r10: 00000000 r9 : 00000000 r8 : dfa11b80
    [ 6.698171] r7 : df9f7ea0 r6 : e6262000 r5 : 00000000 r4 : 00000000
    [ 6.704680] r3 : 00000000 r2 : e6262000 r1 : 600f0193 r0 : c05b3750
    [ 6.711194] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
    [ 6.718485] Control: 10c53c7d Table: 5e46806a DAC: 00000015
    [ 6.724218] Process kworker/0:1 (pid: 31, stack limit = 0xdf9f6238)
    [ 6.730465] Stack: (0xdf9f7d58 to 0xdf9f8000)
    [ 6.914325] [] (show_pte+0x80/0xb8) from [] (__do_kernel_fault.part.9+0x44/0x74)
    [ 6.923425] [] (__do_kernel_fault.part.9+0x44/0x74) from [] (do_page_fault+0x2c4/0x360)
    [ 6.933144] [] (do_page_fault+0x2c4/0x360) from [] (do_DataAbort+0x34/0x9c)
    [ 6.941825] [] (do_DataAbort+0x34/0x9c) from [] (__dabt_svc+0x38/0x60)
    [ 6.950058] Exception stack(0xdf9f7ea0 to 0xdf9f7ee8)
    [ 6.955099] 7ea0: df0c1790 00000000 00000002 00000000 df0c1794 df0c1790 df0c1790 00000042
    [ 6.963271] 7ec0: df0c1794 00000001 00000000 00000009 00000000 df9f7ee8 c0306268 c0306270
    [ 6.971419] 7ee0: a00f0113 ffffffff
    [ 6.974902] [] (__dabt_svc+0x38/0x60) from [] (max17040_work+0x8c/0x144)
    [ 6.983317] [] (max17040_work+0x8c/0x144) from [] (process_one_work+0x138/0x440)
    [ 6.992429] [] (process_one_work+0x138/0x440) from [] (worker_thread+0x134/0x3b8)
    [ 7.001628] [] (worker_thread+0x134/0x3b8) from [] (kthread+0xa4/0xb0)
    [ 7.009875] [] (kthread+0xa4/0xb0) from [] (ret_from_fork+0x14/0x2c)
    [ 7.017943] Code: e1a03005 e2422480 e0826104 e59f002c (e7922104)
    [ 7.024017] ---[ end trace 73bc7006b9cc5c79 ]---

    Signed-off-by: Krzysztof Kozlowski
    Fixes: c6f4a42de60b981dd210de01cd3e575835e3158e
    Cc:

    Krzysztof Kozlowski
     

26 Jan, 2014

1 commit

  • Pull networking updates from David Miller:

    1) BPF debugger and asm tool by Daniel Borkmann.

    2) Speed up create/bind in AF_PACKET, also from Daniel Borkmann.

    3) Correct reciprocal_divide and update users, from Hannes Frederic
    Sowa and Daniel Borkmann.

    4) Currently we only have a "set" operation for the hw timestamp socket
    ioctl, add a "get" operation to match. From Ben Hutchings.

    5) Add better trace events for debugging driver datapath problems, also
    from Ben Hutchings.

    6) Implement auto corking in TCP, from Eric Dumazet. Basically, if we
    have a small send and a previous packet is already in the qdisc or
    device queue, defer until TX completion or we get more data.

    7) Allow userspace to manage ipv6 temporary addresses, from Jiri Pirko.

    8) Add a qdisc bypass option for AF_PACKET sockets, from Daniel
    Borkmann.

    9) Share IP header compression code between Bluetooth and IEEE802154
    layers, from Jukka Rissanen.

    10) Fix ipv6 router reachability probing, from Jiri Benc.

    11) Allow packets to be captured on macvtap devices, from Vlad Yasevich.

    12) Support tunneling in GRO layer, from Jerry Chu.

    13) Allow bonding to be configured fully using netlink, from Scott
    Feldman.

    14) Allow AF_PACKET users to obtain the VLAN TPID, just like they can
    already get the TCI. From Atzm Watanabe.

    15) New "Heavy Hitter" qdisc, from Terry Lam.

    16) Significantly improve the IPSEC support in pktgen, from Fan Du.

    17) Allow ipv4 tunnels to cache routes, just like sockets. From Tom
    Herbert.

    18) Add Proportional Integral Enhanced packet scheduler, from Vijay
    Subramanian.

    19) Allow openvswitch to mmap'd netlink, from Thomas Graf.

    20) Key TCP metrics blobs also by source address, not just destination
    address. From Christoph Paasch.

    21) Support 10G in generic phylib. From Andy Fleming.

    22) Try to short-circuit GRO flow compares using device provided RX
    hash, if provided. From Tom Herbert.

    The wireless and netfilter folks have been busy little bees too.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (2064 commits)
    net/cxgb4: Fix referencing freed adapter
    ipv6: reallocate addrconf router for ipv6 address when lo device up
    fib_frontend: fix possible NULL pointer dereference
    rtnetlink: remove IFLA_BOND_SLAVE definition
    rtnetlink: remove check for fill_slave_info in rtnl_have_link_slave_info
    qlcnic: update version to 5.3.55
    qlcnic: Enhance logic to calculate msix vectors.
    qlcnic: Refactor interrupt coalescing code for all adapters.
    qlcnic: Update poll controller code path
    qlcnic: Interrupt code cleanup
    qlcnic: Enhance Tx timeout debugging.
    qlcnic: Use bool for rx_mac_learn.
    bonding: fix u64 division
    rtnetlink: add missing IFLA_BOND_AD_INFO_UNSPEC
    sfc: Use the correct maximum TX DMA ring size for SFC9100
    Add Shradha Shah as the sfc driver maintainer.
    net/vxlan: Share RX skb de-marking and checksum checks with ovs
    tulip: cleanup by using ARRAY_SIZE()
    ip_tunnel: clear IPCB in ip_tunnel_xmit() in case dst_link_failure() is called
    net/cxgb4: Don't retrieve stats during recovery
    ...

    Linus Torvalds
     

25 Jan, 2014

2 commits


16 Jan, 2014

1 commit

  • On archs like S390 or um this driver cannot build nor work.
    Make it depend on HAS_IOMEM to bypass build failures.

    drivers/built-in.o: In function `goldfish_battery_probe':
    drivers/power/goldfish_battery.c:181: undefined reference to `devm_ioremap'

    Signed-off-by: Richard Weinberger
    Signed-off-by: David S. Miller

    Richard Weinberger
     

24 Dec, 2013

11 commits


02 Dec, 2013

3 commits

  • This patch adds a notifier chain to the power_supply, this helps drivers
    in other subsystem to listen to changes in power supply subsystem.

    This would help to take some actions in those drivers on changing the
    power supply properties. One such scenario is to increase/decrease system
    performance based on the battery capacity/voltage. Another scenario is to
    adjust the h/w peak current detection voltage/current thresholds based on
    battery voltage/capacity. The notifier helps drivers to listen to changes
    in power_suppy susbystem without polling the power_supply properties

    Signed-off-by: Jenny TC
    Signed-off-by: Pali Rohár
    Acked-by: Jenny TC
    Signed-off-by: Anton Vorontsov

    Pali Rohár
     
  • max17042 now uses regmap interface but does not enable config option. This
    patch fixes the following build errors:

    drivers/power/max17042_battery.c:661:15: error: variable ‘max17042_regmap_config’ has initializer but incomplete type
    drivers/power/max17042_battery.c:662:2: error: unknown field ‘reg_bits’ specified in initializer
    drivers/power/max17042_battery.c:662:2: warning: excess elements in struct initializer
    drivers/power/max17042_battery.c:662:2: warning: (near initialization for ‘max17042_regmap_config’)
    drivers/power/max17042_battery.c:663:2: error: unknown field ‘val_bits’ specified in initializer
    drivers/power/max17042_battery.c:663:2: warning: excess elements in struct initializer
    drivers/power/max17042_battery.c:663:2: warning: (near initialization for ‘max17042_regmap_config’)
    drivers/power/max17042_battery.c:664:2: error: unknown field ‘val_format_endian’ specified in initializer
    drivers/power/max17042_battery.c:664:23: error: ‘REGMAP_ENDIAN_NATIVE’ undeclared here (not in a function)
    drivers/power/max17042_battery.c:664:2: warning: excess elements in struct initializer
    drivers/power/max17042_battery.c:664:2: warning: (near initialization for ‘max17042_regmap_config’)
    drivers/power/max17042_battery.c: In function ‘max17042_probe’:
    drivers/power/max17042_battery.c:684:2: error: implicit declaration of function ‘devm_regmap_init_i2c’

    Signed-off-by: Austin Boyle
    Acked-by: Jonghwa Lee
    Signed-off-by: Anton Vorontsov

    Austin Boyle
     
  • power_supply_register() calls device_init_wakeup() to register a wakeup
    source before initializing dev_name. As a result, device_wakeup_enable()
    end up registering wakeup source with a null name when
    wakeup_source_register() gets called with dev_name(dev) which is null at
    the time.

    When kernel is booted with wakeup_source_activate enabled, it will panic
    when the trace point code tries to dereference ws->name.

    Fixed the problem by moving up the kobject_set_name() call prior to
    accesses to dev_name(). Replaced kobject_set_name() with dev_set_name()
    which is the right interface to be called from drivers. Fixed the call to
    device_del() prior to device_add() in for wakeup_init_failed error
    handling code.

    Trace after the change:

    bash-2143 [003] d... 132.280697: wakeup_source_activate: BAT1 state=0x20001
    kworker/3:2-1169 [003] d... 132.281305: wakeup_source_deactivate: BAT1 state=0x30000

    Oops message:

    [ 819.769934] device: 'BAT1': device_add
    [ 819.770078] PM: Adding info for No Bus:BAT1
    [ 819.770235] BUG: unable to handle kernel NULL pointer dereference at (null)
    [ 819.770435] IP: [] skip_spaces+0x30/0x30
    [ 819.770572] PGD 3efd90067 PUD 3eff61067 PMD 0
    [ 819.770716] Oops: 0000 [#1] SMP
    [ 819.770829] Modules linked in: arc4 iwldvm mac80211 x86_pkg_temp_thermal coretemp kvm_intel joydev i915 kvm uvcvideo ghash_clmulni_intel videobuf2_vmalloc aesni_intel videobuf2_memops videobuf2_core aes_x86_64 ablk_helper cryptd videodev iwlwifi lrw rfcomm gf128mul glue_helper bnep btusb media bluetooth parport_pc hid_generic ppdev snd_hda_codec_hdmi drm_kms_helper snd_hda_codec_realtek cfg80211 drm tpm_infineon samsung_laptop snd_hda_intel usbhid snd_hda_codec hid snd_hwdep snd_pcm microcode snd_page_alloc snd_timer psmouse i2c_algo_bit lpc_ich tpm_tis video wmi mac_hid serio_raw ext2 lp parport r8169 mii
    [ 819.771802] CPU: 0 PID: 2167 Comm: bash Not tainted 3.12.0+ #25
    [ 819.771876] Hardware name: SAMSUNG ELECTRONICS CO., LTD. 900X3C/900X3D/900X4C/900X4D/SAMSUNG_NP1234567890, BIOS P03AAC 07/12/2012
    [ 819.772022] task: ffff88002e6ddcc0 ti: ffff8804015ca000 task.ti: ffff8804015ca000
    [ 819.772119] RIP: 0010:[] [] skip_spaces+0x30/0x30
    [ 819.772242] RSP: 0018:ffff8804015cbc70 EFLAGS: 00010046
    [ 819.772310] RAX: 0000000000000003 RBX: ffff88040cfd6d40 RCX: 0000000000000018
    [ 819.772397] RDX: 0000000000020001 RSI: 0000000000000000 RDI: 0000000000000000
    [ 819.772484] RBP: ffff8804015cbcc0 R08: 0000000000000000 R09: ffff8803f0768d40
    [ 819.772570] R10: ffffea001033b800 R11: 0000000000000000 R12: ffffffff81c519c0
    [ 819.772656] R13: 0000000000020001 R14: 0000000000000000 R15: 0000000000020001
    [ 819.772744] FS: 00007ff98309b740(0000) GS:ffff88041f200000(0000) knlGS:0000000000000000
    [ 819.772845] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [ 819.772917] CR2: 0000000000000000 CR3: 00000003f59dc000 CR4: 00000000001407f0
    [ 819.773001] Stack:
    [ 819.773030] ffffffff81114003 ffff8804015cbcb0 0000000000000000 0000000000000046
    [ 819.773146] ffff880409757a18 ffff8803f065a160 0000000000000000 0000000000020001
    [ 819.773273] 0000000000000000 0000000000000000 ffff8804015cbce8 ffffffff8143e388
    [ 819.773387] Call Trace:
    [ 819.773434] [] ? ftrace_raw_event_wakeup_source+0x43/0xe0
    [ 819.773520] [] wakeup_source_report_event+0xb8/0xd0
    [ 819.773595] [] __pm_stay_awake+0x2d/0x50
    [ 819.773724] [] power_supply_changed+0x3c/0x90
    [ 819.773795] [] power_supply_register+0x18c/0x250
    [ 819.773869] [] sysfs_add_battery+0x61/0x7b
    [ 819.773935] [] battery_notify+0x37/0x3f
    [ 819.774001] [] notifier_call_chain+0x4c/0x70
    [ 819.774071] [] __blocking_notifier_call_chain+0x4d/0x70
    [ 819.774149] [] blocking_notifier_call_chain+0x16/0x20
    [ 819.774227] [] pm_notifier_call_chain+0x1a/0x40
    [ 819.774316] [] hibernate+0x66/0x1c0
    [ 819.774407] [] state_store+0x71/0xa0
    [ 819.774507] [] kobj_attr_store+0xf/0x20
    [ 819.774613] [] sysfs_write_file+0x128/0x1c0
    [ 819.774735] [] vfs_write+0xbd/0x1e0
    [ 819.774841] [] SyS_write+0x49/0xa0
    [ 819.774939] [] system_call_fastpath+0x16/0x1b
    [ 819.775055] Code: 89 f8 48 89 e5 f6 82 c0 a6 84 81 20 74 15 0f 1f 44 00 00 48 83 c0 01 0f b6 10 f6 82 c0 a6 84 81 20 75 f0 5d c3 66 0f 1f 44 00 00 3f 00 55 48 89 e5 74 15 48 89 f8 0f 1f 40 00 48 83 c0 01 80
    [ 819.775760] RIP [] skip_spaces+0x30/0x30
    [ 819.775881] RSP
    [ 819.775949] CR2: 0000000000000000
    [ 819.794175] ---[ end trace c4ef25127039952e ]---

    Signed-off-by: Shuah Khan
    Acked-by: Anton Vorontsov
    Acked-by: Greg Kroah-Hartman
    Cc: stable@vger.kernel.org
    Signed-off-by: Anton Vorontsov

    Shuah Khan
     

19 Nov, 2013

1 commit

  • Pull battery updates from Anton Vorontsov:
    "Highlights:
    - A new driver for TI BQ24735 Battery Chargers, courtesy of NVidia.
    - Device tree bindings for TWL4030 chips.
    - Random fixes and cleanups"

    * tag 'for-v3.13' of git://git.infradead.org/battery-2.6:
    pm2301-charger: Remove unneeded NULL checks
    twl4030_charger: Add devicetree support
    power_supply: Fix documentation for TEMP_*ALERT* properties
    max17042_battery: Support regmap to access device's registers
    max17042_battery: Use SIMPLE_DEV_PM_OPS
    charger-manager : Replace kzalloc to devm_kzalloc and remove uneccessary code
    bq2415x_charger: Fix max battery regulation voltage
    tps65090-charger: Use "IS_ENABLED(CONFIG_OF)" for DT code
    tps65090-charger: Drop devm_free_irq of devm_ allocated irq
    power_supply: Add support for bq24735 charger
    pm2301-charger: Staticize pm2xxx_charger_die_therm_mngt
    pm2301-charger: Check return value of regulator_enable
    ab8500-charger: Remove redundant break
    ab8500-charger: Check return value of regulator_enable
    isp1704_charger: Fix driver to work with changes introduced in v3.5

    Linus Torvalds
     

15 Nov, 2013

1 commit


13 Nov, 2013

2 commits


26 Oct, 2013

11 commits


23 Oct, 2013

1 commit