diff options
Diffstat (limited to 'drivers/staging/rts_pstor/rtsx.h')
-rw-r--r-- | drivers/staging/rts_pstor/rtsx.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/staging/rts_pstor/rtsx.h b/drivers/staging/rts_pstor/rtsx.h index 6afb635..1ab42fc 100644 --- a/drivers/staging/rts_pstor/rtsx.h +++ b/drivers/staging/rts_pstor/rtsx.h @@ -24,12 +24,11 @@ #ifndef __REALTEK_RTSX_H #define __REALTEK_RTSX_H -#include <asm/io.h> -#include <asm/bitops.h> +#include <linux/io.h> +#include <linux/bitops.h> #include <linux/delay.h> #include <linux/interrupt.h> #include <linux/kernel.h> -#include <linux/version.h> #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/init.h> @@ -81,7 +80,7 @@ #define wait_timeout_x(task_state, msecs) \ do { \ - set_current_state((task_state)); \ + set_current_state((task_state)); \ schedule_timeout((msecs) * HZ / 1000); \ } while (0) #define wait_timeout(msecs) wait_timeout_x(TASK_INTERRUPTIBLE, (msecs)) @@ -103,19 +102,26 @@ typedef unsigned long DELAY_PARA_T; struct rtsx_chip; struct rtsx_dev { - struct pci_dev *pci; + struct pci_dev *pci; /* pci resources */ unsigned long addr; void __iomem *remap_addr; - int irq; + int irq; /* locks */ spinlock_t reg_lock; + struct task_struct *ctl_thread; /* the control thread */ + struct task_struct *polling_thread; /* the polling thread */ + /* mutual exclusion and synchronization structures */ - struct semaphore sema; /* to sleep thread on */ + struct completion cmnd_ready; /* to sleep thread on */ + struct completion control_exit; /* control thread exit */ + struct completion polling_exit; /* polling thread exit */ struct completion notify; /* thread begin/end */ + struct completion scanning_done; /* wait for scan thread */ + wait_queue_head_t delay_wait; /* wait during scan, reset */ struct mutex dev_mutex; |