git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.5.x5
[linux-2.6.git]
/
drivers
/
usb
/
storage
/
usb.h
diff --git
a/drivers/usb/storage/usb.h
b/drivers/usb/storage/usb.h
index
35d0144
..
aaaf7ed
100644
(file)
--- a/
drivers/usb/storage/usb.h
+++ b/
drivers/usb/storage/usb.h
@@
-48,10
+48,9
@@
#include <linux/blkdev.h>
#include <linux/smp_lock.h>
#include <linux/completion.h>
#include <linux/blkdev.h>
#include <linux/smp_lock.h>
#include <linux/completion.h>
-#include "scsi.h"
-#include <scsi/scsi_host.h>
struct us_data;
struct us_data;
+struct scsi_cmnd;
/*
* Unusual device list definitions
/*
* Unusual device list definitions
@@
-74,6
+73,8
@@
struct us_unusual_dev {
#define US_FL_SCM_MULT_TARG 0x00000020 /* supports multiple targets */
#define US_FL_FIX_INQUIRY 0x00000040 /* INQUIRY response needs faking */
#define US_FL_FIX_CAPACITY 0x00000080 /* READ CAPACITY response too big */
#define US_FL_SCM_MULT_TARG 0x00000020 /* supports multiple targets */
#define US_FL_FIX_INQUIRY 0x00000040 /* INQUIRY response needs faking */
#define US_FL_FIX_CAPACITY 0x00000080 /* READ CAPACITY response too big */
+#define US_FL_IGNORE_RESIDUE 0x00000100 /* reported residue is wrong */
+#define US_FL_BULK32 0x00000200 /* Uses 32-byte CBW length */
/* Dynamic flag definitions: used in set_bit() etc. */
#define US_FLIDX_URB_ACTIVE 18 /* 0x00040000 current_urb is in use */
/* Dynamic flag definitions: used in set_bit() etc. */
#define US_FLIDX_URB_ACTIVE 18 /* 0x00040000 current_urb is in use */
@@
-83,14
+84,9
@@
struct us_unusual_dev {
#define ABORTING_OR_DISCONNECTING ((1UL << US_FLIDX_ABORTING) | \
(1UL << US_FLIDX_DISCONNECTING))
#define US_FLIDX_RESETTING 22 /* 0x00400000 device reset 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 */
-/* processing state machine states */
-#define US_STATE_IDLE 1
-#define US_STATE_RUNNING 2
-#define US_STATE_RESETTING 3
-#define US_STATE_ABORTING 4
-
#define USB_STOR_STRING_LEN 32
/*
#define USB_STOR_STRING_LEN 32
/*
@@
-102,9
+98,9
@@
struct us_unusual_dev {
#define US_IOBUF_SIZE 64 /* Size of the DMA-mapped I/O buffer */
#define US_IOBUF_SIZE 64 /* Size of the DMA-mapped I/O buffer */
-typedef int (*trans_cmnd)(
Scsi_Cmnd
*, struct us_data*);
+typedef int (*trans_cmnd)(
struct scsi_cmnd
*, struct us_data*);
typedef int (*trans_reset)(struct us_data*);
typedef int (*trans_reset)(struct us_data*);
-typedef void (*proto_cmnd)(
Scsi_C
mnd*, struct us_data*);
+typedef void (*proto_cmnd)(
struct scsi_c
mnd*, struct us_data*);
typedef void (*extra_data_destructor)(void *); /* extra data destructor */
/* we allocate one of these for every device that we remember */
typedef void (*extra_data_destructor)(void *); /* extra data destructor */
/* we allocate one of these for every device that we remember */
@@
-144,11
+140,10
@@
struct us_data {
/* SCSI interfaces */
struct Scsi_Host *host; /* our dummy host data */
/* SCSI interfaces */
struct Scsi_Host *host; /* our dummy host data */
-
Scsi_Cmnd
*srb; /* current srb */
+
struct scsi_cmnd
*srb; /* current srb */
/* thread information */
int pid; /* control thread */
/* thread information */
int pid; /* control thread */
- int sm_state; /* what we are doing */
/* control and bulk communications data */
struct urb *current_urb; /* USB requests */
/* control and bulk communications data */
struct urb *current_urb; /* USB requests */
@@
-162,6
+157,8
@@
struct us_data {
struct semaphore sema; /* to sleep thread on */
struct completion notify; /* thread begin/end */
wait_queue_head_t dev_reset_wait; /* wait during reset */
struct semaphore sema; /* to sleep thread on */
struct completion notify; /* thread begin/end */
wait_queue_head_t dev_reset_wait; /* wait during reset */
+ wait_queue_head_t scsi_scan_wait; /* wait before scanning */
+ struct completion scsi_scan_done; /* scan thread end */
/* subdriver information */
void *extra; /* Any extra data */
/* subdriver information */
void *extra; /* Any extra data */
@@
-180,4
+177,8
@@
extern void fill_inquiry_response(struct us_data *us,
#define scsi_unlock(host) spin_unlock_irq(host->host_lock)
#define scsi_lock(host) spin_lock_irq(host->host_lock)
#define scsi_unlock(host) spin_unlock_irq(host->host_lock)
#define scsi_lock(host) spin_lock_irq(host->host_lock)
+
+/* Vendor ID list for devices that require special handling */
+#define USB_VENDOR_ID_GENESYS 0x05e3 /* Genesys Logic */
+
#endif
#endif