History

Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI updates from James Bottomley: "This consists of the usual driver updates (ufs, qla2xxx, tcmu, lpfc, hpsa, zfcp, scsi_debug) and minor bug fixes. We also have a huge docbook fix update like most other subsystems and no major update to the core (the few non trivial updates are either minor fixes or removing an unused feature [scsi_sdb_cache])" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (307 commits) scsi: scsi_transport_srp: Sanitize scsi_target_block/unblock sequences scsi: ufs-mediatek: Apply DELAY_AFTER_LPM quirk to Micron devices scsi: ufs: Introduce device quirk "DELAY_AFTER_LPM" scsi: virtio-scsi: Correctly handle the case where all LUNs are unplugged scsi: scsi_debug: Implement tur_ms_to_ready parameter scsi: scsi_debug: Fix request sense scsi: lpfc: Fix typo in comment for ULP scsi: ufs-mediatek: Prevent LPM operation on undeclared VCC scsi: iscsi: Do not put host in iscsi_set_flashnode_param() scsi: hpsa: Correct ctrl queue depth scsi: target: tcmu: Make TMR notification optional scsi: target: tcmu: Implement tmr_notify callback scsi: target: tcmu: Fix and simplify timeout handling scsi: target: tcmu: Factor out new helper ring_insert_padding scsi: target: tcmu: Do not queue aborted commands scsi: target: tcmu: Use priv pointer in se_cmd scsi: target: Add tmr_notify backend function scsi: target: Modify core_tmr_abort_task() scsi: target: iscsi: Fix inconsistent debug message scsi: target: iscsi: Fix login error when receiving ...

Linus Torvalds committed 6 years ago

Commit dfdf16e2 parents d7806bb bf1a28f221 files · +7777 −3384Browse files

Showing the changes to include (10 of 221 files). Show all

Unified · Split

10 files
  1. include/linux/qcom_scm.h +19 −0
  2. include/scsi/fc/fc_ms.h +2 −2
  3. include/scsi/scsi_tcq.h +1 −1
  4. include/scsi/scsi_transport_iscsi.h +1 −1
  5. include/target/iscsi/iscsi_target_core.h +5 −4
  6. include/target/target_core_backend.h +2 −0
  7. include/target/target_core_base.h +1 −0
  8. include/trace/events/ufs.h +31 −0
  9. include/uapi/linux/target_core_user.h +25 −0
  10. include/uapi/scsi/fc/fc_els.h +2 −0
include/linux/qcom_scm.h+19−0
@@ -44,6 +44,13 @@ enum qcom_scm_sec_dev_id { · 43 unmodified lines
4444 QCOM_SCM_ICE_DEV_ID = 20,
4545 };
4646
47+enum qcom_scm_ice_cipher {
48+ QCOM_SCM_ICE_CIPHER_AES_128_XTS = 0,
49+ QCOM_SCM_ICE_CIPHER_AES_128_CBC = 1,
50+ QCOM_SCM_ICE_CIPHER_AES_256_XTS = 3,
51+ QCOM_SCM_ICE_CIPHER_AES_256_CBC = 4,
52+};
53+
4754 #define QCOM_SCM_VMID_HLOS 0x3
4855 #define QCOM_SCM_VMID_MSS_MSA 0xF
4956 #define QCOM_SCM_VMID_WLAN 0x18
@@ -88,6 +95,12 @@ extern int qcom_scm_ocmem_lock(enum qcom_scm_ocmem_client id, u32 offset, · 38 unmodified lines
8895 extern int qcom_scm_ocmem_unlock(enum qcom_scm_ocmem_client id, u32 offset,
8996 u32 size);
9097
98+extern bool qcom_scm_ice_available(void);
99+extern int qcom_scm_ice_invalidate_key(u32 index);
100+extern int qcom_scm_ice_set_key(u32 index, const u8 *key, u32 key_size,
101+ enum qcom_scm_ice_cipher cipher,
102+ u32 data_unit_size);
103+
91104 extern bool qcom_scm_hdcp_available(void);
92105 extern int qcom_scm_hdcp_req(struct qcom_scm_hdcp_req *req, u32 req_cnt,
93106 u32 *resp);
@@ -138,6 +151,12 @@ static inline int qcom_scm_ocmem_lock(enum qcom_scm_ocmem_client id, u32 offset, · 44 unmodified lines
138151 static inline int qcom_scm_ocmem_unlock(enum qcom_scm_ocmem_client id,
139152 u32 offset, u32 size) { return -ENODEV; }
140153
154+static inline bool qcom_scm_ice_available(void) { return false; }
155+static inline int qcom_scm_ice_invalidate_key(u32 index) { return -ENODEV; }
156+static inline int qcom_scm_ice_set_key(u32 index, const u8 *key, u32 key_size,
157+ enum qcom_scm_ice_cipher cipher,
158+ u32 data_unit_size) { return -ENODEV; }
159+
141160 static inline bool qcom_scm_hdcp_available(void) { return false; }
142161 static inline int qcom_scm_hdcp_req(struct qcom_scm_hdcp_req *req, u32 req_cnt,
143162 u32 *resp) { return -ENODEV; }
include/scsi/fc/fc_ms.h+2−2
@@ -63,8 +63,8 @@ enum fc_fdmi_hba_attr_type { · 62 unmodified lines
6363 * HBA Attribute Length
6464 */
6565 #define FC_FDMI_HBA_ATTR_NODENAME_LEN 8
66−#define FC_FDMI_HBA_ATTR_MANUFACTURER_LEN 64
67−#define FC_FDMI_HBA_ATTR_SERIALNUMBER_LEN 64
66+#define FC_FDMI_HBA_ATTR_MANUFACTURER_LEN 80
67+#define FC_FDMI_HBA_ATTR_SERIALNUMBER_LEN 80
6868 #define FC_FDMI_HBA_ATTR_MODEL_LEN 256
6969 #define FC_FDMI_HBA_ATTR_MODELDESCR_LEN 256
7070 #define FC_FDMI_HBA_ATTR_HARDWAREVERSION_LEN 256
include/scsi/scsi_tcq.h+1−1
@@ -34,7 +34,7 @@ static inline struct scsi_cmnd *scsi_host_find_tag(struct Scsi_Host *shost, · 33 unmodified lines
3434 blk_mq_unique_tag_to_tag(tag));
3535 }
3636
37− if (!req)
37+ if (!req || !blk_mq_request_started(req))
3838 return NULL;
3939 return blk_mq_rq_to_pdu(req);
4040 }
include/scsi/scsi_transport_iscsi.h+1−1
@@ -57,7 +57,7 @@ struct iscsi_bus_flash_conn; · 56 unmodified lines
5757 * When not offloading the data path, this is called
5858 * from the scsi work queue without the session lock.
5959 * @xmit_task Requests LLD to transfer cmd task. Returns 0 or the
60− * the number of bytes transferred on success, and -Exyz
60+ * number of bytes transferred on success, and -Exyz
6161 * value on error. When offloading the data path, this
6262 * is called from queuecommand with the session lock, or
6363 * from the iscsi_conn_send_pdu context with the session
include/target/iscsi/iscsi_target_core.h+5−4
@@ -556,10 +556,11 @@ struct iscsi_conn { · 555 unmodified lines
556556 struct socket *sock;
557557 void (*orig_data_ready)(struct sock *);
558558 void (*orig_state_change)(struct sock *);
559−#define LOGIN_FLAGS_READ_ACTIVE 1
560−#define LOGIN_FLAGS_CLOSED 2
561−#define LOGIN_FLAGS_READY 4
562−#define LOGIN_FLAGS_INITIAL_PDU 8
559+#define LOGIN_FLAGS_READY 0
560+#define LOGIN_FLAGS_INITIAL_PDU 1
561+#define LOGIN_FLAGS_READ_ACTIVE 2
562+#define LOGIN_FLAGS_WRITE_ACTIVE 3
563+#define LOGIN_FLAGS_CLOSED 4
563564 unsigned long login_flags;
564565 struct delayed_work login_work;
565566 struct iscsi_login *login;
include/target/target_core_backend.h+2−0
@@ -40,6 +40,8 @@ struct target_backend_ops { · 39 unmodified lines
4040 ssize_t (*show_configfs_dev_params)(struct se_device *, char *);
4141
4242 sense_reason_t (*parse_cdb)(struct se_cmd *cmd);
43+ void (*tmr_notify)(struct se_device *se_dev, enum tcm_tmreq_table,
44+ struct list_head *aborted_cmds);
4345 u32 (*get_device_type)(struct se_device *);
4446 sector_t (*get_blocks)(struct se_device *);
4547 sector_t (*get_alignment_offset_lbas)(struct se_device *);
include/target/target_core_base.h+1−0
@@ -207,6 +207,7 @@ enum tcm_tmreq_table { · 206 unmodified lines
207207 TMR_LUN_RESET = 5,
208208 TMR_TARGET_WARM_RESET = 6,
209209 TMR_TARGET_COLD_RESET = 7,
210+ TMR_LUN_RESET_PRO = 0x80,
210211 TMR_UNKNOWN = 0xff,
211212 };
212213
include/trace/events/ufs.h+31−0
@@ -249,6 +249,37 @@ TRACE_EVENT(ufshcd_command, · 248 unmodified lines
249249 )
250250 );
251251
252+TRACE_EVENT(ufshcd_uic_command,
253+ TP_PROTO(const char *dev_name, const char *str, u32 cmd,
254+ u32 arg1, u32 arg2, u32 arg3),
255+
256+ TP_ARGS(dev_name, str, cmd, arg1, arg2, arg3),
257+
258+ TP_STRUCT__entry(
259+ __string(dev_name, dev_name)
260+ __string(str, str)
261+ __field(u32, cmd)
262+ __field(u32, arg1)
263+ __field(u32, arg2)
264+ __field(u32, arg3)
265+ ),
266+
267+ TP_fast_assign(
268+ __assign_str(dev_name, dev_name);
269+ __assign_str(str, str);
270+ __entry->cmd = cmd;
271+ __entry->arg1 = arg1;
272+ __entry->arg2 = arg2;
273+ __entry->arg3 = arg3;
274+ ),
275+
276+ TP_printk(
277+ "%s: %s: cmd: 0x%x, arg1: 0x%x, arg2: 0x%x, arg3: 0x%x",
278+ __get_str(str), __get_str(dev_name), __entry->cmd,
279+ __entry->arg1, __entry->arg2, __entry->arg3
280+ )
281+);
282+
252283 TRACE_EVENT(ufshcd_upiu,
253284 TP_PROTO(const char *dev_name, const char *str, void *hdr, void *tsf),
254285
include/uapi/linux/target_core_user.h+25−0
@@ -45,6 +45,7 @@ · 44 unmodified lines
4545 #define ALIGN_SIZE 64 /* Should be enough for most CPUs */
4646 #define TCMU_MAILBOX_FLAG_CAP_OOOC (1 << 0) /* Out-of-order completions */
4747 #define TCMU_MAILBOX_FLAG_CAP_READ_LEN (1 << 1) /* Read data length */
48+#define TCMU_MAILBOX_FLAG_CAP_TMR (1 << 2) /* TMR notifications */
4849
4950 struct tcmu_mailbox {
5051 __u16 version;
@@ -62,6 +63,7 @@ struct tcmu_mailbox { · 11 unmodified lines
6263 enum tcmu_opcode {
6364 TCMU_OP_PAD = 0,
6465 TCMU_OP_CMD,
66+ TCMU_OP_TMR,
6567 };
6668
6769 /*
@@ -128,6 +130,29 @@ struct tcmu_cmd_entry { · 60 unmodified lines
128130
129131 } __packed;
130132
133+struct tcmu_tmr_entry {
134+ struct tcmu_cmd_entry_hdr hdr;
135+
136+#define TCMU_TMR_UNKNOWN 0
137+#define TCMU_TMR_ABORT_TASK 1
138+#define TCMU_TMR_ABORT_TASK_SET 2
139+#define TCMU_TMR_CLEAR_ACA 3
140+#define TCMU_TMR_CLEAR_TASK_SET 4
141+#define TCMU_TMR_LUN_RESET 5
142+#define TCMU_TMR_TARGET_WARM_RESET 6
143+#define TCMU_TMR_TARGET_COLD_RESET 7
144+/* Pseudo reset due to received PR OUT */
145+#define TCMU_TMR_LUN_RESET_PRO 128
146+ __u8 tmr_type;
147+
148+ __u8 __pad1;
149+ __u16 __pad2;
150+ __u32 cmd_cnt;
151+ __u64 __pad3;
152+ __u64 __pad4;
153+ __u16 cmd_ids[0];
154+} __packed;
155+
131156 #define TCMU_OP_ALIGN_SIZE sizeof(__u64)
132157
133158 enum tcmu_genl_cmd {
include/uapi/scsi/fc/fc_els.h+2−0
@@ -41,6 +41,7 @@ enum fc_els_cmd { · 40 unmodified lines
4141 ELS_REC = 0x13, /* read exchange concise */
4242 ELS_SRR = 0x14, /* sequence retransmission request */
4343 ELS_FPIN = 0x16, /* Fabric Performance Impact Notification */
44+ ELS_RDP = 0x18, /* Read Diagnostic Parameters */
4445 ELS_RDF = 0x19, /* Register Diagnostic Functions */
4546 ELS_PRLI = 0x20, /* process login */
4647 ELS_PRLO = 0x21, /* process logout */
@@ -110,6 +111,7 @@ enum fc_els_cmd { · 63 unmodified lines
110111 [ELS_REC] = "REC", \
111112 [ELS_SRR] = "SRR", \
112113 [ELS_FPIN] = "FPIN", \
114+ [ELS_RDP] = "RDP", \
113115 [ELS_RDF] = "RDF", \
114116 [ELS_PRLI] = "PRLI", \
115117 [ELS_PRLO] = "PRLO", \