diff options
| author | Leon Romanovsky <[email protected]> | 2022-11-11 09:35:12 +0000 |
|---|---|---|
| committer | Leon Romanovsky <[email protected]> | 2022-11-11 09:35:12 +0000 |
| commit | 1ec5617432abc3efeec36c4e584a700f6c7e46f9 (patch) | |
| tree | fc5830462eb3afb740f9ed48052c1a46ff85f2c1 /drivers/hwmon/pwm-fan.c | |
| parent | RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_mmap.c (diff) | |
| parent | net: mana: Define data structures for protection domain and memory registration (diff) | |
| download | kernel-1ec5617432abc3efeec36c4e584a700f6c7e46f9.tar.gz kernel-1ec5617432abc3efeec36c4e584a700f6c7e46f9.zip | |
Merge branch 'mana-shared-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
Long Li says:
====================
Introduce Microsoft Azure Network Adapter (MANA) RDMA driver [netdev prep]
The first 11 patches which modify the MANA Ethernet driver to support
RDMA driver.
* 'mana-shared-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
net: mana: Define data structures for protection domain and memory registration
net: mana: Define data structures for allocating doorbell page from GDMA
net: mana: Define and process GDMA response code GDMA_STATUS_MORE_ENTRIES
net: mana: Define max values for SGL entries
net: mana: Move header files to a common location
net: mana: Record port number in netdev
net: mana: Export Work Queue functions for use by RDMA driver
net: mana: Set the DMA device max segment size
net: mana: Handle vport sharing between devices
net: mana: Record the physical address for doorbell page region
net: mana: Add support for auxiliary device
====================
Link: https://lore.kernel.org/all/[email protected]/
Signed-off-by: Leon Romanovsky <[email protected]>
Diffstat (limited to 'drivers/hwmon/pwm-fan.c')
| -rw-r--r-- | drivers/hwmon/pwm-fan.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c index dc3d9a22d917..83a347ca35da 100644 --- a/drivers/hwmon/pwm-fan.c +++ b/drivers/hwmon/pwm-fan.c @@ -257,7 +257,10 @@ static int pwm_fan_update_enable(struct pwm_fan_ctx *ctx, long val) if (val == 0) { /* Disable pwm-fan unconditionally */ - ret = __set_pwm(ctx, 0); + if (ctx->enabled) + ret = __set_pwm(ctx, 0); + else + ret = pwm_fan_switch_power(ctx, false); if (ret) ctx->enable_mode = old_val; pwm_fan_update_state(ctx, 0); |
