diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-22 15:55:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-22 15:55:29 -0400 |
commit | 424a6f6ef990b7e9f56f6627bfc6c46b493faeb4 (patch) | |
tree | 0028356ed8003495fbbe1f716f359e3c8ebc35b6 /drivers/scsi/sd.h | |
parent | 1ab142d499294b844ecc81e8004db4ce029b0b61 (diff) | |
parent | cd8df932d894f3128c884e3ae1b2b484540513db (diff) |
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
SCSI updates from James Bottomley:
"The update includes the usual assortment of driver updates (lpfc,
qla2xxx, qla4xxx, bfa, bnx2fc, bnx2i, isci, fcoe, hpsa) plus a huge
amount of infrastructure work in the SAS library and transport class
as well as an iSCSI update. There's also a new SCSI based virtio
driver."
* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (177 commits)
[SCSI] qla4xxx: Update driver version to 5.02.00-k15
[SCSI] qla4xxx: trivial cleanup
[SCSI] qla4xxx: Fix sparse warning
[SCSI] qla4xxx: Add support for multiple session per host.
[SCSI] qla4xxx: Export CHAP index as sysfs attribute
[SCSI] scsi_transport: Export CHAP index as sysfs attribute
[SCSI] qla4xxx: Add support to display CHAP list and delete CHAP entry
[SCSI] iscsi_transport: Add support to display CHAP list and delete CHAP entry
[SCSI] pm8001: fix endian issue with code optimization.
[SCSI] pm8001: Fix possible racing condition.
[SCSI] pm8001: Fix bogus interrupt state flag issue.
[SCSI] ipr: update PCI ID definitions for new adapters
[SCSI] qla2xxx: handle default case in qla2x00_request_firmware()
[SCSI] isci: improvements in driver unloading routine
[SCSI] isci: improve phy event warnings
[SCSI] isci: debug, provide state-enum-to-string conversions
[SCSI] scsi_transport_sas: 'enable' phys on reset
[SCSI] libsas: don't recover end devices attached to disabled phys
[SCSI] libsas: fixup target_port_protocols for expanders that don't report sata
[SCSI] libsas: set attached device type and target protocols for local phys
...
Diffstat (limited to 'drivers/scsi/sd.h')
-rw-r--r-- | drivers/scsi/sd.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/scsi/sd.h b/drivers/scsi/sd.h index 4163f2910e3d..f703f4827b6f 100644 --- a/drivers/scsi/sd.h +++ b/drivers/scsi/sd.h | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | #define SD_MAX_RETRIES 5 | 21 | #define SD_MAX_RETRIES 5 |
22 | #define SD_PASSTHROUGH_RETRIES 1 | 22 | #define SD_PASSTHROUGH_RETRIES 1 |
23 | #define SD_MAX_MEDIUM_TIMEOUTS 2 | ||
23 | 24 | ||
24 | /* | 25 | /* |
25 | * Size of the initial data buffer for mode and read capacity data | 26 | * Size of the initial data buffer for mode and read capacity data |
@@ -59,6 +60,8 @@ struct scsi_disk { | |||
59 | u32 unmap_alignment; | 60 | u32 unmap_alignment; |
60 | u32 index; | 61 | u32 index; |
61 | unsigned int physical_block_size; | 62 | unsigned int physical_block_size; |
63 | unsigned int max_medium_access_timeouts; | ||
64 | unsigned int medium_access_timed_out; | ||
62 | u8 media_present; | 65 | u8 media_present; |
63 | u8 write_prot; | 66 | u8 write_prot; |
64 | u8 protection_type;/* Data Integrity Field */ | 67 | u8 protection_type;/* Data Integrity Field */ |
@@ -88,6 +91,38 @@ static inline struct scsi_disk *scsi_disk(struct gendisk *disk) | |||
88 | (sdsk)->disk->disk_name, ##a) : \ | 91 | (sdsk)->disk->disk_name, ##a) : \ |
89 | sdev_printk(prefix, (sdsk)->device, fmt, ##a) | 92 | sdev_printk(prefix, (sdsk)->device, fmt, ##a) |
90 | 93 | ||
94 | static inline int scsi_medium_access_command(struct scsi_cmnd *scmd) | ||
95 | { | ||
96 | switch (scmd->cmnd[0]) { | ||
97 | case READ_6: | ||
98 | case READ_10: | ||
99 | case READ_12: | ||
100 | case READ_16: | ||
101 | case SYNCHRONIZE_CACHE: | ||
102 | case VERIFY: | ||
103 | case VERIFY_12: | ||
104 | case VERIFY_16: | ||
105 | case WRITE_6: | ||
106 | case WRITE_10: | ||
107 | case WRITE_12: | ||
108 | case WRITE_16: | ||
109 | case WRITE_SAME: | ||
110 | case WRITE_SAME_16: | ||
111 | case UNMAP: | ||
112 | return 1; | ||
113 | case VARIABLE_LENGTH_CMD: | ||
114 | switch (scmd->cmnd[9]) { | ||
115 | case READ_32: | ||
116 | case VERIFY_32: | ||
117 | case WRITE_32: | ||
118 | case WRITE_SAME_32: | ||
119 | return 1; | ||
120 | } | ||
121 | } | ||
122 | |||
123 | return 0; | ||
124 | } | ||
125 | |||
91 | /* | 126 | /* |
92 | * A DIF-capable target device can be formatted with different | 127 | * A DIF-capable target device can be formatted with different |
93 | * protection schemes. Currently 0 through 3 are defined: | 128 | * protection schemes. Currently 0 through 3 are defined: |