Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

serial: 8250_lpss: Configure DMA also w/o DMA filter

If the platform doesn't use DMA device filter (as is the case with
Elkhart Lake), whole lpss8250_dma_setup() setup is skipped. This
results in skipping also *_maxburst setup which is undesirable.
Refactor lpss8250_dma_setup() to configure DMA even if filter is not
setup.

Cc: stable <stable@kernel.org>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221108121952.5497-3-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ilpo Järvinen and committed by
Greg Kroah-Hartman
1bfcbe58 a931237c

+11 -4
+11 -4
drivers/tty/serial/8250/8250_lpss.c
··· 277 277 struct dw_dma_slave *rx_param, *tx_param; 278 278 struct device *dev = port->port.dev; 279 279 280 - if (!lpss->dma_param.dma_dev) 280 + if (!lpss->dma_param.dma_dev) { 281 + dma = port->dma; 282 + if (dma) 283 + goto out_configuration_only; 284 + 281 285 return 0; 286 + } 282 287 283 288 rx_param = devm_kzalloc(dev, sizeof(*rx_param), GFP_KERNEL); 284 289 if (!rx_param) ··· 294 289 return -ENOMEM; 295 290 296 291 *rx_param = lpss->dma_param; 297 - dma->rxconf.src_maxburst = lpss->dma_maxburst; 298 - 299 292 *tx_param = lpss->dma_param; 300 - dma->txconf.dst_maxburst = lpss->dma_maxburst; 301 293 302 294 dma->fn = lpss8250_dma_filter; 303 295 dma->rx_param = rx_param; 304 296 dma->tx_param = tx_param; 305 297 306 298 port->dma = dma; 299 + 300 + out_configuration_only: 301 + dma->rxconf.src_maxburst = lpss->dma_maxburst; 302 + dma->txconf.dst_maxburst = lpss->dma_maxburst; 303 + 307 304 return 0; 308 305 } 309 306