usb.h (3d5271f9883cba7b54762bc4fe027d4172f06db7) usb.h (a00828e9ac62caed7b830d631914d7748817ccd1)
1/* Driver for USB Mass Storage compliant devices
2 * Main Header File
3 *
4 * $Id: usb.h,v 1.21 2002/04/21 02:57:59 mdharm Exp $
5 *
6 * Current development and maintenance by:
7 * (c) 1999-2002 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
8 *

--- 31 unchanged lines hidden (view full) ---

40 * with this program; if not, write to the Free Software Foundation, Inc.,
41 * 675 Mass Ave, Cambridge, MA 02139, USA.
42 */
43
44#ifndef _USB_H_
45#define _USB_H_
46
47#include <linux/usb.h>
1/* Driver for USB Mass Storage compliant devices
2 * Main Header File
3 *
4 * $Id: usb.h,v 1.21 2002/04/21 02:57:59 mdharm Exp $
5 *
6 * Current development and maintenance by:
7 * (c) 1999-2002 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
8 *

--- 31 unchanged lines hidden (view full) ---

40 * with this program; if not, write to the Free Software Foundation, Inc.,
41 * 675 Mass Ave, Cambridge, MA 02139, USA.
42 */
43
44#ifndef _USB_H_
45#define _USB_H_
46
47#include <linux/usb.h>
48#include <linux/usb_usual.h>
48#include <linux/blkdev.h>
49#include <linux/smp_lock.h>
50#include <linux/completion.h>
51#include <scsi/scsi_host.h>
52
53struct us_data;
54struct scsi_cmnd;
55
56/*
57 * Unusual device list definitions
58 */
59
60struct us_unusual_dev {
61 const char* vendorName;
62 const char* productName;
63 __u8 useProtocol;
64 __u8 useTransport;
65 int (*initFunction)(struct us_data *);
49#include <linux/blkdev.h>
50#include <linux/smp_lock.h>
51#include <linux/completion.h>
52#include <scsi/scsi_host.h>
53
54struct us_data;
55struct scsi_cmnd;
56
57/*
58 * Unusual device list definitions
59 */
60
61struct us_unusual_dev {
62 const char* vendorName;
63 const char* productName;
64 __u8 useProtocol;
65 __u8 useTransport;
66 int (*initFunction)(struct us_data *);
66 unsigned int flags;
67};
68
67};
68
69/*
70 * Static flag definitions. We use this roundabout technique so that the
71 * proc_info() routine can automatically display a message for each flag.
72 */
73#define US_DO_ALL_FLAGS \
74 US_FLAG(SINGLE_LUN, 0x00000001) \
75 /* allow access to only LUN 0 */ \
76 US_FLAG(NEED_OVERRIDE, 0x00000002) \
77 /* unusual_devs entry is necessary */ \
78 US_FLAG(SCM_MULT_TARG, 0x00000004) \
79 /* supports multiple targets */ \
80 US_FLAG(FIX_INQUIRY, 0x00000008) \
81 /* INQUIRY response needs faking */ \
82 US_FLAG(FIX_CAPACITY, 0x00000010) \
83 /* READ CAPACITY response too big */ \
84 US_FLAG(IGNORE_RESIDUE, 0x00000020) \
85 /* reported residue is wrong */ \
86 US_FLAG(BULK32, 0x00000040) \
87 /* Uses 32-byte CBW length */ \
88 US_FLAG(NOT_LOCKABLE, 0x00000080) \
89 /* PREVENT/ALLOW not supported */ \
90 US_FLAG(GO_SLOW, 0x00000100) \
91 /* Need delay after Command phase */ \
92 US_FLAG(NO_WP_DETECT, 0x00000200) \
93 /* Don't check for write-protect */ \
94
69
95#define US_FLAG(name, value) US_FL_##name = value ,
96enum { US_DO_ALL_FLAGS };
97#undef US_FLAG
98
99/* Dynamic flag definitions: used in set_bit() etc. */
100#define US_FLIDX_URB_ACTIVE 18 /* 0x00040000 current_urb is in use */
101#define US_FLIDX_SG_ACTIVE 19 /* 0x00080000 current_sg is in use */
102#define US_FLIDX_ABORTING 20 /* 0x00100000 abort is in progress */
103#define US_FLIDX_DISCONNECTING 21 /* 0x00200000 disconnect in progress */
104#define ABORTING_OR_DISCONNECTING ((1UL << US_FLIDX_ABORTING) | \
105 (1UL << US_FLIDX_DISCONNECTING))
106#define US_FLIDX_RESETTING 22 /* 0x00400000 device reset in progress */

--- 98 unchanged lines hidden ---
70/* Dynamic flag definitions: used in set_bit() etc. */
71#define US_FLIDX_URB_ACTIVE 18 /* 0x00040000 current_urb is in use */
72#define US_FLIDX_SG_ACTIVE 19 /* 0x00080000 current_sg is in use */
73#define US_FLIDX_ABORTING 20 /* 0x00100000 abort is in progress */
74#define US_FLIDX_DISCONNECTING 21 /* 0x00200000 disconnect in progress */
75#define ABORTING_OR_DISCONNECTING ((1UL << US_FLIDX_ABORTING) | \
76 (1UL << US_FLIDX_DISCONNECTING))
77#define US_FLIDX_RESETTING 22 /* 0x00400000 device reset in progress */

--- 98 unchanged lines hidden ---