On Wed, 18 Mar 2009 08:22:46 -0700 Alexander Duyck <alexander.h.duyck@xxxxxxxxx> wrote: > >>>> +static int igbvf_set_ringparam(struct net_device *netdev, > >>>> + struct ethtool_ringparam *ring) > >>>> +{ > >>>> + struct igbvf_adapter *adapter = netdev_priv(netdev); > >>>> + struct igbvf_ring *tx_ring, *tx_old; > >>>> + struct igbvf_ring *rx_ring, *rx_old; > >>>> + int err; > >>>> + > >>>> + if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) > >>>> + return -EINVAL; > >>>> + > >>>> + while (test_and_set_bit(__IGBVF_RESETTING, &adapter->state)) > >>>> + msleep(1); > >>> No timeout needed here? Interrupts might not be working, for example.. > >> This bit isn't set in interrupt context. This is always used out of > >> interrupt context and is just to prevent multiple setting changes at the > >> same time. > > > > Oh. Can't use plain old mutex_lock()? > > We have one or two spots that actually check to see if the bit is set > and just report a warning instead of actually waiting on the bit to clear. mutex_is_locked()? -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html