diff options
author | yongari <yongari@FreeBSD.org> | 2010-06-04 17:11:33 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2010-06-04 17:11:33 +0000 |
commit | 85ef5a9b825e75fa8520204a814577f94a2fc836 (patch) | |
tree | 91a8602b079335fc2eb405aeab0f5e2f200dd41d | |
parent | 4adc6d09d8a4624249d88fb1902b3c3881b0f716 (diff) | |
download | FreeBSD-src-85ef5a9b825e75fa8520204a814577f94a2fc836.zip FreeBSD-src-85ef5a9b825e75fa8520204a814577f94a2fc836.tar.gz |
Don't blindly set IFF_DRV_OACTIVE when sge_encap() fails. If there
is no queued frame, IFF_DRV_OACTIVE would never be cleared.
Submitted by: Nikolay Denev < ndenev <> gmail at com >
MFC after: 4 days
-rw-r--r-- | sys/dev/sge/if_sge.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/sge/if_sge.c b/sys/dev/sge/if_sge.c index 9248da3..6ecd8b0 100644 --- a/sys/dev/sge/if_sge.c +++ b/sys/dev/sge/if_sge.c @@ -1588,8 +1588,9 @@ sge_start_locked(struct ifnet *ifp) if (m_head == NULL) break; if (sge_encap(sc, &m_head)) { - if (m_head != NULL) - IFQ_DRV_PREPEND(&ifp->if_snd, m_head); + if (m_head == NULL) + break; + IFQ_DRV_PREPEND(&ifp->if_snd, m_head); ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } |