mirror of
https://github.com/torvalds/linux.git
synced 2026-08-12 10:27:20 +02:00
For the devices in this driver, the default qdisc is "noqueue",
because their "tx_queue_len" is 0.
In function "__dev_queue_xmit" in "net/core/dev.c", devices with the
"noqueue" qdisc are specially handled. Packets are transmitted without
being queued after a "dev->flags & IFF_UP" check. However, it's possible
that even if this check succeeds, "ops->ndo_stop" may still have already
been called. This is because in "__dev_close_many", "ops->ndo_stop" is
called before clearing the "IFF_UP" flag.
If we call "netif_stop_queue" in "ops->ndo_stop", then it's possible in
"__dev_queue_xmit", it sees the "IFF_UP" flag is present, and then it
checks "netif_xmit_stopped" and finds that the queue is already stopped.
In this case, it will complain that:
"Virtual device ... asks to queue packet!"
To prevent "__dev_queue_xmit" from generating this complaint, we should
not call "netif_stop_queue" in "ops->ndo_stop".
We also don't need to call "netif_start_queue" in "ops->ndo_open",
because after a netdev is allocated and registered, the
"__QUEUE_STATE_DRV_XOFF" flag is initially not set, so there is no need
to call "netif_start_queue" to clear it.
Fixes:
|
||
|---|---|---|
| .. | ||
| lmc | ||
| .gitignore | ||
| c101.c | ||
| cosa.c | ||
| cosa.h | ||
| farsync.c | ||
| farsync.h | ||
| fsl_ucc_hdlc.c | ||
| fsl_ucc_hdlc.h | ||
| hd64570.c | ||
| hd64570.h | ||
| hd64572.c | ||
| hd64572.h | ||
| hdlc_cisco.c | ||
| hdlc_fr.c | ||
| hdlc_ppp.c | ||
| hdlc_raw_eth.c | ||
| hdlc_raw.c | ||
| hdlc_x25.c | ||
| hdlc.c | ||
| hostess_sv11.c | ||
| ixp4xx_hss.c | ||
| Kconfig | ||
| lapbether.c | ||
| Makefile | ||
| n2.c | ||
| pc300too.c | ||
| pci200syn.c | ||
| sbni.c | ||
| sbni.h | ||
| sealevel.c | ||
| slic_ds26522.c | ||
| slic_ds26522.h | ||
| wanxl.c | ||
| wanxl.h | ||
| wanxlfw.inc_shipped | ||
| wanxlfw.S | ||
| z85230.c | ||
| z85230.h | ||