[PATCH net-next v2 2/2] net: macb: Add support for partial store and forward
Andrew Lunn
andrew at lunn.ch
Thu May 11 08:49:10 PDT 2023
> + if (GEM_BFEXT(PBUF_CUTTHRU, gem_readl(bp, DCFG6))) {
> + if (bp->caps & MACB_CAPS_PARTIAL_STORE_FORWARD) {
> + retval = of_property_read_u16(bp->pdev->dev.of_node,
> + "rx-watermark",
> + &bp->rx_watermark);
> +
> + /* Disable partial store and forward in case of error or
> + * invalid watermark value
> + */
> + wtrmrk_rst_val = (1 << (GEM_BFEXT(RX_PBUF_ADDR, gem_readl(bp, DCFG2)))) - 1;
> + if (retval || bp->rx_watermark > wtrmrk_rst_val || !bp->rx_watermark) {
> + if (bp->rx_watermark > wtrmrk_rst_val) {
> + dev_info(&bp->pdev->dev, "Invalid watermark value\n");
> + bp->rx_watermark = 0;
Please return -EINVAL. We want the DT author to fix their error.
> + }
> + dev_info(&bp->pdev->dev, "Not enabling partial store and forward\n");
The DT property is optional? So when it is missing, retval will be
-EINVAL. Please don't spam the logs in this case.
Andrew
More information about the linux-riscv
mailing list