diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-12-22 12:57:02 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-12-22 12:57:02 -0500 |
commit | 4b7bd364700d9ac8372eff48832062b936d0793b (patch) | |
tree | 0dbf78c95456a0b02d07fcd473281f04a87e266d /include/scsi | |
parent | c0d8768af260e2cbb4bf659ae6094a262c86b085 (diff) | |
parent | 90a8a73c06cc32b609a880d48449d7083327e11a (diff) |
Merge branch 'master' into for-next
Conflicts:
MAINTAINERS
arch/arm/mach-omap2/pm24xx.c
drivers/scsi/bfa/bfa_fcpim.c
Needed to update to apply fixes for which the old branch was too
outdated.
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/libfc.h | 5 | ||||
-rw-r--r-- | include/scsi/libiscsi.h | 3 | ||||
-rw-r--r-- | include/scsi/libsas.h | 3 | ||||
-rw-r--r-- | include/scsi/osd_initiator.h | 16 | ||||
-rw-r--r-- | include/scsi/osd_protocol.h | 42 | ||||
-rw-r--r-- | include/scsi/osd_types.h | 5 | ||||
-rw-r--r-- | include/scsi/scsi_host.h | 23 |
7 files changed, 87 insertions, 10 deletions
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index 14be49b44e84..5c4c1678f7be 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h | |||
@@ -721,7 +721,7 @@ struct libfc_function_template { | |||
721 | * struct fc_disc - Discovery context | 721 | * struct fc_disc - Discovery context |
722 | * @retry_count: Number of retries | 722 | * @retry_count: Number of retries |
723 | * @pending: 1 if discovery is pending, 0 if not | 723 | * @pending: 1 if discovery is pending, 0 if not |
724 | * @requesting: 1 if discovery has been requested, 0 if not | 724 | * @requested: 1 if discovery has been requested, 0 if not |
725 | * @seq_count: Number of sequences used for discovery | 725 | * @seq_count: Number of sequences used for discovery |
726 | * @buf_len: Length of the discovery buffer | 726 | * @buf_len: Length of the discovery buffer |
727 | * @disc_id: Discovery ID | 727 | * @disc_id: Discovery ID |
@@ -1006,8 +1006,7 @@ void fc_fcp_destroy(struct fc_lport *); | |||
1006 | /* | 1006 | /* |
1007 | * SCSI INTERACTION LAYER | 1007 | * SCSI INTERACTION LAYER |
1008 | *****************************/ | 1008 | *****************************/ |
1009 | int fc_queuecommand(struct scsi_cmnd *, | 1009 | int fc_queuecommand(struct Scsi_Host *, struct scsi_cmnd *); |
1010 | void (*done)(struct scsi_cmnd *)); | ||
1011 | int fc_eh_abort(struct scsi_cmnd *); | 1010 | int fc_eh_abort(struct scsi_cmnd *); |
1012 | int fc_eh_device_reset(struct scsi_cmnd *); | 1011 | int fc_eh_device_reset(struct scsi_cmnd *); |
1013 | int fc_eh_host_reset(struct scsi_cmnd *); | 1012 | int fc_eh_host_reset(struct scsi_cmnd *); |
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index ae5196aae1a5..b81d969ddc67 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
@@ -341,8 +341,7 @@ extern int iscsi_eh_abort(struct scsi_cmnd *sc); | |||
341 | extern int iscsi_eh_recover_target(struct scsi_cmnd *sc); | 341 | extern int iscsi_eh_recover_target(struct scsi_cmnd *sc); |
342 | extern int iscsi_eh_session_reset(struct scsi_cmnd *sc); | 342 | extern int iscsi_eh_session_reset(struct scsi_cmnd *sc); |
343 | extern int iscsi_eh_device_reset(struct scsi_cmnd *sc); | 343 | extern int iscsi_eh_device_reset(struct scsi_cmnd *sc); |
344 | extern int iscsi_queuecommand(struct scsi_cmnd *sc, | 344 | extern int iscsi_queuecommand(struct Scsi_Host *h, struct scsi_cmnd *sc); |
345 | void (*done)(struct scsi_cmnd *)); | ||
346 | 345 | ||
347 | /* | 346 | /* |
348 | * iSCSI host helpers. | 347 | * iSCSI host helpers. |
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 3dec1949f69c..90ce527ecf3d 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
@@ -621,8 +621,7 @@ int sas_set_phy_speed(struct sas_phy *phy, | |||
621 | int sas_phy_enable(struct sas_phy *phy, int enabled); | 621 | int sas_phy_enable(struct sas_phy *phy, int enabled); |
622 | int sas_phy_reset(struct sas_phy *phy, int hard_reset); | 622 | int sas_phy_reset(struct sas_phy *phy, int hard_reset); |
623 | int sas_queue_up(struct sas_task *task); | 623 | int sas_queue_up(struct sas_task *task); |
624 | extern int sas_queuecommand(struct scsi_cmnd *, | 624 | extern int sas_queuecommand(struct Scsi_Host * ,struct scsi_cmnd *); |
625 | void (*scsi_done)(struct scsi_cmnd *)); | ||
626 | extern int sas_target_alloc(struct scsi_target *); | 625 | extern int sas_target_alloc(struct scsi_target *); |
627 | extern int sas_slave_alloc(struct scsi_device *); | 626 | extern int sas_slave_alloc(struct scsi_device *); |
628 | extern int sas_slave_configure(struct scsi_device *); | 627 | extern int sas_slave_configure(struct scsi_device *); |
diff --git a/include/scsi/osd_initiator.h b/include/scsi/osd_initiator.h index a8f370126632..53a9e886612b 100644 --- a/include/scsi/osd_initiator.h +++ b/include/scsi/osd_initiator.h | |||
@@ -137,7 +137,7 @@ struct osd_request { | |||
137 | void *buff; | 137 | void *buff; |
138 | unsigned alloc_size; /* 0 here means: don't call kfree */ | 138 | unsigned alloc_size; /* 0 here means: don't call kfree */ |
139 | unsigned total_bytes; | 139 | unsigned total_bytes; |
140 | } set_attr, enc_get_attr, get_attr; | 140 | } cdb_cont, set_attr, enc_get_attr, get_attr; |
141 | 141 | ||
142 | struct _osd_io_info { | 142 | struct _osd_io_info { |
143 | struct bio *bio; | 143 | struct bio *bio; |
@@ -448,6 +448,20 @@ void osd_req_read(struct osd_request *or, | |||
448 | int osd_req_read_kern(struct osd_request *or, | 448 | int osd_req_read_kern(struct osd_request *or, |
449 | const struct osd_obj_id *obj, u64 offset, void *buff, u64 len); | 449 | const struct osd_obj_id *obj, u64 offset, void *buff, u64 len); |
450 | 450 | ||
451 | /* Scatter/Gather write/read commands */ | ||
452 | int osd_req_write_sg(struct osd_request *or, | ||
453 | const struct osd_obj_id *obj, struct bio *bio, | ||
454 | const struct osd_sg_entry *sglist, unsigned numentries); | ||
455 | int osd_req_read_sg(struct osd_request *or, | ||
456 | const struct osd_obj_id *obj, struct bio *bio, | ||
457 | const struct osd_sg_entry *sglist, unsigned numentries); | ||
458 | int osd_req_write_sg_kern(struct osd_request *or, | ||
459 | const struct osd_obj_id *obj, void **buff, | ||
460 | const struct osd_sg_entry *sglist, unsigned numentries); | ||
461 | int osd_req_read_sg_kern(struct osd_request *or, | ||
462 | const struct osd_obj_id *obj, void **buff, | ||
463 | const struct osd_sg_entry *sglist, unsigned numentries); | ||
464 | |||
451 | /* | 465 | /* |
452 | * Root/Partition/Collection/Object Attributes commands | 466 | * Root/Partition/Collection/Object Attributes commands |
453 | */ | 467 | */ |
diff --git a/include/scsi/osd_protocol.h b/include/scsi/osd_protocol.h index 685661283540..a6026da25f3e 100644 --- a/include/scsi/osd_protocol.h +++ b/include/scsi/osd_protocol.h | |||
@@ -631,4 +631,46 @@ static inline void osd_sec_set_caps(struct osd_capability_head *cap, | |||
631 | put_unaligned_le16(bit_mask, &cap->permissions_bit_mask); | 631 | put_unaligned_le16(bit_mask, &cap->permissions_bit_mask); |
632 | } | 632 | } |
633 | 633 | ||
634 | /* osd2r05a sec 5.3: CDB continuation segment formats */ | ||
635 | enum osd_continuation_segment_format { | ||
636 | CDB_CONTINUATION_FORMAT_V2 = 0x01, | ||
637 | }; | ||
638 | |||
639 | struct osd_continuation_segment_header { | ||
640 | u8 format; | ||
641 | u8 reserved1; | ||
642 | __be16 service_action; | ||
643 | __be32 reserved2; | ||
644 | u8 integrity_check[OSDv2_CRYPTO_KEYID_SIZE]; | ||
645 | } __packed; | ||
646 | |||
647 | /* osd2r05a sec 5.4.1: CDB continuation descriptors */ | ||
648 | enum osd_continuation_descriptor_type { | ||
649 | NO_MORE_DESCRIPTORS = 0x0000, | ||
650 | SCATTER_GATHER_LIST = 0x0001, | ||
651 | QUERY_LIST = 0x0002, | ||
652 | USER_OBJECT = 0x0003, | ||
653 | COPY_USER_OBJECT_SOURCE = 0x0101, | ||
654 | EXTENSION_CAPABILITIES = 0xFFEE | ||
655 | }; | ||
656 | |||
657 | struct osd_continuation_descriptor_header { | ||
658 | __be16 type; | ||
659 | u8 reserved; | ||
660 | u8 pad_length; | ||
661 | __be32 length; | ||
662 | } __packed; | ||
663 | |||
664 | |||
665 | /* osd2r05a sec 5.4.2: Scatter/gather list */ | ||
666 | struct osd_sg_list_entry { | ||
667 | __be64 offset; | ||
668 | __be64 len; | ||
669 | }; | ||
670 | |||
671 | struct osd_sg_continuation_descriptor { | ||
672 | struct osd_continuation_descriptor_header hdr; | ||
673 | struct osd_sg_list_entry entries[]; | ||
674 | }; | ||
675 | |||
634 | #endif /* ndef __OSD_PROTOCOL_H__ */ | 676 | #endif /* ndef __OSD_PROTOCOL_H__ */ |
diff --git a/include/scsi/osd_types.h b/include/scsi/osd_types.h index 3f5e88cc75c0..bd0be7ed4bcf 100644 --- a/include/scsi/osd_types.h +++ b/include/scsi/osd_types.h | |||
@@ -37,4 +37,9 @@ struct osd_attr { | |||
37 | void *val_ptr; /* in network order */ | 37 | void *val_ptr; /* in network order */ |
38 | }; | 38 | }; |
39 | 39 | ||
40 | struct osd_sg_entry { | ||
41 | u64 offset; | ||
42 | u64 len; | ||
43 | }; | ||
44 | |||
40 | #endif /* ndef __OSD_TYPES_H__ */ | 45 | #endif /* ndef __OSD_TYPES_H__ */ |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index d0a6a845f204..e7e385842a38 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -127,8 +127,7 @@ struct scsi_host_template { | |||
127 | * | 127 | * |
128 | * STATUS: REQUIRED | 128 | * STATUS: REQUIRED |
129 | */ | 129 | */ |
130 | int (* queuecommand)(struct scsi_cmnd *, | 130 | int (* queuecommand)(struct Scsi_Host *, struct scsi_cmnd *); |
131 | void (*done)(struct scsi_cmnd *)); | ||
132 | 131 | ||
133 | /* | 132 | /* |
134 | * The transfer functions are used to queue a scsi command to | 133 | * The transfer functions are used to queue a scsi command to |
@@ -505,6 +504,25 @@ struct scsi_host_template { | |||
505 | }; | 504 | }; |
506 | 505 | ||
507 | /* | 506 | /* |
507 | * Temporary #define for host lock push down. Can be removed when all | ||
508 | * drivers have been updated to take advantage of unlocked | ||
509 | * queuecommand. | ||
510 | * | ||
511 | */ | ||
512 | #define DEF_SCSI_QCMD(func_name) \ | ||
513 | int func_name(struct Scsi_Host *shost, struct scsi_cmnd *cmd) \ | ||
514 | { \ | ||
515 | unsigned long irq_flags; \ | ||
516 | int rc; \ | ||
517 | spin_lock_irqsave(shost->host_lock, irq_flags); \ | ||
518 | scsi_cmd_get_serial(shost, cmd); \ | ||
519 | rc = func_name##_lck (cmd, cmd->scsi_done); \ | ||
520 | spin_unlock_irqrestore(shost->host_lock, irq_flags); \ | ||
521 | return rc; \ | ||
522 | } | ||
523 | |||
524 | |||
525 | /* | ||
508 | * shost state: If you alter this, you also need to alter scsi_sysfs.c | 526 | * shost state: If you alter this, you also need to alter scsi_sysfs.c |
509 | * (for the ascii descriptions) and the state model enforcer: | 527 | * (for the ascii descriptions) and the state model enforcer: |
510 | * scsi_host_set_state() | 528 | * scsi_host_set_state() |
@@ -752,6 +770,7 @@ extern struct Scsi_Host *scsi_host_get(struct Scsi_Host *); | |||
752 | extern void scsi_host_put(struct Scsi_Host *t); | 770 | extern void scsi_host_put(struct Scsi_Host *t); |
753 | extern struct Scsi_Host *scsi_host_lookup(unsigned short); | 771 | extern struct Scsi_Host *scsi_host_lookup(unsigned short); |
754 | extern const char *scsi_host_state_name(enum scsi_host_state); | 772 | extern const char *scsi_host_state_name(enum scsi_host_state); |
773 | extern void scsi_cmd_get_serial(struct Scsi_Host *, struct scsi_cmnd *); | ||
755 | 774 | ||
756 | extern u64 scsi_calculate_bounce_limit(struct Scsi_Host *); | 775 | extern u64 scsi_calculate_bounce_limit(struct Scsi_Host *); |
757 | 776 | ||