]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/storage/usb.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh...
[linux-2.6-omap-h63xx.git] / drivers / usb / storage / usb.h
index 8d87503e256072efa90c16672b22db4a00fded87..a4ad73bd832df76c0bffc53593c34ac73fabd9d1 100644 (file)
@@ -1,8 +1,6 @@
 /* Driver for USB Mass Storage compliant devices
  * Main Header File
  *
- * $Id: usb.h,v 1.21 2002/04/21 02:57:59 mdharm Exp $
- *
  * Current development and maintenance by:
  *   (c) 1999-2002 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
  *
@@ -67,16 +65,14 @@ struct us_unusual_dev {
 };
 
 
-/* Dynamic flag definitions: used in set_bit() etc. */
-#define US_FLIDX_URB_ACTIVE    18  /* 0x00040000  current_urb is in use  */
-#define US_FLIDX_SG_ACTIVE     19  /* 0x00080000  current_sg is in use   */
-#define US_FLIDX_ABORTING      20  /* 0x00100000  abort is in progress   */
-#define US_FLIDX_DISCONNECTING 21  /* 0x00200000  disconnect in progress */
-#define ABORTING_OR_DISCONNECTING      ((1UL << US_FLIDX_ABORTING) | \
-                                        (1UL << US_FLIDX_DISCONNECTING))
-#define US_FLIDX_RESETTING     22  /* 0x00400000  device reset in progress */
-#define US_FLIDX_TIMED_OUT     23  /* 0x00800000  SCSI midlayer timed out  */
-
+/* Dynamic bitflag definitions (us->dflags): used in set_bit() etc. */
+#define US_FLIDX_URB_ACTIVE    0       /* current_urb is in use    */
+#define US_FLIDX_SG_ACTIVE     1       /* current_sg is in use     */
+#define US_FLIDX_ABORTING      2       /* abort is in progress     */
+#define US_FLIDX_DISCONNECTING 3       /* disconnect in progress   */
+#define US_FLIDX_RESETTING     4       /* device reset in progress */
+#define US_FLIDX_TIMED_OUT     5       /* SCSI midlayer timed out  */
+#define US_FLIDX_DONT_SCAN     6       /* don't scan (disconnect)  */
 
 #define USB_STOR_STRING_LEN 32
 
@@ -109,7 +105,8 @@ struct us_data {
        struct usb_device       *pusb_dev;       /* this usb_device */
        struct usb_interface    *pusb_intf;      /* this interface */
        struct us_unusual_dev   *unusual_dev;    /* device-filter entry     */
-       unsigned long           flags;           /* from filter initially */
+       unsigned long           fflags;          /* fixed flags from filter */
+       unsigned long           dflags;          /* dynamic atomic bitflags */
        unsigned int            send_bulk_pipe;  /* cached pipe values */
        unsigned int            recv_bulk_pipe;
        unsigned int            send_ctrl_pipe;
@@ -147,7 +144,7 @@ struct us_data {
        struct task_struct      *ctl_thread;     /* the control thread   */
 
        /* mutual exclusion and synchronization structures */
-       struct semaphore        sema;            /* to sleep thread on      */
+       struct completion       cmnd_ready;      /* to sleep thread on      */
        struct completion       notify;          /* thread begin/end        */
        wait_queue_head_t       delay_wait;      /* wait during scan, reset */
        struct completion       scanning_done;   /* wait for scan thread    */