aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDongxiao Xu <dongxiao.xu@intel.com>2009-05-31 02:43:51 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-19 14:00:55 -0400
commit52b855600c5c16c13b6f288f3536d01c2603e78d (patch)
tree114159b3e83b90f2135e9a8e723eab57dc722fe4
parent58b25a63a18e88052c8f5f068e68feaac4c6831d (diff)
Staging: heci: fix typos and add wait after disconnect
- Fix typo for enum HECI_WRITE. - Fix timeout issue. If the time period is greater or equal 15s, it's timeout. - Add 10ms wait time after disconnect, to ensure that hardware is ready. Otherwise in the next time connection, hardware resource may be busy. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/heci/heci_init.c1
-rw-r--r--drivers/staging/heci/heci_main.c2
-rw-r--r--drivers/staging/heci/interrupt.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/heci/heci_init.c b/drivers/staging/heci/heci_init.c
index a8a0da910cfb..06ea1967e0e3 100644
--- a/drivers/staging/heci/heci_init.c
+++ b/drivers/staging/heci/heci_init.c
@@ -1012,6 +1012,7 @@ int heci_disconnect_host_client(struct iamt_heci_device *dev,
1012 if (dev->host_buffer_is_empty) { 1012 if (dev->host_buffer_is_empty) {
1013 dev->host_buffer_is_empty = 0; 1013 dev->host_buffer_is_empty = 0;
1014 if (heci_disconnect(dev, file_ext)) { 1014 if (heci_disconnect(dev, file_ext)) {
1015 mdelay(10); /* Wait for hardware disconnection ready */
1015 list_add_tail(&priv_cb->cb_list, 1016 list_add_tail(&priv_cb->cb_list,
1016 &dev->ctrl_rd_list.heci_cb.cb_list); 1017 &dev->ctrl_rd_list.heci_cb.cb_list);
1017 } else { 1018 } else {
diff --git a/drivers/staging/heci/heci_main.c b/drivers/staging/heci/heci_main.c
index 4b02641aaa9b..1197803fda85 100644
--- a/drivers/staging/heci/heci_main.c
+++ b/drivers/staging/heci/heci_main.c
@@ -1088,7 +1088,7 @@ static ssize_t heci_write(struct file *file, const char __user *ubuf,
1088 if (file_ext == &dev->iamthif_file_ext) { 1088 if (file_ext == &dev->iamthif_file_ext) {
1089 priv_write_cb = find_pthi_read_list_entry(dev, file); 1089 priv_write_cb = find_pthi_read_list_entry(dev, file);
1090 if ((priv_write_cb != NULL) && 1090 if ((priv_write_cb != NULL) &&
1091 (((currtime - priv_write_cb->read_time) > 1091 (((currtime - priv_write_cb->read_time) >=
1092 IAMTHIF_READ_TIMER) || 1092 IAMTHIF_READ_TIMER) ||
1093 (file_ext->reading_state == HECI_READ_COMPLETE))) { 1093 (file_ext->reading_state == HECI_READ_COMPLETE))) {
1094 (*offset) = 0; 1094 (*offset) = 0;
diff --git a/drivers/staging/heci/interrupt.c b/drivers/staging/heci/interrupt.c
index 2db1851d1688..b7ce73be8265 100644
--- a/drivers/staging/heci/interrupt.c
+++ b/drivers/staging/heci/interrupt.c
@@ -1054,7 +1054,7 @@ static int heci_bh_write_handler(struct io_heci_list *cmpl_list,
1054 list_del(&priv_cb_pos->cb_list); 1054 list_del(&priv_cb_pos->cb_list);
1055 if ((HECI_WRITING == file_ext->writing_state) && 1055 if ((HECI_WRITING == file_ext->writing_state) &&
1056 (priv_cb_pos->major_file_operations == 1056 (priv_cb_pos->major_file_operations ==
1057 HECI_WRITING) && 1057 HECI_WRITE) &&
1058 (file_ext != &dev->iamthif_file_ext)) { 1058 (file_ext != &dev->iamthif_file_ext)) {
1059 DBG("HECI WRITE COMPLETE\n"); 1059 DBG("HECI WRITE COMPLETE\n");
1060 file_ext->writing_state = 1060 file_ext->writing_state =