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

mtd: rawnand: stm32_fmc2: do not display errors if the driver is deferred

A MDMA issue has been solved on Kernel 5.7. The effect of this fix is
that the MDMA driver is now deferred and the FMC2 NFC driver is also
deferred. All is working fine but there is a FMC2 log in the console:
stm32_fmc2_nfc 58002000.nand-controller: failed to request tx DMA
channel: -517

This patch removes the display of this log in the console in case of
this error is -EPROBE_DEFER.

Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/1591975362-22009-2-git-send-email-christophe.kerello@st.com

authored by

Christophe Kerello and committed by
Miquel Raynal
5eeb7fe9 dcb7fd82

+3 -3
+3 -3
drivers/mtd/nand/raw/stm32_fmc2_nand.c
··· 1570 1570 nfc->dma_tx_ch = dma_request_chan(nfc->dev, "tx"); 1571 1571 if (IS_ERR(nfc->dma_tx_ch)) { 1572 1572 ret = PTR_ERR(nfc->dma_tx_ch); 1573 - if (ret != -ENODEV) 1573 + if (ret != -ENODEV && ret != -EPROBE_DEFER) 1574 1574 dev_err(nfc->dev, 1575 1575 "failed to request tx DMA channel: %d\n", ret); 1576 1576 nfc->dma_tx_ch = NULL; ··· 1580 1580 nfc->dma_rx_ch = dma_request_chan(nfc->dev, "rx"); 1581 1581 if (IS_ERR(nfc->dma_rx_ch)) { 1582 1582 ret = PTR_ERR(nfc->dma_rx_ch); 1583 - if (ret != -ENODEV) 1583 + if (ret != -ENODEV && ret != -EPROBE_DEFER) 1584 1584 dev_err(nfc->dev, 1585 1585 "failed to request rx DMA channel: %d\n", ret); 1586 1586 nfc->dma_rx_ch = NULL; ··· 1590 1590 nfc->dma_ecc_ch = dma_request_chan(nfc->dev, "ecc"); 1591 1591 if (IS_ERR(nfc->dma_ecc_ch)) { 1592 1592 ret = PTR_ERR(nfc->dma_ecc_ch); 1593 - if (ret != -ENODEV) 1593 + if (ret != -ENODEV && ret != -EPROBE_DEFER) 1594 1594 dev_err(nfc->dev, 1595 1595 "failed to request ecc DMA channel: %d\n", ret); 1596 1596 nfc->dma_ecc_ch = NULL;