aboutsummaryrefslogtreecommitdiff
path: root/include/scsi/scsi_device.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-27 10:04:52 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-27 10:04:52 -0700
commit211c8d4942edf2f3337820dda101da6b13c8a19a (patch)
treea2a107acb80a61623d27fa3affe813eab5f4b2a3 /include/scsi/scsi_device.h
parent7a82323da3d21ea59a0509569fc5c7bc5aa7eed7 (diff)
parentcadbd4a5e36dde7e6c49b587b2c419103c0b7218 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (59 commits) [SCSI] replace __FUNCTION__ with __func__ [SCSI] extend the last_sector_bug flag to cover more sectors [SCSI] qla2xxx: Update version number to 8.02.01-k6. [SCSI] qla2xxx: Additional NPIV corrections. [SCSI] qla2xxx: suppress uninitialized-var warning [SCSI] qla2xxx: use memory_read_from_buffer() [SCSI] qla2xxx: Issue proper ISP callbacks during stop-firmware. [SCSI] ch: fix ch_remove oops [SCSI] 3w-9xxx: add MSI support and misc fixes [SCSI] scsi_lib: use blk_rq_tagged in scsi_request_fn [SCSI] ibmvfc: Update driver version to 1.0.1 [SCSI] ibmvfc: Add ADISC support [SCSI] ibmvfc: Miscellaneous fixes [SCSI] ibmvfc: Fix hang on module removal [SCSI] ibmvfc: Target refcounting fixes [SCSI] ibmvfc: Reduce unnecessary log noise [SCSI] sym53c8xx: free luntbl in sym_hcb_free [SCSI] scsi_scan.c: Release mutex in error handling code [SCSI] scsi_eh_prep_cmnd should save scmd->underflow [SCSI] sd: Support for SCSI disk (SBC) Data Integrity Field ...
Diffstat (limited to 'include/scsi/scsi_device.h')
-rw-r--r--include/scsi/scsi_device.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 6467f78b191..291d56a1916 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -140,7 +140,8 @@ struct scsi_device {
unsigned fix_capacity:1; /* READ_CAPACITY is too high by 1 */
unsigned guess_capacity:1; /* READ_CAPACITY might be too high by 1 */
unsigned retry_hwerror:1; /* Retry HARDWARE_ERROR */
- unsigned last_sector_bug:1; /* Always read last sector in a 1 sector read */
+ unsigned last_sector_bug:1; /* do not use multisector accesses on
+ SD_LAST_BUGGY_SECTORS */
DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */
struct list_head event_list; /* asserted events */
@@ -167,15 +168,22 @@ struct scsi_device {
unsigned long sdev_data[0];
} __attribute__((aligned(sizeof(unsigned long))));
+struct scsi_dh_devlist {
+ char *vendor;
+ char *model;
+};
+
struct scsi_device_handler {
/* Used by the infrastructure */
struct list_head list; /* list of scsi_device_handlers */
- struct notifier_block nb;
/* Filled by the hardware handler */
struct module *module;
const char *name;
+ const struct scsi_dh_devlist *devlist;
int (*check_sense)(struct scsi_device *, struct scsi_sense_hdr *);
+ int (*attach)(struct scsi_device *);
+ void (*detach)(struct scsi_device *);
int (*activate)(struct scsi_device *);
int (*prep_fn)(struct scsi_device *, struct request *);
};
@@ -416,6 +424,11 @@ static inline int scsi_device_enclosure(struct scsi_device *sdev)
return sdev->inquiry[6] & (1<<6);
}
+static inline int scsi_device_protection(struct scsi_device *sdev)
+{
+ return sdev->inquiry[5] & (1<<0);
+}
+
#define MODULE_ALIAS_SCSI_DEVICE(type) \
MODULE_ALIAS("scsi:t-" __stringify(type) "*")
#define SCSI_DEVICE_MODALIAS_FMT "scsi:t-0x%02x"