aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/tipar.txt
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2007-08-15 14:56:56 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-12 14:51:18 -0400
commitdffe807cdbc6d2409b9bcc87a9517bb7c0d25b65 (patch)
tree9d79c515ab15086a63146cfdd8dd271758b86118 /Documentation/tipar.txt
parent6fdea8dbbe4fc021afb601ef5339d5c5825c5cb6 (diff)
[SCSI] ncr53c8xx: Call scsi_host_put in release
Since ncr53c8xx_attach() calls scsi_host_put(), make ncr53c8xx_release() call scsi_host_put() too, for symmetry. Both callers already expect it to put the host for them, so that works out nicely. While the zalon driver does 'use' the host pointer afterwards, it only compares it for equality and doesn't dereference it, so that's safe. While I'm at it, get rid of pointless checks for NULL, use shost_priv() and change ncr53c8xx_release to return void. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'Documentation/tipar.txt')
0 files changed, 0 insertions, 0 deletions
/a> 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126







































































































                                                                              


                                                             


















                                                                        
/*
 * Interface to the libusual.
 *
 * Copyright (c) 2005 Pete Zaitcev <zaitcev@redhat.com>
 * Copyright (c) 1999-2002 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
 * Copyright (c) 1999 Michael Gee (michael@linuxspecific.com)
 */

#ifndef __LINUX_USB_USUAL_H
#define __LINUX_USB_USUAL_H

#include <linux/config.h>

/* We should do this for cleanliness... But other usb_foo.h do not do this. */
/* #include <linux/usb.h> */

/*
 * The flags field, which we store in usb_device_id.driver_info.
 * It is compatible with the old usb-storage flags in lower 24 bits.
 */

/*
 * Static flag definitions.  We use this roundabout technique so that the
 * proc_info() routine can automatically display a message for each flag.
 */
#define US_DO_ALL_FLAGS						\
	US_FLAG(SINGLE_LUN,	0x00000001)			\
		/* allow access to only LUN 0 */		\
	US_FLAG(NEED_OVERRIDE,	0x00000002)			\
		/* unusual_devs entry is necessary */		\
	US_FLAG(SCM_MULT_TARG,	0x00000004)			\
		/* supports multiple targets */			\
	US_FLAG(FIX_INQUIRY,	0x00000008)			\
		/* INQUIRY response needs faking */		\
	US_FLAG(FIX_CAPACITY,	0x00000010)			\
		/* READ CAPACITY response too big */		\
	US_FLAG(IGNORE_RESIDUE,	0x00000020)			\
		/* reported residue is wrong */			\
	US_FLAG(BULK32,		0x00000040)			\
		/* Uses 32-byte CBW length */			\
	US_FLAG(NOT_LOCKABLE,	0x00000080)			\
		/* PREVENT/ALLOW not supported */		\
	US_FLAG(GO_SLOW,	0x00000100)			\
		/* Need delay after Command phase */		\
	US_FLAG(NO_WP_DETECT,	0x00000200)			\
		/* Don't check for write-protect */		\

#define US_FLAG(name, value)	US_FL_##name = value ,
enum { US_DO_ALL_FLAGS };
#undef US_FLAG

/*
 * The bias field for libusual and friends.
 */
#define USB_US_TYPE_NONE   0
#define USB_US_TYPE_STOR   1		/* usb-storage */
#define USB_US_TYPE_UB     2		/* ub */

#define USB_US_TYPE(flags) 		(((flags) >> 24) & 0xFF)
#define USB_US_ORIG_FLAGS(flags)	((flags) & 0x00FFFFFF)

/*
 * This is probably not the best place to keep these constants, conceptually.
 * But it's the only header included into all places which need them.
 */

/* Sub Classes */

#define US_SC_RBC	0x01		/* Typically, flash devices */
#define US_SC_8020	0x02		/* CD-ROM */
#define US_SC_QIC	0x03		/* QIC-157 Tapes */
#define US_SC_UFI	0x04		/* Floppy */
#define US_SC_8070	0x05		/* Removable media */
#define US_SC_SCSI	0x06		/* Transparent */
#define US_SC_ISD200    0x07		/* ISD200 ATA */
#define US_SC_MIN	US_SC_RBC
#define US_SC_MAX	US_SC_ISD200

#define US_SC_DEVICE	0xff		/* Use device's value */

/* Protocols */

#define US_PR_CBI	0x00		/* Control/Bulk/Interrupt */
#define US_PR_CB	0x01		/* Control/Bulk w/o interrupt */
#define US_PR_BULK	0x50		/* bulk only */
#ifdef CONFIG_USB_STORAGE_USBAT
#define US_PR_USBAT	0x80		/* SCM-ATAPI bridge */
#endif
#ifdef CONFIG_USB_STORAGE_SDDR09
#define US_PR_EUSB_SDDR09	0x81	/* SCM-SCSI bridge for SDDR-09 */
#endif
#ifdef CONFIG_USB_STORAGE_SDDR55
#define US_PR_SDDR55	0x82		/* SDDR-55 (made up) */
#endif
#define US_PR_DPCM_USB  0xf0		/* Combination CB/SDDR09 */
#ifdef CONFIG_USB_STORAGE_FREECOM
#define US_PR_FREECOM   0xf1		/* Freecom */
#endif
#ifdef CONFIG_USB_STORAGE_DATAFAB
#define US_PR_DATAFAB   0xf2		/* Datafab chipsets */
#endif
#ifdef CONFIG_USB_STORAGE_JUMPSHOT
#define US_PR_JUMPSHOT  0xf3		/* Lexar Jumpshot */
#endif
#ifdef CONFIG_USB_STORAGE_ALAUDA
#define US_PR_ALAUDA    0xf4		/* Alauda chipsets */
#endif

#define US_PR_DEVICE	0xff		/* Use device's value */

/*
 */
#ifdef CONFIG_USB_LIBUSUAL

extern struct usb_device_id storage_usb_ids[];
extern void usb_usual_set_present(int type);
extern void usb_usual_clear_present(int type);
extern int usb_usual_check_type(const struct usb_device_id *, int type);
#else

#define usb_usual_set_present(t)	do { } while(0)
#define usb_usual_clear_present(t)	do { } while(0)
#define usb_usual_check_type(id, t)	(0)
#endif /* CONFIG_USB_LIBUSUAL */

#endif /* __LINUX_USB_USUAL_H */