diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-01 21:49:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-01 21:49:04 -0400 |
commit | 1a0b6abaea78f73d9bc0a2f6df2d9e4c917cade1 (patch) | |
tree | faae6f0b72b00a0a4d44cadc607e576e1954a5bc /include | |
parent | 3e75c6de1ac33fe3500f44573d9212dc82c99f59 (diff) | |
parent | b2bff6ceb61a9a21294f04057d30c9bb4910a88f (diff) |
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull first round of SCSI updates from James Bottomley:
"This patch consists of the usual driver updates (megaraid_sas,
scsi_debug, qla2xxx, qla4xxx, lpfc, bnx2fc, be2iscsi, hpsa, ipr) plus
an assortment of minor fixes and the first precursors of SCSI-MQ (the
code path simplifications) and the bug fix for the USB oops on remove
(which involves an infrastructure change, so is sent via the main tree
with a delayed backport after a cycle in which it is shown to
introduce no new bugs)"
* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (196 commits)
[SCSI] sd: Quiesce mode sense error messages
[SCSI] add support for per-host cmd pools
[SCSI] simplify command allocation and freeing a bit
[SCSI] megaraid: simplify internal command handling
[SCSI] ses: Use vpd information from scsi_device
[SCSI] Add EVPD page 0x83 and 0x80 to sysfs
[SCSI] Return VPD page length in scsi_vpd_inquiry()
[SCSI] scsi_sysfs: Implement 'is_visible' callback
[SCSI] hpsa: update driver version to 3.4.4-1
[SCSI] hpsa: fix bad endif placement in RAID 5 mapper code
[SCSI] qla2xxx: Fix build errors related to invalid print fields on some architectures.
[SCSI] bfa: Replace large udelay() with mdelay()
[SCSI] vmw_pvscsi: Some improvements in pvscsi driver.
[SCSI] vmw_pvscsi: Add support for I/O requests coalescing.
[SCSI] vmw_pvscsi: Fix pvscsi_abort() function.
[SCSI] remove deprecated IRQF_DISABLED from SCSI
[SCSI] bfa: Updating Maintainers email ids
[SCSI] ipr: Add new CCIN definition for Grand Canyon support
[SCSI] ipr: Format HCAM overlay ID 0x21
[SCSI] ipr: Use pci_enable_msi_range() and pci_enable_msix_range()
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/pci_ids.h | 1 | ||||
-rw-r--r-- | include/scsi/libiscsi.h | 17 | ||||
-rw-r--r-- | include/scsi/libiscsi_tcp.h | 2 | ||||
-rw-r--r-- | include/scsi/scsi_cmnd.h | 6 | ||||
-rw-r--r-- | include/scsi/scsi_device.h | 22 | ||||
-rw-r--r-- | include/scsi/scsi_host.h | 7 | ||||
-rw-r--r-- | include/scsi/scsi_transport_fc.h | 1 |
7 files changed, 44 insertions, 12 deletions
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 297a8026f454..d4de24b4d4c6 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -728,6 +728,7 @@ | |||
728 | #define PCI_DEVICE_ID_SI_7018 0x7018 | 728 | #define PCI_DEVICE_ID_SI_7018 0x7018 |
729 | 729 | ||
730 | #define PCI_VENDOR_ID_HP 0x103c | 730 | #define PCI_VENDOR_ID_HP 0x103c |
731 | #define PCI_VENDOR_ID_HP_3PAR 0x1590 | ||
731 | #define PCI_DEVICE_ID_HP_VISUALIZE_EG 0x1005 | 732 | #define PCI_DEVICE_ID_HP_VISUALIZE_EG 0x1005 |
732 | #define PCI_DEVICE_ID_HP_VISUALIZE_FX6 0x1006 | 733 | #define PCI_DEVICE_ID_HP_VISUALIZE_FX6 0x1006 |
733 | #define PCI_DEVICE_ID_HP_VISUALIZE_FX4 0x1008 | 734 | #define PCI_DEVICE_ID_HP_VISUALIZE_FX4 0x1008 |
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index 309f51336fb9..7221a24e821b 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
@@ -327,12 +327,19 @@ struct iscsi_session { | |||
327 | struct iscsi_transport *tt; | 327 | struct iscsi_transport *tt; |
328 | struct Scsi_Host *host; | 328 | struct Scsi_Host *host; |
329 | struct iscsi_conn *leadconn; /* leading connection */ | 329 | struct iscsi_conn *leadconn; /* leading connection */ |
330 | spinlock_t lock; /* protects session state, * | 330 | /* Between the forward and the backward locks exists a strict locking |
331 | * sequence numbers, * | 331 | * hierarchy. The mutual exclusion zone protected by the forward lock |
332 | * can enclose the mutual exclusion zone protected by the backward lock | ||
333 | * but not vice versa. | ||
334 | */ | ||
335 | spinlock_t frwd_lock; /* protects session state, * | ||
336 | * cmdsn, queued_cmdsn * | ||
332 | * session resources: * | 337 | * session resources: * |
333 | * - cmdpool, * | 338 | * - cmdpool kfifo_out , * |
334 | * - mgmtpool, * | 339 | * - mgmtpool, */ |
335 | * - r2tpool */ | 340 | spinlock_t back_lock; /* protects cmdsn_exp * |
341 | * cmdsn_max, * | ||
342 | * cmdpool kfifo_in */ | ||
336 | int state; /* session state */ | 343 | int state; /* session state */ |
337 | int age; /* counts session re-opens */ | 344 | int age; /* counts session re-opens */ |
338 | 345 | ||
diff --git a/include/scsi/libiscsi_tcp.h b/include/scsi/libiscsi_tcp.h index 215469a9b801..2a7aa75dd009 100644 --- a/include/scsi/libiscsi_tcp.h +++ b/include/scsi/libiscsi_tcp.h | |||
@@ -83,6 +83,8 @@ struct iscsi_tcp_task { | |||
83 | struct iscsi_pool r2tpool; | 83 | struct iscsi_pool r2tpool; |
84 | struct kfifo r2tqueue; | 84 | struct kfifo r2tqueue; |
85 | void *dd_data; | 85 | void *dd_data; |
86 | spinlock_t pool2queue; | ||
87 | spinlock_t queue2pool; | ||
86 | }; | 88 | }; |
87 | 89 | ||
88 | enum { | 90 | enum { |
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 91558a1f97f4..dd7c998221b3 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h | |||
@@ -142,8 +142,7 @@ static inline struct scsi_driver *scsi_cmd_to_driver(struct scsi_cmnd *cmd) | |||
142 | extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t); | 142 | extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t); |
143 | extern struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *, gfp_t); | 143 | extern struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *, gfp_t); |
144 | extern void scsi_put_command(struct scsi_cmnd *); | 144 | extern void scsi_put_command(struct scsi_cmnd *); |
145 | extern void __scsi_put_command(struct Scsi_Host *, struct scsi_cmnd *, | 145 | extern void __scsi_put_command(struct Scsi_Host *, struct scsi_cmnd *); |
146 | struct device *); | ||
147 | extern void scsi_finish_command(struct scsi_cmnd *cmd); | 146 | extern void scsi_finish_command(struct scsi_cmnd *cmd); |
148 | 147 | ||
149 | extern void *scsi_kmap_atomic_sg(struct scatterlist *sg, int sg_count, | 148 | extern void *scsi_kmap_atomic_sg(struct scatterlist *sg, int sg_count, |
@@ -156,9 +155,6 @@ extern void scsi_release_buffers(struct scsi_cmnd *cmd); | |||
156 | extern int scsi_dma_map(struct scsi_cmnd *cmd); | 155 | extern int scsi_dma_map(struct scsi_cmnd *cmd); |
157 | extern void scsi_dma_unmap(struct scsi_cmnd *cmd); | 156 | extern void scsi_dma_unmap(struct scsi_cmnd *cmd); |
158 | 157 | ||
159 | struct scsi_cmnd *scsi_allocate_command(gfp_t gfp_mask); | ||
160 | void scsi_free_command(gfp_t gfp_mask, struct scsi_cmnd *cmd); | ||
161 | |||
162 | static inline unsigned scsi_sg_count(struct scsi_cmnd *cmd) | 158 | static inline unsigned scsi_sg_count(struct scsi_cmnd *cmd) |
163 | { | 159 | { |
164 | return cmd->sdb.table.nents; | 160 | return cmd->sdb.table.nents; |
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index d65fbec2533d..4e845b80efd3 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -113,6 +113,12 @@ struct scsi_device { | |||
113 | const char * vendor; /* [back_compat] point into 'inquiry' ... */ | 113 | const char * vendor; /* [back_compat] point into 'inquiry' ... */ |
114 | const char * model; /* ... after scan; point to static string */ | 114 | const char * model; /* ... after scan; point to static string */ |
115 | const char * rev; /* ... "nullnullnullnull" before scan */ | 115 | const char * rev; /* ... "nullnullnullnull" before scan */ |
116 | |||
117 | #define SCSI_VPD_PG_LEN 255 | ||
118 | int vpd_pg83_len; | ||
119 | unsigned char *vpd_pg83; | ||
120 | int vpd_pg80_len; | ||
121 | unsigned char *vpd_pg80; | ||
116 | unsigned char current_tag; /* current tag */ | 122 | unsigned char current_tag; /* current tag */ |
117 | struct scsi_target *sdev_target; /* used only for single_lun */ | 123 | struct scsi_target *sdev_target; /* used only for single_lun */ |
118 | 124 | ||
@@ -235,12 +241,24 @@ struct scsi_dh_data { | |||
235 | #define sdev_printk(prefix, sdev, fmt, a...) \ | 241 | #define sdev_printk(prefix, sdev, fmt, a...) \ |
236 | dev_printk(prefix, &(sdev)->sdev_gendev, fmt, ##a) | 242 | dev_printk(prefix, &(sdev)->sdev_gendev, fmt, ##a) |
237 | 243 | ||
244 | #define sdev_dbg(sdev, fmt, a...) \ | ||
245 | dev_dbg(&(sdev)->sdev_gendev, fmt, ##a) | ||
246 | |||
238 | #define scmd_printk(prefix, scmd, fmt, a...) \ | 247 | #define scmd_printk(prefix, scmd, fmt, a...) \ |
239 | (scmd)->request->rq_disk ? \ | 248 | (scmd)->request->rq_disk ? \ |
240 | sdev_printk(prefix, (scmd)->device, "[%s] " fmt, \ | 249 | sdev_printk(prefix, (scmd)->device, "[%s] " fmt, \ |
241 | (scmd)->request->rq_disk->disk_name, ##a) : \ | 250 | (scmd)->request->rq_disk->disk_name, ##a) : \ |
242 | sdev_printk(prefix, (scmd)->device, fmt, ##a) | 251 | sdev_printk(prefix, (scmd)->device, fmt, ##a) |
243 | 252 | ||
253 | #define scmd_dbg(scmd, fmt, a...) \ | ||
254 | do { \ | ||
255 | if ((scmd)->request->rq_disk) \ | ||
256 | sdev_dbg((scmd)->device, "[%s] " fmt, \ | ||
257 | (scmd)->request->rq_disk->disk_name, ##a);\ | ||
258 | else \ | ||
259 | sdev_dbg((scmd)->device, fmt, ##a); \ | ||
260 | } while (0) | ||
261 | |||
244 | enum scsi_target_state { | 262 | enum scsi_target_state { |
245 | STARGET_CREATED = 1, | 263 | STARGET_CREATED = 1, |
246 | STARGET_RUNNING, | 264 | STARGET_RUNNING, |
@@ -257,7 +275,7 @@ struct scsi_target { | |||
257 | struct list_head siblings; | 275 | struct list_head siblings; |
258 | struct list_head devices; | 276 | struct list_head devices; |
259 | struct device dev; | 277 | struct device dev; |
260 | unsigned int reap_ref; /* protected by the host lock */ | 278 | struct kref reap_ref; /* last put renders target invisible */ |
261 | unsigned int channel; | 279 | unsigned int channel; |
262 | unsigned int id; /* target id ... replace | 280 | unsigned int id; /* target id ... replace |
263 | * scsi_device.id eventually */ | 281 | * scsi_device.id eventually */ |
@@ -284,7 +302,6 @@ struct scsi_target { | |||
284 | #define SCSI_DEFAULT_TARGET_BLOCKED 3 | 302 | #define SCSI_DEFAULT_TARGET_BLOCKED 3 |
285 | 303 | ||
286 | char scsi_level; | 304 | char scsi_level; |
287 | struct execute_work ew; | ||
288 | enum scsi_target_state state; | 305 | enum scsi_target_state state; |
289 | void *hostdata; /* available to low-level driver */ | 306 | void *hostdata; /* available to low-level driver */ |
290 | unsigned long starget_data[0]; /* for the transport */ | 307 | unsigned long starget_data[0]; /* for the transport */ |
@@ -309,6 +326,7 @@ extern int scsi_add_device(struct Scsi_Host *host, uint channel, | |||
309 | extern int scsi_register_device_handler(struct scsi_device_handler *scsi_dh); | 326 | extern int scsi_register_device_handler(struct scsi_device_handler *scsi_dh); |
310 | extern void scsi_remove_device(struct scsi_device *); | 327 | extern void scsi_remove_device(struct scsi_device *); |
311 | extern int scsi_unregister_device_handler(struct scsi_device_handler *scsi_dh); | 328 | extern int scsi_unregister_device_handler(struct scsi_device_handler *scsi_dh); |
329 | void scsi_attach_vpd(struct scsi_device *sdev); | ||
312 | 330 | ||
313 | extern int scsi_device_get(struct scsi_device *); | 331 | extern int scsi_device_get(struct scsi_device *); |
314 | extern void scsi_device_put(struct scsi_device *); | 332 | extern void scsi_device_put(struct scsi_device *); |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 53075e5039e6..94844fc77b97 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -15,6 +15,7 @@ struct completion; | |||
15 | struct module; | 15 | struct module; |
16 | struct scsi_cmnd; | 16 | struct scsi_cmnd; |
17 | struct scsi_device; | 17 | struct scsi_device; |
18 | struct scsi_host_cmd_pool; | ||
18 | struct scsi_target; | 19 | struct scsi_target; |
19 | struct Scsi_Host; | 20 | struct Scsi_Host; |
20 | struct scsi_host_cmd_pool; | 21 | struct scsi_host_cmd_pool; |
@@ -524,6 +525,12 @@ struct scsi_host_template { | |||
524 | * scsi_netlink.h | 525 | * scsi_netlink.h |
525 | */ | 526 | */ |
526 | u64 vendor_id; | 527 | u64 vendor_id; |
528 | |||
529 | /* | ||
530 | * Additional per-command data allocated for the driver. | ||
531 | */ | ||
532 | unsigned int cmd_size; | ||
533 | struct scsi_host_cmd_pool *cmd_pool; | ||
527 | }; | 534 | }; |
528 | 535 | ||
529 | /* | 536 | /* |
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index b797e8fad669..8c79980dc8f2 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h | |||
@@ -130,6 +130,7 @@ enum fc_vport_state { | |||
130 | #define FC_PORTSPEED_4GBIT 8 | 130 | #define FC_PORTSPEED_4GBIT 8 |
131 | #define FC_PORTSPEED_8GBIT 0x10 | 131 | #define FC_PORTSPEED_8GBIT 0x10 |
132 | #define FC_PORTSPEED_16GBIT 0x20 | 132 | #define FC_PORTSPEED_16GBIT 0x20 |
133 | #define FC_PORTSPEED_32GBIT 0x40 | ||
133 | #define FC_PORTSPEED_NOT_NEGOTIATED (1 << 15) /* Speed not established */ | 134 | #define FC_PORTSPEED_NOT_NEGOTIATED (1 << 15) /* Speed not established */ |
134 | 135 | ||
135 | /* | 136 | /* |