]> err.no Git - linux-2.6/commit
[PATCH] via-rhine: change mdelay to msleep and remove from ISR path
authorJohn W. Linville <linville@tuxdriver.com>
Wed, 19 Oct 2005 01:31:02 +0000 (21:31 -0400)
committerJeff Garzik <jgarzik@pobox.com>
Wed, 19 Oct 2005 02:26:01 +0000 (22:26 -0400)
commit6ba98d311d0a4ff7dc36d8f435ce60174f4c30ec
tree745daba38635eca9466319f8c8940d1fb3e8ed3c
parent923833405d8d81b5be036093773d88d87fc7e1bd
[PATCH] via-rhine: change mdelay to msleep and remove from ISR path

Get rid of the mdelay call in rhine_disable_linkmon.  The function
is called from the via-rhine versions of mdio_read and mdio_write.
Those functions are indirectly called from rhine_check_media and
rhine_tx_timeout, both of which can be called in interrupt context.

So, create tx_timeout_task and check_media_task as instances of struct
work_struct inside of rhine_private.  Then, change rhine_tx_timeout to
invoke schedule_work for tx_timeout_task (i.e. rhine_tx_timeout_task),
moving the work to process context.  Also, change rhine_error (invoked
from rhine_interrupt) to invoke schedule_work for check_media_task
(i.e. rhine_check_media_task), which simply calls rhine_check media
in process context.  Finally, add a call to flush_scheduled_work in
rhine_close to avoid any resource conflicts with pending work items.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
drivers/net/via-rhine.c