Deleted Added
full compact
ipoib_main.c (341887) ipoib_main.c (353183)
1/*
2 * Copyright (c) 2004 Topspin Communications. All rights reserved.
3 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
4 * Copyright (c) 2004 Voltaire, Inc. All rights reserved.
5 *
6 * This software is available to you under a choice of one of two
7 * licenses. You may choose to be licensed under the terms of the GNU
8 * General Public License (GPL) Version 2, available from the file

--- 756 unchanged lines hidden (view full) ---

765
766 ipoib_mcast_send(priv, eh->hwaddr + 4, mb);
767 } else
768 ipoib_unicast_send(mb, priv, eh);
769
770 return 0;
771}
772
1/*
2 * Copyright (c) 2004 Topspin Communications. All rights reserved.
3 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
4 * Copyright (c) 2004 Voltaire, Inc. All rights reserved.
5 *
6 * This software is available to you under a choice of one of two
7 * licenses. You may choose to be licensed under the terms of the GNU
8 * General Public License (GPL) Version 2, available from the file

--- 756 unchanged lines hidden (view full) ---

765
766 ipoib_mcast_send(priv, eh->hwaddr + 4, mb);
767 } else
768 ipoib_unicast_send(mb, priv, eh);
769
770 return 0;
771}
772
773
774static void
775_ipoib_start(struct ifnet *dev, struct ipoib_dev_priv *priv)
773void
774ipoib_start_locked(struct ifnet *dev, struct ipoib_dev_priv *priv)
776{
777 struct mbuf *mb;
778
775{
776 struct mbuf *mb;
777
779 if ((dev->if_drv_flags & (IFF_DRV_RUNNING|IFF_DRV_OACTIVE)) !=
780 IFF_DRV_RUNNING)
781 return;
778 assert_spin_locked(&priv->lock);
782
779
783 spin_lock(&priv->lock);
784 while (!IFQ_DRV_IS_EMPTY(&dev->if_snd) &&
785 (dev->if_drv_flags & IFF_DRV_OACTIVE) == 0) {
786 IFQ_DRV_DEQUEUE(&dev->if_snd, mb);
787 if (mb == NULL)
788 break;
789 IPOIB_MTAP(dev, mb);
790 ipoib_send_one(priv, mb);
791 }
780 while (!IFQ_DRV_IS_EMPTY(&dev->if_snd) &&
781 (dev->if_drv_flags & IFF_DRV_OACTIVE) == 0) {
782 IFQ_DRV_DEQUEUE(&dev->if_snd, mb);
783 if (mb == NULL)
784 break;
785 IPOIB_MTAP(dev, mb);
786 ipoib_send_one(priv, mb);
787 }
788}
789
790static void
791_ipoib_start(struct ifnet *dev, struct ipoib_dev_priv *priv)
792{
793
794 if ((dev->if_drv_flags & (IFF_DRV_RUNNING|IFF_DRV_OACTIVE)) !=
795 IFF_DRV_RUNNING)
796 return;
797
798 spin_lock(&priv->lock);
799 ipoib_start_locked(dev, priv);
792 spin_unlock(&priv->lock);
793}
794
795static void
796ipoib_start(struct ifnet *dev)
797{
798 _ipoib_start(dev, dev->if_softc);
799}

--- 948 unchanged lines hidden ---
800 spin_unlock(&priv->lock);
801}
802
803static void
804ipoib_start(struct ifnet *dev)
805{
806 _ipoib_start(dev, dev->if_softc);
807}

--- 948 unchanged lines hidden ---