diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-19 17:48:32 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-19 17:48:32 -0700 |
commit | fb20871a54961b82d35303b43452928186c1361d (patch) | |
tree | 1beeb39e45eda1c8b5893090904b583fceeb07ef /drivers/staging/heci/interrupt.c | |
parent | bee89ab228e6f51c4ddd3481b9bd491859a8ee7b (diff) | |
parent | c7a5d70796379e3d51d0c652fbe1634b81d3bbd5 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (342 commits)
Staging: comedi: fix build errors
Staging: udlfb: update to version 0.2.3
Staging: udlfb: fix some sparse warnings.
Staging: udlfb: clean up checkpatch warnings in udlfb.c
Staging: udlfb: clean up checkpatch warnings in udlfb.h
Staging: udlfb: add udlfb driver to build
Staging: add udlfb driver
Staging: pata_rdc: remove pointless comments
Staging: pata_rdc: remove DRIVER macros
Staging: pata_rdc: remove dbgprintf macro
Staging: pata_rdc: remove broken flag
Staging: pata_rdc: fix build warnings
Staging: pata_rdc: use PCI_DEVICE
Staging: pata_rdc: remove function prototypes
Staging: pata_rdc: coding style fixes
Staging: pata_rdc: convert code to work in 2.6.29
Staging: pata_rdc: add driver to the build system
Staging: add pata_rdc driver
Staging: remove obsolete serqt_usb driver
Staging: serqt_usb2 add the driver to the build
...
Diffstat (limited to 'drivers/staging/heci/interrupt.c')
-rw-r--r-- | drivers/staging/heci/interrupt.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/staging/heci/interrupt.c b/drivers/staging/heci/interrupt.c index aacd2624398..2a3a01a62bb 100644 --- a/drivers/staging/heci/interrupt.c +++ b/drivers/staging/heci/interrupt.c @@ -92,6 +92,9 @@ irqreturn_t heci_isr_interrupt(int irq, void *dev_id) /* disable interrupts */ heci_csr_disable_interrupts(dev); + /* clear H_IS bit in H_CSR */ + heci_csr_clear_his(dev); + /* * Our device interrupted, schedule work the heci_bh_handler * to handle the interrupt processing. This needs to be a @@ -100,10 +103,8 @@ irqreturn_t heci_isr_interrupt(int irq, void *dev_id) PREPARE_WORK(&dev->work, heci_bh_handler); DBG("schedule work the heci_bh_handler.\n"); err = schedule_work(&dev->work); - if (!err) { - printk(KERN_ERR "heci: schedule the heci_bh_handler" - " failed error=%x\n", err); - } + if (!err) + DBG("heci_bh_handler was already on the workqueue.\n"); return IRQ_HANDLED; } @@ -251,13 +252,14 @@ end: /* acknowledge interrupt and disable interrupts */ heci_csr_disable_interrupts(dev); + /* clear H_IS bit in H_CSR */ + heci_csr_clear_his(dev); + PREPARE_WORK(&dev->work, heci_bh_handler); DBG("schedule work the heci_bh_handler.\n"); rets = schedule_work(&dev->work); - if (!rets) { - printk(KERN_ERR "heci: schedule the heci_bh_handler" - " failed error=%x\n", rets); - } + if (!rets) + DBG("heci_bh_handler was already queued.\n"); } else { heci_csr_enable_interrupts(dev); } @@ -622,7 +624,7 @@ static int heci_bh_read_client_message(struct io_heci_list *complete_list, priv_cb_pos->file_private; if ((file_ext != NULL) && (_heci_bh_state_ok(file_ext, heci_hdr))) { - spin_lock(&file_ext->read_io_lock); + spin_lock_bh(&file_ext->read_io_lock); file_ext->reading_state = HECI_READING; buffer = (unsigned char *) (priv_cb_pos->response_buffer.data + @@ -636,7 +638,7 @@ static int heci_bh_read_client_message(struct io_heci_list *complete_list, priv_cb_pos->information) { DBG("message overflow.\n"); list_del(&priv_cb_pos->cb_list); - spin_unlock(&file_ext->read_io_lock); + spin_unlock_bh(&file_ext->read_io_lock); return -ENOMEM; } if (buffer) { @@ -647,7 +649,7 @@ static int heci_bh_read_client_message(struct io_heci_list *complete_list, if (heci_hdr->msg_complete) { file_ext->status = 0; list_del(&priv_cb_pos->cb_list); - spin_unlock(&file_ext->read_io_lock); + spin_unlock_bh(&file_ext->read_io_lock); DBG("completed read host client = %d," "ME client = %d, " "data length = %lu\n", @@ -662,7 +664,7 @@ static int heci_bh_read_client_message(struct io_heci_list *complete_list, list_add_tail(&priv_cb_pos->cb_list, &complete_list->heci_cb.cb_list); } else { - spin_unlock(&file_ext->read_io_lock); + spin_unlock_bh(&file_ext->read_io_lock); } break; @@ -1054,7 +1056,7 @@ static int heci_bh_write_handler(struct io_heci_list *cmpl_list, list_del(&priv_cb_pos->cb_list); if ((HECI_WRITING == file_ext->writing_state) && (priv_cb_pos->major_file_operations == - HECI_WRITING) && + HECI_WRITE) && (file_ext != &dev->iamthif_file_ext)) { DBG("HECI WRITE COMPLETE\n"); file_ext->writing_state = |