[PATCH] spi: Fix use-after-free with devm_spi_alloc_*

2021-04-07 Thread William A. Kennington III
) Instead, determine the devm allocation state as a flag on the controller which is guaranteed to be stable during cleanup. Fixes: 5e844cc37a5c ("spi: Introduce device-managed SPI controller allocation") Signed-off-by: William A. Kennington III --- drivers/spi/spi.c | 9 ++--- include

[PATCH 1/4] ipmi: kcs_bmc: Simplify irq handling

2021-02-16 Thread William A. Kennington III
Platforms specific IRQ handles repeat the same logic, calling a sub-handler in the kcs_bmc generic code that should just conform to the irqhandler callback. Signed-off-by: William A. Kennington III --- drivers/char/ipmi/kcs_bmc.c | 10 +- drivers/char/ipmi/kcs_bmc.h | 3

[PATCH 2/4] ipmi: kcs_bmc: Remove register abstraction

2021-02-16 Thread William A. Kennington III
The generic kcs_bmc code doesn't care about how byte reads / writes are implemented. This pushes that logic to the device specific handlers, so that kcs_bmc doesn't need to understand registers and how to read or write them. Signed-off-by: William A. Kennington III --- drivers/char/ipmi

[PATCH 3/4] ipmi: kcs_bmc: Invert allocation

2021-02-16 Thread William A. Kennington III
This is a more typical pattern for having the platform specific drivers store their own data around the generic driver data. Signed-off-by: William A. Kennington III --- drivers/char/ipmi/kcs_bmc.c | 40 +++--- drivers/char/ipmi/kcs_bmc.h | 13 +- drivers/char/ipmi

[PATCH 3/4] ipmi: kcs_bmc: Invert allocation pattern

2021-02-16 Thread William A. Kennington III
The generic kcs_bmc code shouldn't need to store data on behalf of the platform specific driver that initializes it. Instead, have the platform specific driver allocate memory and call a generic initialization routine. Signed-off-by: William A. Kennington III --- drivers/char/ipmi/kcs_bmc.c

[PATCH 4/4] ipmi: kcs_bmc: Simplify state machine

2021-02-16 Thread William A. Kennington III
, like the second abort state, that effectively duplicate others. - Cleans up the initialization and register setting logic to include bits that were missed previously. Signed-off-by: William A. Kennington III --- drivers/char/ipmi/kcs_bmc.c | 301

[PATCH] net: ftgmac100: Support phyless operation

2021-02-17 Thread William A. Kennington III
We have BMC to BMC connections that lack a PHY in between but don't want to use the NC-SI state machinery of the kernel. Instead, allow for an option to disable the phy detection and mdio logic. Signed-off-by: William A. Kennington III --- .../devicetree/bindings/net/ftgmac100.txt | 2