aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-14 17:38:30 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-14 17:38:30 -0500
commit172ad9af55d236cb124d67de7314a90dedb50df1 (patch)
treeab225ebb0bcab867305fec87308bda97ca060102 /include/linux/netdevice.h
parenta44007a42dfd8e487537c7b1f8045577b28a4d95 (diff)
parent18558cae0272f8fd9647e69d3fec1565a7949865 (diff)
Merge 4.5-rc4 into usb-next
We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 5ac140dcb789..289c2314d766 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -512,7 +512,6 @@ static inline void napi_enable(struct napi_struct *n)
512 clear_bit(NAPI_STATE_NPSVC, &n->state); 512 clear_bit(NAPI_STATE_NPSVC, &n->state);
513} 513}
514 514
515#ifdef CONFIG_SMP
516/** 515/**
517 * napi_synchronize - wait until NAPI is not running 516 * napi_synchronize - wait until NAPI is not running
518 * @n: napi context 517 * @n: napi context
@@ -523,12 +522,12 @@ static inline void napi_enable(struct napi_struct *n)
523 */ 522 */
524static inline void napi_synchronize(const struct napi_struct *n) 523static inline void napi_synchronize(const struct napi_struct *n)
525{ 524{
526 while (test_bit(NAPI_STATE_SCHED, &n->state)) 525 if (IS_ENABLED(CONFIG_SMP))
527 msleep(1); 526 while (test_bit(NAPI_STATE_SCHED, &n->state))
527 msleep(1);
528 else
529 barrier();
528} 530}
529#else
530# define napi_synchronize(n) barrier()
531#endif
532 531
533enum netdev_queue_state_t { 532enum netdev_queue_state_t {
534 __QUEUE_STATE_DRV_XOFF, 533 __QUEUE_STATE_DRV_XOFF,