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/heci_interface.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/heci_interface.c')
-rw-r--r-- | drivers/staging/heci/heci_interface.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/staging/heci/heci_interface.c b/drivers/staging/heci/heci_interface.c index c5f51a7ddf2..03e1df1a88a 100644 --- a/drivers/staging/heci/heci_interface.c +++ b/drivers/staging/heci/heci_interface.c @@ -44,12 +44,15 @@ /** - * heci_set_csr_register - write H_CSR register to the heci device + * heci_set_csr_register - write H_CSR register to the heci device, + * and ignore the H_IS bit for it is write-one-to-zero. * * @dev: device object for our driver */ void heci_set_csr_register(struct iamt_heci_device *dev) { + if ((dev->host_hw_state & H_IS) == H_IS) + dev->host_hw_state &= ~H_IS; write_heci_register(dev, H_CSR, dev->host_hw_state); dev->host_hw_state = read_heci_register(dev, H_CSR); } @@ -76,6 +79,16 @@ void heci_csr_disable_interrupts(struct iamt_heci_device *dev) heci_set_csr_register(dev); } +/** + * heci_csr_clear_his - clear H_IS bit in H_CSR + * + * @dev: device object for our driver + */ +void heci_csr_clear_his(struct iamt_heci_device *dev) +{ + write_heci_register(dev, H_CSR, dev->host_hw_state); + dev->host_hw_state = read_heci_register(dev, H_CSR); +} /** * _host_get_filled_slots - get number of device filled buffer slots @@ -185,7 +198,7 @@ int heci_write_message(struct iamt_heci_device *dev, } dev->host_hw_state |= H_IG; - write_heci_register(dev, H_CSR, dev->host_hw_state); + heci_set_csr_register(dev); dev->me_hw_state = read_heci_register(dev, ME_CSR_HA); if ((dev->me_hw_state & ME_RDY_HRA) != ME_RDY_HRA) return 0; |