diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-03-10 22:35:45 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-03-10 22:35:45 +0000 |
commit | 9997d44640fa75ced6e62153eb92c80fcf098334 (patch) | |
tree | d14c2ef505fda58f95301276d6cfb81e88ad23eb /sys/dev/cxgb | |
parent | 4e26404a14cb6496d721695165888b535bb12439 (diff) | |
download | FreeBSD-src-9997d44640fa75ced6e62153eb92c80fcf098334.zip FreeBSD-src-9997d44640fa75ced6e62153eb92c80fcf098334.tar.gz |
Prefer ENETDOWN to ENXIO when returning queuing errors due to a link
down, interface down, etc, with if_cxgb's if_transmit routine.
MFC after: 3 days
Reviewed by: kmacy
Diffstat (limited to 'sys/dev/cxgb')
-rw-r--r-- | sys/dev/cxgb/cxgb_multiq.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/cxgb/cxgb_multiq.c b/sys/dev/cxgb/cxgb_multiq.c index 108a2f9..7472d10 100644 --- a/sys/dev/cxgb/cxgb_multiq.c +++ b/sys/dev/cxgb/cxgb_multiq.c @@ -120,7 +120,7 @@ cxgb_pcpu_enqueue_packet_(struct sge_qset *qs, struct mbuf *m) KASSERT(m->m_type == MT_DATA, ("bad mbuf type %d", m->m_type)); if (qs->qs_flags & QS_EXITING) { m_freem(m); - return (ENXIO); + return (ENETDOWN); } txq = &qs->txq[TXQ_ETH]; err = buf_ring_enqueue(txq->txq_mr, m); @@ -301,13 +301,13 @@ cxgb_pcpu_start_(struct sge_qset *qs, struct mbuf *immpkt, int tx_flush) retry: if (!pi->link_config.link_ok) - initerr = ENXIO; + initerr = ENETDOWN; else if (qs->qs_flags & QS_EXITING) - initerr = ENXIO; + initerr = ENETDOWN; else if ((pi->ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) - initerr = ENXIO; + initerr = ENETDOWN; else if ((pi->ifp->if_flags & IFF_UP) == 0) - initerr = ENXIO; + initerr = ENETDOWN; else if (immpkt) { if (!buf_ring_empty(txq->txq_mr) |