Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Mar 2009 22:35:45 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r189655 - head/sys/dev/cxgb
Message-ID:  <200903102235.n2AMZj36075770@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903102235.n2AMZj36075770>