summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorLinmao Li <lilinmao@kylinos.cn>2026-09-01 12:15:17 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-09-23 14:44:45 +0200
commit27ca9a81485f179aac83d25fcc3234bc927fa17a (patch)
tree7957809cff8672991f943d8791311def2ce63c69 /tools/lib/python
parent4a86249c87ec07c0fa89671c39f7b3c1075394fc (diff)
serial: 8250_mxpcie: set the driver data before registering ports
mxpcie8250_rs485_config() looks the board up with dev_get_drvdata() on the PCI device, but pci_set_drvdata() only runs after the registration loop. Where mxpcie8250_setup_port() presets rs485.flags to SER_RS485_ENABLED and the flag survives uart_get_rs485_mode() - the device has no firmware node, or its node sets linux,rs485-enabled-at-boot-time - uart_configure_port() calls ->rs485_config() from inside serial8250_register_8250_port(), and the callback dereferences a NULL board pointer. Publish the driver data before the first port is registered. Fixes: d21a1509c623 ("serial: 8250_mxpcie: support serial interface mode switching") Signed-off-by: Linmao Li <lilinmao@kylinos.cn> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Crescent Hsieh <crescentcy.hsieh@moxa.com> Link: https://patch.msgid.link/20260901041519.114737-2-lilinmao@kylinos.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions