svn commit: r189655 - head/sys/dev/cxgb

Robert Watson rwatson at FreeBSD.org
Tue Mar 10 15:35:46 PDT 2009


Author: rwatson
Date: Tue Mar 10 22:35:45 2009
New Revision: 189655
URL: http://svn.freebsd.org/changeset/base/189655

Log:
  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

Modified:
  head/sys/dev/cxgb/cxgb_multiq.c

Modified: head/sys/dev/cxgb/cxgb_multiq.c
==============================================================================
--- head/sys/dev/cxgb/cxgb_multiq.c	Tue Mar 10 22:29:42 2009	(r189654)
+++ head/sys/dev/cxgb/cxgb_multiq.c	Tue Mar 10 22:35:45 2009	(r189655)
@@ -120,7 +120,7 @@ cxgb_pcpu_enqueue_packet_(struct sge_qse
 	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, st
 	
  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)


More information about the svn-src-head mailing list