1
0
Fork 0
alistair23-linux/drivers/net/ethernet/faraday
Joel Stanley 6cee9d649c ftgmac100: return error in ftgmac100_alloc_rx_buf
The error paths set err, but it's not returned.

I wondered if we should fix all of the callers to check the returned
value, but Ben explains why the code is this way:

> Most call sites ignore it on purpose. There's nothing we can do if
> we fail to get a buffer at interrupt time, so we point the buffer to
> the scratch page so the HW doesn't DMA into lalaland and lose the
> packet.
>
> The one call site that tests and can fail is the one used when brining
> the interface up. If we fail to allocate at that point, we fail the
> ifup. But as you noticed, I do have a bug not returning the error.

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-25 21:21:44 -07:00
..
Kconfig drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
Makefile
ftgmac100.c ftgmac100: return error in ftgmac100_alloc_rx_buf 2017-07-25 21:21:44 -07:00
ftgmac100.h ftgmac100: Add pause frames configuration and support 2017-04-18 14:11:08 -04:00
ftmac100.c net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
ftmac100.h