]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: Distinguish queue lookup from test for queue existence
authorBen Hutchings <bhutchings@solarflare.com>
Mon, 7 Feb 2011 23:04:38 +0000 (23:04 +0000)
committerBen Hutchings <bhutchings@solarflare.com>
Tue, 15 Feb 2011 19:45:34 +0000 (19:45 +0000)
commitc29042dcfd7c1f055ec907b20e54f97a6cbaaa47
tree0649a1fff4d110796dd7f22168c9413cd8eb5caa
parentc2c5a221ce42422be9d0a94aa4673eaf9680996f
sfc: Distinguish queue lookup from test for queue existence

efx_channel_get_{rx,tx}_queue() currently return NULL if the channel
isn't used for traffic in that direction.  In most cases this is a
bug, but some callers rely on it as an existence test.

Add existence test functions efx_channel_has_{rx_queue,tx_queues}()
and use them as appropriate.

Change efx_channel_get_{rx,tx}_queue() to assert that the requested
queue exists.

Remove now-redundant initialisation from efx_set_channels().

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
drivers/net/sfc/efx.c
drivers/net/sfc/ethtool.c
drivers/net/sfc/net_driver.h