From e7549b926dd3ceec048f5689df90d4ec970c9419 Mon Sep 17 00:00:00 2001 From: Wolfgang Wiedmeyer Date: Fri, 23 Oct 2015 13:30:20 +0200 Subject: more driver stuff from 3.2.72 --- drivers/staging/rts_pstor/rtsx.h | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'drivers/staging/rts_pstor/rtsx.h') 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 -#include +#include +#include #include #include #include -#include #include #include #include @@ -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; -- cgit v1.1