From: Ben Gras Date: Fri, 14 Dec 2007 12:44:20 +0000 (+0000) Subject: always re-enable irq, so devices sharing this irq don't go deaf X-Git-Tag: v3.1.4~303 X-Git-Url: http://zhaoyanbai.com/repos/icons/static/man.3.ps?a=commitdiff_plain;h=8e727c97ced40700faee2b9021a71a2c9b928570;p=minix.git always re-enable irq, so devices sharing this irq don't go deaf as IRQ_REENABLE isn't specified. --- diff --git a/drivers/audio/framework/audio_fw.c b/drivers/audio/framework/audio_fw.c index dbdcd3d92..609100252 100755 --- a/drivers/audio/framework/audio_fw.c +++ b/drivers/audio/framework/audio_fw.c @@ -503,6 +503,13 @@ PRIVATE void msg_hardware(void) { } } } + + /* As IRQ_REENABLE is not on in sys_irqsetpolicy, we must + * re-enable out interrupt after every interrupt. + */ + if ((sys_irqenable(&irq_hook_id)) != OK) { + error("%s: msg_hardware: Couldn't enable IRQ\n", drv.DriverName); + } } @@ -610,10 +617,12 @@ PRIVATE void handle_int_write(int sub_dev_nr) /* confirm and reenable interrupt from this sub dev */ drv_reenable_int(sub_dev_nr); +#if 0 /* reenable irq_hook*/ if ((r=sys_irqenable(&irq_hook_id)) != OK) { error("%s Couldn't enable IRQ\n", drv.DriverName); } +#endif } @@ -663,10 +672,12 @@ PRIVATE void handle_int_read(int sub_dev_nr) /* confirm interrupt, and reenable interrupt from this sub dev*/ drv_reenable_int(sub_dev_ptr->Nr); +#if 0 /* reenable irq_hook*/ if ((r=sys_irqenable(&irq_hook_id)) != OK) { error("%s: Couldn't reenable IRQ", drv.DriverName); } +#endif } @@ -690,7 +701,8 @@ PRIVATE int get_started(sub_dev_t *sub_dev_ptr) { } -PRIVATE void data_from_user(sub_dev_t *subdev) { +PRIVATE void data_from_user(sub_dev_t *subdev) +{ if (subdev->DmaLength == subdev->NrOfDmaFragments && subdev->BufLength == subdev->NrOfExtraBuffers) return;/* no space */