lan743x: replace polling loop by wait_event_timeout()
The driver's ISR sends a 'software interrupt' event to the probe() thread using the following method: - probe(): write 0 to flag, enable s/w interrupt - probe(): poll on flag, relax using usleep_range() - ISR : write 1 to flag Replace with wake_up() / wait_event_timeout(). Besides being easier to get right, this abstraction has better timing and memory consistency properties. Tested-by: Sven Van Asbroeck <thesven73@gmail.com> # lan7430 Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com> Link: https://lore.kernel.org/r/20201123191529.14908-2-TheSven73@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
c31799bae8
commit
470dfd808a
@@ -616,7 +616,8 @@ struct lan743x_intr {
|
||||
int number_of_vectors;
|
||||
bool using_vectors;
|
||||
|
||||
int software_isr_flag;
|
||||
bool software_isr_flag;
|
||||
wait_queue_head_t software_isr_wq;
|
||||
};
|
||||
|
||||
#define LAN743X_MAX_FRAME_SIZE (9 * 1024)
|
||||
|
||||
Reference in New Issue
Block a user