13 Dec, 2020

1 commit

  • Pull input fixes from Dmitry Torokhov:

    - a fix for cm109 stomping on its own control URB if it tries to toggle
    buzzer immediately after userspace opens input device (found by
    syzcaller)

    - another fix for Raydium touchscreens that do not like splitting
    command transfers

    - quirks for i8042, soc_button_array, and goodix drivers to make them
    work better with certain hardware.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: goodix - add upside-down quirk for Teclast X98 Pro tablet
    Input: cm109 - do not stomp on control URB
    Input: i8042 - add Acer laptops to the i8042 reset list
    Input: cros_ec_keyb - send 'scancodes' in addition to key events
    Input: soc_button_array - add Lenovo Yoga Tablet2 1051L to the dmi_use_low_level_irq list
    Input: raydium_ts_i2c - do not split tx transactions

    Linus Torvalds
     

12 Dec, 2020

2 commits


10 Dec, 2020

2 commits

  • The touchpad operates in Basic Mode by default in the Acer BIOS
    setup, but some Aspire/TravelMate models require the i8042 to be
    reset in order to be correctly detected.

    Signed-off-by: Chris Chiu
    Link: https://lore.kernel.org/r/20201207071250.15021-1-chiu@endlessos.org
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov

    Chris Chiu
     
  • To let userspace know what 'scancodes' should be used in EVIOCGKEYCODE
    and EVIOCSKEYCODE ioctls, we should send EV_MSC/MSC_SCAN events in
    addition to EV_KEY/KEY_* events. The driver already declared MSC_SCAN
    capability, so it is only matter of actually sending the events.

    Link: https://lore.kernel.org/r/X87aOaSptPTvZ3nZ@google.com
    Acked-by: Rajat Jain
    Signed-off-by: Dmitry Torokhov

    Dmitry Torokhov
     

07 Dec, 2020

2 commits

  • Add the Lenovo Yoga Tablet2 1051L to the list of devices where the
    ACPI AML code is poking the GPIO config register directly changing
    the IRQ type to a low_level_irq, which we need to work around.

    This fixes the home button on the Lenovo Yoga Tablet2 1051L not
    working.

    Signed-off-by: Hans de Goede
    Link: https://lore.kernel.org/r/20201206161245.24798-1-hdegoede@redhat.com
    Signed-off-by: Dmitry Torokhov

    Hans de Goede
     
  • Raydium device does not like splitting of tx transactions into multiple
    messages - one for the register address and one for the actual data. This
    results in incorrect behavior on the device side.

    This change updates raydium_i2c_read and raydium_i2c_write to create
    i2c_msg arrays separately and passes those arrays into raydium_i2c_xfer
    which decides based on the address whether the bank switch command should
    be sent. The bank switch header is still added by raydium_i2c_read and
    raydium_i2c_write to ensure that all these operations are performed as part
    of a single I2C transfer. It guarantees that no other transactions are
    initiated to any other device on the same bus after the bank switch command
    is sent.

    Signed-off-by: Furquan Shaikh
    Link: https://lore.kernel.org/r/20201205005941.1427643-1-furquan@google.com
    Signed-off-by: Dmitry Torokhov

    Furquan Shaikh
     

06 Dec, 2020

1 commit

  • Pull input fixes from Dmitry Torokhov:
    "A fix for 'RETRIGEN' handling in Atmel touch controllers that was
    causing lost interrupts on systems using edge-triggered interrupts, a
    quirk for i8042 driver, and a couple more fixes."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: atmel_mxt_ts - fix lost interrupts
    Input: xpad - support Ardwiino Controllers
    Input: i8042 - add ByteSpeed touchpad to noloop table
    Input: i8042 - fix error return code in i8042_setup_aux()
    Input: soc_button_array - add missing include

    Linus Torvalds
     

02 Dec, 2020

1 commit

  • After commit 74d905d2d38a devices requiring the workaround for edge
    triggered interrupts stopped working.

    The hardware needs the quirk to be used before even proceeding to
    check if the quirk is needed because mxt_acquire_irq() is called
    before mxt_check_retrigen() is called and at this point pending IRQs
    need to be checked, and if the workaround is not active, all
    interrupts will be lost from this point.

    Solve this by switching the calls around.

    Reported-by: Andre Müller
    Tested-by: Andre Müller
    Suggested-by: Dmitry Torokhov
    Fixes: 74d905d2d38a ("Input: atmel_mxt_ts - only read messages in mxt_acquire_irq() when necessary")
    Signed-off-by: Linus Walleij
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20201201123026.1416743-1-linus.walleij@linaro.org
    Signed-off-by: Dmitry Torokhov

    Linus Walleij
     

01 Dec, 2020

2 commits

  • This commit adds support for Ardwiino Controllers

    Signed-off-by: Sanjay Govind
    Link: https://lore.kernel.org/r/20201201071922.131666-1-sanjay.govind9@gmail.com
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov

    Sanjay Govind
     
  • It looks like the C15B laptop got another vendor: ByteSpeed LLC.

    Avoid AUX loopback on this touchpad as well, thus input subsystem will
    be able to recognize a Synaptics touchpad in the AUX port.

    BugLink: https://bugs.launchpad.net/bugs/1906128
    Signed-off-by: Po-Hsu Lin
    Link: https://lore.kernel.org/r/20201201054723.5939-1-po-hsu.lin@canonical.com
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov

    Po-Hsu Lin
     

25 Nov, 2020

2 commits

  • Fix to return a negative error code from the error handling case
    instead of 0 in function i8042_setup_aux(), as done elsewhere in this
    function.

    Fixes: f81134163fc7 ("Input: i8042 - use platform_driver_probe")
    Reported-by: Hulk Robot
    Signed-off-by: Luo Meng
    Reviewed-by: Hans de Goede
    Link: https://lore.kernel.org/r/20201123133420.4071187-1-luomeng12@huawei.com
    Signed-off-by: Dmitry Torokhov

    Luo Meng
     
  • This fixes the following build errors:

    CC [M] drivers/input/misc/soc_button_array.o
    drivers/input/misc/soc_button_array.c:156:4: error: implicit declaration of function 'irq_set_irq_type' [-Werror,-Wimplicit-function-declaration]
    irq_set_irq_type(irq, IRQ_TYPE_LEVEL_LOW);
    ^
    drivers/input/misc/soc_button_array.c:156:26: error: use of undeclared identifier 'IRQ_TYPE_LEVEL_LOW'
    irq_set_irq_type(irq, IRQ_TYPE_LEVEL_LOW);
    ^
    2 errors generated.

    Fixes: 78a5b53e9fb4 ("Input: soc_button_array - work around DSDTs which modify the irqflags")
    Reported-by: kernel test robot
    Reviewed-by: Hans de Goede
    Link: https://lore.kernel.org/r/20201123061508.GA1009828@dtor-ws
    Signed-off-by: Dmitry Torokhov

    Dmitry Torokhov
     

18 Nov, 2020

1 commit

  • Pull input fixes from Dmitry Torokhov:
    "A fix for use-after-free in the Sun keyboard driver, a fix to firmware
    updates on newer ICs in the Elan touchpad diver, and a couple misc
    driver fixes"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: elan_i2c - fix firmware update on newer ICs
    Input: resistive-adc-touch - fix kconfig dependency on IIO_BUFFER
    Input: sunkbd - avoid use-after-free in teardown paths
    Input: i8042 - allow insmod to succeed on devices without an i8042 controller
    Input: adxl34x - clean up a data type in adxl34x_probe()

    Linus Torvalds
     

12 Nov, 2020

2 commits

  • The argument to iap page type command depends on the firmware page size.

    Fixes: bfd9b92bc8f9 ("Input: elan_i2c - handle firmware updated on newer ICs")
    Signed-off-by: Jingle Wu
    Signed-off-by: Dmitry Torokhov

    jingle.wu
     
  • When TOUCHSCREEN_ADC is enabled and IIO_BUFFER is disabled, it results
    in the following Kbuild warning:

    WARNING: unmet direct dependencies detected for IIO_BUFFER_CB
    Depends on [n]: IIO [=y] && IIO_BUFFER [=n]
    Selected by [y]:
    - TOUCHSCREEN_ADC [=y] && !UML && INPUT [=y] && INPUT_TOUCHSCREEN [=y] && IIO [=y]

    The reason is that TOUCHSCREEN_ADC selects IIO_BUFFER_CB without depending
    on or selecting IIO_BUFFER while IIO_BUFFER_CB depends on IIO_BUFFER. This
    can also fail building the kernel.

    Honor the kconfig dependency to remove unmet direct dependency warnings
    and avoid any potential build failures.

    Fixes: aa132ffb6b0a ("input: touchscreen: resistive-adc-touch: add generic resistive ADC touchscreen")
    Signed-off-by: Necip Fazil Yildiran
    Acked-by: Jonathan Cameron
    Link: https://lore.kernel.org/r/20201102221504.541279-1-fazilyildiran@gmail.com
    Signed-off-by: Dmitry Torokhov

    Necip Fazil Yildiran
     

09 Nov, 2020

1 commit


27 Oct, 2020

2 commits

  • The i8042 module exports several symbols which may be used by other
    modules.

    Before this commit it would refuse to load (when built as a module itself)
    on systems without an i8042 controller.

    This is a problem specifically for the asus-nb-wmi module. Many Asus
    laptops support the Asus WMI interface. Some of them have an i8042
    controller and need to use i8042_install_filter() to filter some kbd
    events. Other models do not have an i8042 controller (e.g. they use an
    USB attached kbd).

    Before this commit the asus-nb-wmi driver could not be loaded on Asus
    models without an i8042 controller, when the i8042 code was built as
    a module (as Arch Linux does) because the module_init function of the
    i8042 module would fail with -ENODEV and thus the i8042_install_filter
    symbol could not be loaded.

    This commit fixes this by exiting from module_init with a return code
    of 0 if no controller is found. It also adds a i8042_present bool to
    make the module_exit function a no-op in this case and also adds a
    check for i8042_present to the exported i8042_command function.

    The latter i8042_present check should not really be necessary because
    when builtin that function can already be used on systems without
    an i8042 controller, but better safe then sorry.

    Reported-and-tested-by: Marius Iacob
    Signed-off-by: Hans de Goede
    Link: https://lore.kernel.org/r/20201008112628.3979-2-hdegoede@redhat.com
    Signed-off-by: Dmitry Torokhov

    Hans de Goede
     
  • The "revid" is used to store negative error codes so it should be an int
    type.

    Fixes: e27c729219ad ("Input: add driver for ADXL345/346 Digital Accelerometers")
    Signed-off-by: Dan Carpenter
    Acked-by: Michael Hennerich
    Link: https://lore.kernel.org/r/20201026072824.GA1620546@mwanda
    Signed-off-by: Dmitry Torokhov

    Dan Carpenter
     

26 Oct, 2020

1 commit

  • Pull more parisc updates from Helge Deller:

    - During this merge window O_NONBLOCK was changed to become 000200000,
    but we missed that the syscalls timerfd_create(), signalfd4(),
    eventfd2(), pipe2(), inotify_init1() and userfaultfd() do a strict
    bit-wise check of the flags parameter.

    To provide backward compatibility with existing userspace we
    introduce parisc specific wrappers for those syscalls which filter
    out the old O_NONBLOCK value and replaces it with the new one.

    - Prevent HIL bus driver to get stuck when keyboard or mouse isn't
    attached

    - Improve error return codes when setting rtc time

    - Minor documentation fix in pata_ns87415.c

    * 'parisc-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    ata: pata_ns87415.c: Document support on parisc with superio chip
    parisc: Add wrapper syscalls to fix O_NONBLOCK flag usage
    hil/parisc: Disable HIL driver when it gets stuck
    parisc: Improve error return codes when setting rtc time

    Linus Torvalds
     

25 Oct, 2020

1 commit

  • Pull ARM SoC platform updates from Olof Johansson:
    "SoC changes, a substantial part of this is cleanup of some of the
    older platforms that used to have a bunch of board files.

    In particular:

    - Remove non-DT i.MX platforms that haven't seen activity in years,
    it's time to remove them.

    - A bunch of cleanup and removal of platform data for TI/OMAP
    platforms, moving over to genpd for power/reset control (yay!)

    - Major cleanup of Samsung S3C24xx and S3C64xx platforms, moving them
    closer to multiplatform support (not quite there yet, but getting
    close).

    There are a few other changes too, smaller fixlets, etc. For new
    platform support, the primary ones are:

    - New SoC: Hisilicon SD5203, ARM926EJ-S platform.

    - Cpufreq support for i.MX7ULP"

    * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (121 commits)
    ARM: mstar: Select MStar intc
    ARM: stm32: Replace HTTP links with HTTPS ones
    ARM: debug: add UART early console support for SD5203
    ARM: hisi: add support for SD5203 SoC
    ARM: omap3: enable off mode automatically
    clk: imx: imx35: Remove mx35_clocks_init()
    clk: imx: imx31: Remove mx31_clocks_init()
    clk: imx: imx27: Remove mx27_clocks_init()
    ARM: imx: Remove unused definitions
    ARM: imx35: Retrieve the IIM base address from devicetree
    ARM: imx3: Retrieve the AVIC base address from devicetree
    ARM: imx3: Retrieve the CCM base address from devicetree
    ARM: imx31: Retrieve the IIM base address from devicetree
    ARM: imx27: Retrieve the CCM base address from devicetree
    ARM: imx27: Retrieve the SYSCTRL base address from devicetree
    ARM: s3c64xx: bring back notes from removed debug-macro.S
    ARM: s3c24xx: fix Wunused-variable warning on !MMU
    ARM: samsung: fix PM debug build with DEBUG_LL but !MMU
    MAINTAINERS: mark linux-samsung-soc list non-moderated
    ARM: imx: Remove remnant board file support pieces
    ...

    Linus Torvalds
     

24 Oct, 2020

2 commits

  • Pull input updates from Dmitry Torokhov:

    - a new driver for ADC driven joysticks

    - a new Zintix touchscreen driver

    - enhancements to Intel SoC button array driver

    - support for F3A "function" in Synaptics RMI4 driver

    - assorted driver fixups

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (29 commits)
    Input: Add MAINTAINERS entry for SiS i2c touch input driver
    Input: evdev - per-client waitgroups
    Input: synaptics - enable InterTouch for ThinkPad T14 Gen 1
    Input: synaptics - enable InterTouch for ThinkPad P1/X1E gen 2
    Input: synaptics-rmi4 - support bootloader v8 in f34v7
    Input: synaptics-rmi4 - add support for F3A
    Input: synaptics-rmi4 - rename f30_data to gpio_data
    Input: add zinitix touchscreen driver
    dt-bindings: input/touchscreen: add bindings for zinitix
    Input: joystick - add ADC attached joystick driver.
    dt-bindings: input: Add docs for ADC driven joystick
    Input: sun4i-ps2 - fix handling of platform_get_irq() error
    Input: twl4030_keypad - fix handling of platform_get_irq() error
    Input: omap4-keypad - fix handling of platform_get_irq() error
    Input: ep93xx_keypad - fix handling of platform_get_irq() error
    Input: stmfts - fix a & vs && typo
    Input: imx6ul_tsc - unify open/close and PM paths
    Input: imx6ul_tsc - clean up some errors in imx6ul_tsc_resume()
    Input: elants_i2c - fix typo for an attribute to show calibration count
    Input: elants_i2c - report resolution of ABS_MT_TOUCH_MAJOR by FW information.
    ...

    Linus Torvalds
     
  • …kernel/git/chrome-platform/linux

    Pull chrome platform updates from Benson Leung:
    "cros-ec:
    - Error code cleanup across cros-ec by Guenter
    - Remove cros_ec_cmd_xfer in favor of cros_ec_cmd_xfer_status

    cros_ec_typec:
    - Landed initial USB4 support in typec connector class driver for
    cros_ec
    - Role switch bugfix on disconnect, and reordering configuration
    steps

    cros_ec_lightbar:
    - Fix buffer outsize and result for get_lightbar_version

    misc:
    - Remove config MFD_CROS_EC, now that transition from MFD is complete
    - Enable KEY_LEFTMETA in new location on arm based cros-ec-keyboard
    keymap"

    * tag 'tag-chrome-platform-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux:
    ARM: dts: cros-ec-keyboard: Add alternate keymap for KEY_LEFTMETA
    platform/chrome: Use kobj_to_dev() instead of container_of()
    platform/chrome: cros_ec_proto: Drop cros_ec_cmd_xfer()
    platform/chrome: cros_ec_proto: Update cros_ec_cmd_xfer() call-sites
    platform/chrome: Kconfig: Remove the transitional MFD_CROS_EC config
    platform/chrome: cros_ec_lightbar: Reduce ligthbar get version command
    platform/chrome: cros_ec_trace: Add fields to command traces
    platform/chrome: cros_ec_typec: Re-order connector configuration steps
    platform/chrome: cros_ec_typec: Avoid setting usb role twice during disconnect
    platform/chrome: cros_ec_typec: Send enum values to usb_role_switch_set_role()
    platform/chrome: cros_ec_typec: USB4 support
    pwm: cros-ec: Simplify EC error handling
    platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes
    platform/input: cros_ec: Replace -ENOTSUPP with -ENOPROTOOPT
    pwm: cros-ec: Accept more error codes from cros_ec_cmd_xfer_status
    platform/chrome: cros_ec_sysfs: Report range of error codes from EC
    cros_ec_lightbar: Accept more error codes from cros_ec_cmd_xfer_status
    iio: cros_ec: Accept -EOPNOTSUPP as 'not supported' error code

    Linus Torvalds
     

23 Oct, 2020

1 commit

  • When starting a HP machine with HIL driver but without an HIL keyboard
    or HIL mouse attached, it may happen that data written to the HIL loop
    gets stuck (e.g. because the transaction queue is full). Usually one
    will then have to reboot the machine because all you see is and endless
    output of:
    Transaction add failed: transaction already queued?

    In the higher layers hp_sdc_enqueue_transaction() is called to queued up
    a HIL packet. This function returns an error code, and this patch adds
    the necessary checks for this return code and disables the HIL driver if
    further packets can't be sent.

    Tested on a HP 730 and a HP 715/64 machine.

    Signed-off-by: Helge Deller
    Cc:

    Helge Deller
     

19 Oct, 2020

1 commit


15 Oct, 2020

1 commit

  • Pull Hyper-V updates from Wei Liu:

    - a series from Boqun Feng to support page size larger than 4K

    - a few miscellaneous clean-ups

    * tag 'hyperv-next-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux:
    hv: clocksource: Add notrace attribute to read_hv_sched_clock_*() functions
    x86/hyperv: Remove aliases with X64 in their name
    PCI: hv: Document missing hv_pci_protocol_negotiation() parameter
    scsi: storvsc: Support PAGE_SIZE larger than 4K
    Driver: hv: util: Use VMBUS_RING_SIZE() for ringbuffer sizes
    HID: hyperv: Use VMBUS_RING_SIZE() for ringbuffer sizes
    Input: hyperv-keyboard: Use VMBUS_RING_SIZE() for ringbuffer sizes
    hv_netvsc: Use HV_HYP_PAGE_SIZE for Hyper-V communication
    hv: hyperv.h: Introduce some hvpfn helper functions
    Drivers: hv: vmbus: Move virt_to_hvpfn() to hyperv header
    Drivers: hv: Use HV_HYP_PAGE in hv_synic_enable_regs()
    Drivers: hv: vmbus: Introduce types of GPADL
    Drivers: hv: vmbus: Move __vmbus_open()
    Drivers: hv: vmbus: Always use HV_HYP_PAGE_SIZE for gpadl
    drivers: hv: remove cast from hyperv_die_event

    Linus Torvalds
     

07 Oct, 2020

1 commit

  • All evdev clients share a common waitgroup. On new input events, all
    clients waiting on this waitgroup are woken up, even those filtering out
    the events, possibly more than once per event. This leads to duplicated
    and unwanted wakeups.

    Split the shared waitgroup into per-client waitgroups for more
    fine-grained wakeups.

    Signed-off-by: Kenny Levinsen
    Link: https://lore.kernel.org/r/20200429184126.2155-1-kl@kl.wtf
    Signed-off-by: Dmitry Torokhov

    Kenny Levinsen
     

06 Oct, 2020

1 commit


05 Oct, 2020

5 commits

  • With the new RMI4 F3A support, we're now able to enable full RMI4
    support for this model. We also tidy up the comments a bit, as the X1E
    is essentially the same computer as the P1.

    Acked-by: Lyude Paul
    Signed-off-by: Jason A. Donenfeld
    Link: https://lore.kernel.org/r/20200930225046.173190-3-Jason@zx2c4.com
    Signed-off-by: Dmitry Torokhov

    Jason A. Donenfeld
     
  • With the recent addition of the F3A support, we can now accept
    bootloader v8, which will help support recent Thinkpads.

    Acked-by: Lyude Paul
    Signed-off-by: Jason A. Donenfeld
    Link: https://lore.kernel.org/r/20200930225046.173190-2-Jason@zx2c4.com
    Signed-off-by: Dmitry Torokhov

    Jason A. Donenfeld
     
  • RMI4 F3A supports the touchpad GPIO function, it's designed to
    support more GPIOs and used on newer touchpads. This patch adds
    support of the touchpad buttons.

    Signed-off-by: Vincent Huang
    Reviewed-by: Hans de Goede
    Tested-by: Hans de Goede
    Reviewed-by: Andrew Duggan
    Link: https://lore.kernel.org/r/20200930094147.635556-3-vincent.huang@tw.synaptics.com
    Signed-off-by: Dmitry Torokhov

    Vincent Huang
     
  • f30_data in rmi_device_platform_data could be also referenced by RMI
    function 3A, so rename it and the structure name to avoid confusion.

    Signed-off-by: Vincent Huang
    Reviewed-by: Hans de Goede
    Tested-by: Hans de Goede
    Reviewed-by: Andrew Duggan
    Link: https://lore.kernel.org/r/20200930094147.635556-2-vincent.huang@tw.synaptics.com
    Signed-off-by: Dmitry Torokhov

    Vincent Huang
     
  • Add support for the bt541 touchscreen IC from zinitix, loosely based on
    downstream driver. The driver currently supports multitouch (5 touch points).
    The bt541 seems to support touch keys, but the support was not added because
    that functionality is not being utilized by the touchscreen used for testing.
    Based on the similartities between downstream drivers, it seems likely that
    other similar touchscreen ICs can be supported with this driver in the future.

    Signed-off-by: Michael Srba
    Link: https://lore.kernel.org/r/20201001122949.16846-1-michael.srba@seznam.cz
    Signed-off-by: Dmitry Torokhov

    Michael Srba
     

04 Oct, 2020

1 commit


29 Sep, 2020

3 commits

  • Add a driver for joystick devices connected to ADC controllers
    supporting the Industrial I/O subsystem.

    Signed-off-by: Artur Rojek
    Tested-by: Paul Cercueil
    Tested-by: Heiko Stuebner
    Link: https://lore.kernel.org/r/20200927123302.31062-2-contact@artur-rojek.eu
    Signed-off-by: Dmitry Torokhov

    Artur Rojek
     
  • Touchpad on this laptop is not detected properly during boot, as PNP
    enumerates (wrongly) AUX port as disabled on this machine.

    Fix that by adding this board (with admittedly quite funny DMI
    identifiers) to nopnp quirk list.

    Reported-by: Andrés Barrantes Silman
    Signed-off-by: Jiri Kosina
    Link: https://lore.kernel.org/r/nycvar.YFH.7.76.2009252337340.3336@cbobk.fhfr.pm
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov

    Jiri Kosina
     
  • Add Synaptics IDs in trackpoint_start_protocol() to mark them as valid.

    Signed-off-by: Vincent Huang
    Fixes: 6c77545af100 ("Input: trackpoint - add new trackpoint variant IDs")
    Reviewed-by: Harry Cutts
    Tested-by: Harry Cutts
    Link: https://lore.kernel.org/r/20200924053013.1056953-1-vincent.huang@tw.synaptics.com
    Signed-off-by: Dmitry Torokhov

    Vincent Huang
     

28 Sep, 2020

1 commit

  • For a Hyper-V vmbus, the size of the ringbuffer has two requirements:

    1) it has to take one PAGE_SIZE for the header

    2) it has to be PAGE_SIZE aligned so that double-mapping can work

    VMBUS_RING_SIZE() could calculate a correct ringbuffer size which
    fulfills both requirements, therefore use it to make sure vmbus work
    when PAGE_SIZE != HV_HYP_PAGE_SIZE (4K).

    Note that since the argument for VMBUS_RING_SIZE() is the size of
    payload (data part), so it will be minus 4k (the size of header when
    PAGE_SIZE = 4k) than the original value to keep the ringbuffer total
    size unchanged when PAGE_SIZE = 4k.

    Signed-off-by: Boqun Feng
    Cc: Michael Kelley
    Cc: Dmitry Torokhov
    Acked-by: Dmitry Torokhov
    Reviewed-by: Michael Kelley
    Link: https://lore.kernel.org/r/20200916034817.30282-9-boqun.feng@gmail.com
    Signed-off-by: Wei Liu

    Boqun Feng
     

21 Sep, 2020

1 commit


17 Sep, 2020

1 commit