Re: [PATCH v3] net: davicom: dm9000: Avoid spinlock recursion during dm9000_timeout routine

2018-04-18 Thread David Miller
From: liuxiang Date: Wed, 18 Apr 2018 21:48:22 +0800 (CST) > Because the timeout task gets the main spinlock and disable the > current cpu's irq, there is no other task on the same cpu can run, > and tasks on the other cpus can not enter the dm9000_timeout() > again. So in the whole dm9000_timeo

Re: [PATCH v3] net: davicom: dm9000: Avoid spinlock recursion during dm9000_timeout routine

2018-04-16 Thread David Miller
From: Liu Xiang Date: Sat, 14 Apr 2018 16:50:34 +0800 > +static bool dm9000_current_in_timeout(struct board_info *db) > +{ > + bool ret = false; > + > + preempt_disable(); > + ret = (db->timeout_cpu == smp_processor_id()); > + preempt_enable(); This doesn't work. As soon as you