diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/bnx2fc/bnx2fc_hwi.c | 2 | ||||
-rw-r--r-- | drivers/scsi/libsas/sas_expander.c | 2 | ||||
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas.h | 2 | ||||
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_base.c | 14 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_target.c | 12 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 | ||||
-rw-r--r-- | drivers/scsi/scsi_transport_srp.c | 51 |
7 files changed, 43 insertions, 42 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c index 6d6eee42ac7d..ef60afa94d0e 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_hwi.c +++ b/drivers/scsi/bnx2fc/bnx2fc_hwi.c | |||
@@ -296,7 +296,7 @@ int bnx2fc_send_session_ofld_req(struct fcoe_port *port, | |||
296 | ofld_req3.flags |= (interface->vlan_enabled << | 296 | ofld_req3.flags |= (interface->vlan_enabled << |
297 | FCOE_KWQE_CONN_OFFLOAD3_B_VLAN_FLAG_SHIFT); | 297 | FCOE_KWQE_CONN_OFFLOAD3_B_VLAN_FLAG_SHIFT); |
298 | 298 | ||
299 | /* C2_VALID and ACK flags are not set as they are not suppported */ | 299 | /* C2_VALID and ACK flags are not set as they are not supported */ |
300 | 300 | ||
301 | 301 | ||
302 | /* Initialize offload request 4 structure */ | 302 | /* Initialize offload request 4 structure */ |
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index efc6e72f09f3..aec2e0da5016 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c | |||
@@ -1800,7 +1800,7 @@ out: | |||
1800 | * @dev:domain device to be detect. | 1800 | * @dev:domain device to be detect. |
1801 | * @src_dev: the device which originated BROADCAST(CHANGE). | 1801 | * @src_dev: the device which originated BROADCAST(CHANGE). |
1802 | * | 1802 | * |
1803 | * Add self-configuration expander suport. Suppose two expander cascading, | 1803 | * Add self-configuration expander support. Suppose two expander cascading, |
1804 | * when the first level expander is self-configuring, hotplug the disks in | 1804 | * when the first level expander is self-configuring, hotplug the disks in |
1805 | * second level expander, BROADCAST(CHANGE) will not only be originated | 1805 | * second level expander, BROADCAST(CHANGE) will not only be originated |
1806 | * in the second level expander, but also be originated in the first level | 1806 | * in the second level expander, but also be originated in the first level |
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index 16b7a72a70c4..3b2365c8eab2 100644 --- a/drivers/scsi/megaraid/megaraid_sas.h +++ b/drivers/scsi/megaraid/megaraid_sas.h | |||
@@ -1276,7 +1276,7 @@ struct megasas_evt_detail { | |||
1276 | } __attribute__ ((packed)); | 1276 | } __attribute__ ((packed)); |
1277 | 1277 | ||
1278 | struct megasas_aen_event { | 1278 | struct megasas_aen_event { |
1279 | struct work_struct hotplug_work; | 1279 | struct delayed_work hotplug_work; |
1280 | struct megasas_instance *instance; | 1280 | struct megasas_instance *instance; |
1281 | }; | 1281 | }; |
1282 | 1282 | ||
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index d2c5366aff7f..e4f2baacf1e1 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c | |||
@@ -2060,9 +2060,9 @@ megasas_service_aen(struct megasas_instance *instance, struct megasas_cmd *cmd) | |||
2060 | } else { | 2060 | } else { |
2061 | ev->instance = instance; | 2061 | ev->instance = instance; |
2062 | instance->ev = ev; | 2062 | instance->ev = ev; |
2063 | INIT_WORK(&ev->hotplug_work, megasas_aen_polling); | 2063 | INIT_DELAYED_WORK(&ev->hotplug_work, |
2064 | schedule_delayed_work( | 2064 | megasas_aen_polling); |
2065 | (struct delayed_work *)&ev->hotplug_work, 0); | 2065 | schedule_delayed_work(&ev->hotplug_work, 0); |
2066 | } | 2066 | } |
2067 | } | 2067 | } |
2068 | } | 2068 | } |
@@ -4352,8 +4352,7 @@ megasas_suspend(struct pci_dev *pdev, pm_message_t state) | |||
4352 | /* cancel the delayed work if this work still in queue */ | 4352 | /* cancel the delayed work if this work still in queue */ |
4353 | if (instance->ev != NULL) { | 4353 | if (instance->ev != NULL) { |
4354 | struct megasas_aen_event *ev = instance->ev; | 4354 | struct megasas_aen_event *ev = instance->ev; |
4355 | cancel_delayed_work_sync( | 4355 | cancel_delayed_work_sync(&ev->hotplug_work); |
4356 | (struct delayed_work *)&ev->hotplug_work); | ||
4357 | instance->ev = NULL; | 4356 | instance->ev = NULL; |
4358 | } | 4357 | } |
4359 | 4358 | ||
@@ -4545,8 +4544,7 @@ static void __devexit megasas_detach_one(struct pci_dev *pdev) | |||
4545 | /* cancel the delayed work if this work still in queue*/ | 4544 | /* cancel the delayed work if this work still in queue*/ |
4546 | if (instance->ev != NULL) { | 4545 | if (instance->ev != NULL) { |
4547 | struct megasas_aen_event *ev = instance->ev; | 4546 | struct megasas_aen_event *ev = instance->ev; |
4548 | cancel_delayed_work_sync( | 4547 | cancel_delayed_work_sync(&ev->hotplug_work); |
4549 | (struct delayed_work *)&ev->hotplug_work); | ||
4550 | instance->ev = NULL; | 4548 | instance->ev = NULL; |
4551 | } | 4549 | } |
4552 | 4550 | ||
@@ -5190,7 +5188,7 @@ static void | |||
5190 | megasas_aen_polling(struct work_struct *work) | 5188 | megasas_aen_polling(struct work_struct *work) |
5191 | { | 5189 | { |
5192 | struct megasas_aen_event *ev = | 5190 | struct megasas_aen_event *ev = |
5193 | container_of(work, struct megasas_aen_event, hotplug_work); | 5191 | container_of(work, struct megasas_aen_event, hotplug_work.work); |
5194 | struct megasas_instance *instance = ev->instance; | 5192 | struct megasas_instance *instance = ev->instance; |
5195 | union megasas_evt_class_locale class_locale; | 5193 | union megasas_evt_class_locale class_locale; |
5196 | struct Scsi_Host *host; | 5194 | struct Scsi_Host *host; |
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index dc98ec9b1b7a..ad1dc14bacce 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c | |||
@@ -73,7 +73,7 @@ enum fcp_resp_rsp_codes { | |||
73 | #define FCP_PTA_SIMPLE 0 /* simple task attribute */ | 73 | #define FCP_PTA_SIMPLE 0 /* simple task attribute */ |
74 | #define FCP_PTA_HEADQ 1 /* head of queue task attribute */ | 74 | #define FCP_PTA_HEADQ 1 /* head of queue task attribute */ |
75 | #define FCP_PTA_ORDERED 2 /* ordered task attribute */ | 75 | #define FCP_PTA_ORDERED 2 /* ordered task attribute */ |
76 | #define FCP_PTA_ACA 4 /* auto. contigent allegiance */ | 76 | #define FCP_PTA_ACA 4 /* auto. contingent allegiance */ |
77 | #define FCP_PTA_MASK 7 /* mask for task attribute field */ | 77 | #define FCP_PTA_MASK 7 /* mask for task attribute field */ |
78 | #define FCP_PRI_SHIFT 3 /* priority field starts in bit 3 */ | 78 | #define FCP_PRI_SHIFT 3 /* priority field starts in bit 3 */ |
79 | #define FCP_PRI_RESVD_MASK 0x80 /* reserved bits in priority field */ | 79 | #define FCP_PRI_RESVD_MASK 0x80 /* reserved bits in priority field */ |
@@ -3980,7 +3980,7 @@ void qlt_async_event(uint16_t code, struct scsi_qla_host *vha, | |||
3980 | case MBA_RSP_TRANSFER_ERR: /* Response Transfer Error */ | 3980 | case MBA_RSP_TRANSFER_ERR: /* Response Transfer Error */ |
3981 | ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03a, | 3981 | ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03a, |
3982 | "qla_target(%d): System error async event %#x " | 3982 | "qla_target(%d): System error async event %#x " |
3983 | "occured", vha->vp_idx, code); | 3983 | "occurred", vha->vp_idx, code); |
3984 | break; | 3984 | break; |
3985 | case MBA_WAKEUP_THRES: /* Request Queue Wake-up. */ | 3985 | case MBA_WAKEUP_THRES: /* Request Queue Wake-up. */ |
3986 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | 3986 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); |
@@ -3989,7 +3989,7 @@ void qlt_async_event(uint16_t code, struct scsi_qla_host *vha, | |||
3989 | case MBA_LOOP_UP: | 3989 | case MBA_LOOP_UP: |
3990 | { | 3990 | { |
3991 | ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03b, | 3991 | ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03b, |
3992 | "qla_target(%d): Async LOOP_UP occured " | 3992 | "qla_target(%d): Async LOOP_UP occurred " |
3993 | "(m[0]=%x, m[1]=%x, m[2]=%x, m[3]=%x)", vha->vp_idx, | 3993 | "(m[0]=%x, m[1]=%x, m[2]=%x, m[3]=%x)", vha->vp_idx, |
3994 | le16_to_cpu(mailbox[0]), le16_to_cpu(mailbox[1]), | 3994 | le16_to_cpu(mailbox[0]), le16_to_cpu(mailbox[1]), |
3995 | le16_to_cpu(mailbox[2]), le16_to_cpu(mailbox[3])); | 3995 | le16_to_cpu(mailbox[2]), le16_to_cpu(mailbox[3])); |
@@ -4006,7 +4006,7 @@ void qlt_async_event(uint16_t code, struct scsi_qla_host *vha, | |||
4006 | case MBA_LIP_RESET: | 4006 | case MBA_LIP_RESET: |
4007 | case MBA_RSCN_UPDATE: | 4007 | case MBA_RSCN_UPDATE: |
4008 | ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03c, | 4008 | ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03c, |
4009 | "qla_target(%d): Async event %#x occured " | 4009 | "qla_target(%d): Async event %#x occurred " |
4010 | "(m[0]=%x, m[1]=%x, m[2]=%x, m[3]=%x)", vha->vp_idx, code, | 4010 | "(m[0]=%x, m[1]=%x, m[2]=%x, m[3]=%x)", vha->vp_idx, code, |
4011 | le16_to_cpu(mailbox[0]), le16_to_cpu(mailbox[1]), | 4011 | le16_to_cpu(mailbox[0]), le16_to_cpu(mailbox[1]), |
4012 | le16_to_cpu(mailbox[2]), le16_to_cpu(mailbox[3])); | 4012 | le16_to_cpu(mailbox[2]), le16_to_cpu(mailbox[3])); |
@@ -4015,7 +4015,7 @@ void qlt_async_event(uint16_t code, struct scsi_qla_host *vha, | |||
4015 | case MBA_PORT_UPDATE: | 4015 | case MBA_PORT_UPDATE: |
4016 | ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03d, | 4016 | ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03d, |
4017 | "qla_target(%d): Port update async event %#x " | 4017 | "qla_target(%d): Port update async event %#x " |
4018 | "occured: updating the ports database (m[0]=%x, m[1]=%x, " | 4018 | "occurred: updating the ports database (m[0]=%x, m[1]=%x, " |
4019 | "m[2]=%x, m[3]=%x)", vha->vp_idx, code, | 4019 | "m[2]=%x, m[3]=%x)", vha->vp_idx, code, |
4020 | le16_to_cpu(mailbox[0]), le16_to_cpu(mailbox[1]), | 4020 | le16_to_cpu(mailbox[0]), le16_to_cpu(mailbox[1]), |
4021 | le16_to_cpu(mailbox[2]), le16_to_cpu(mailbox[3])); | 4021 | le16_to_cpu(mailbox[2]), le16_to_cpu(mailbox[3])); |
@@ -4031,7 +4031,7 @@ void qlt_async_event(uint16_t code, struct scsi_qla_host *vha, | |||
4031 | 4031 | ||
4032 | default: | 4032 | default: |
4033 | ql_dbg(ql_dbg_tgt_mgt, vha, 0xf040, | 4033 | ql_dbg(ql_dbg_tgt_mgt, vha, 0xf040, |
4034 | "qla_target(%d): Async event %#x occured: " | 4034 | "qla_target(%d): Async event %#x occurred: " |
4035 | "ignore (m[0]=%x, m[1]=%x, m[2]=%x, m[3]=%x)", vha->vp_idx, | 4035 | "ignore (m[0]=%x, m[1]=%x, m[2]=%x, m[3]=%x)", vha->vp_idx, |
4036 | code, le16_to_cpu(mailbox[0]), le16_to_cpu(mailbox[1]), | 4036 | code, le16_to_cpu(mailbox[0]), le16_to_cpu(mailbox[1]), |
4037 | le16_to_cpu(mailbox[2]), le16_to_cpu(mailbox[3])); | 4037 | le16_to_cpu(mailbox[2]), le16_to_cpu(mailbox[3])); |
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c index 3d74f2f39ae1..4372e32bc95f 100644 --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c | |||
@@ -367,7 +367,7 @@ static struct se_node_acl *tcm_qla2xxx_alloc_fabric_acl( | |||
367 | 367 | ||
368 | nacl = kzalloc(sizeof(struct tcm_qla2xxx_nacl), GFP_KERNEL); | 368 | nacl = kzalloc(sizeof(struct tcm_qla2xxx_nacl), GFP_KERNEL); |
369 | if (!nacl) { | 369 | if (!nacl) { |
370 | pr_err("Unable to alocate struct tcm_qla2xxx_nacl\n"); | 370 | pr_err("Unable to allocate struct tcm_qla2xxx_nacl\n"); |
371 | return NULL; | 371 | return NULL; |
372 | } | 372 | } |
373 | 373 | ||
diff --git a/drivers/scsi/scsi_transport_srp.c b/drivers/scsi/scsi_transport_srp.c index 21a045e0559f..f379c7f3034c 100644 --- a/drivers/scsi/scsi_transport_srp.c +++ b/drivers/scsi/scsi_transport_srp.c | |||
@@ -38,7 +38,7 @@ struct srp_host_attrs { | |||
38 | #define to_srp_host_attrs(host) ((struct srp_host_attrs *)(host)->shost_data) | 38 | #define to_srp_host_attrs(host) ((struct srp_host_attrs *)(host)->shost_data) |
39 | 39 | ||
40 | #define SRP_HOST_ATTRS 0 | 40 | #define SRP_HOST_ATTRS 0 |
41 | #define SRP_RPORT_ATTRS 2 | 41 | #define SRP_RPORT_ATTRS 3 |
42 | 42 | ||
43 | struct srp_internal { | 43 | struct srp_internal { |
44 | struct scsi_transport_template t; | 44 | struct scsi_transport_template t; |
@@ -47,7 +47,6 @@ struct srp_internal { | |||
47 | struct device_attribute *host_attrs[SRP_HOST_ATTRS + 1]; | 47 | struct device_attribute *host_attrs[SRP_HOST_ATTRS + 1]; |
48 | 48 | ||
49 | struct device_attribute *rport_attrs[SRP_RPORT_ATTRS + 1]; | 49 | struct device_attribute *rport_attrs[SRP_RPORT_ATTRS + 1]; |
50 | struct device_attribute private_rport_attrs[SRP_RPORT_ATTRS]; | ||
51 | struct transport_container rport_attr_cont; | 50 | struct transport_container rport_attr_cont; |
52 | }; | 51 | }; |
53 | 52 | ||
@@ -72,24 +71,6 @@ static DECLARE_TRANSPORT_CLASS(srp_host_class, "srp_host", srp_host_setup, | |||
72 | static DECLARE_TRANSPORT_CLASS(srp_rport_class, "srp_remote_ports", | 71 | static DECLARE_TRANSPORT_CLASS(srp_rport_class, "srp_remote_ports", |
73 | NULL, NULL, NULL); | 72 | NULL, NULL, NULL); |
74 | 73 | ||
75 | #define SETUP_TEMPLATE(attrb, field, perm, test, ro_test, ro_perm) \ | ||
76 | i->private_##attrb[count] = dev_attr_##field; \ | ||
77 | i->private_##attrb[count].attr.mode = perm; \ | ||
78 | if (ro_test) { \ | ||
79 | i->private_##attrb[count].attr.mode = ro_perm; \ | ||
80 | i->private_##attrb[count].store = NULL; \ | ||
81 | } \ | ||
82 | i->attrb[count] = &i->private_##attrb[count]; \ | ||
83 | if (test) \ | ||
84 | count++ | ||
85 | |||
86 | #define SETUP_RPORT_ATTRIBUTE_RD(field) \ | ||
87 | SETUP_TEMPLATE(rport_attrs, field, S_IRUGO, 1, 0, 0) | ||
88 | |||
89 | #define SETUP_RPORT_ATTRIBUTE_RW(field) \ | ||
90 | SETUP_TEMPLATE(rport_attrs, field, S_IRUGO | S_IWUSR, \ | ||
91 | 1, 1, S_IRUGO) | ||
92 | |||
93 | #define SRP_PID(p) \ | 74 | #define SRP_PID(p) \ |
94 | (p)->port_id[0], (p)->port_id[1], (p)->port_id[2], (p)->port_id[3], \ | 75 | (p)->port_id[0], (p)->port_id[1], (p)->port_id[2], (p)->port_id[3], \ |
95 | (p)->port_id[4], (p)->port_id[5], (p)->port_id[6], (p)->port_id[7], \ | 76 | (p)->port_id[4], (p)->port_id[5], (p)->port_id[6], (p)->port_id[7], \ |
@@ -135,6 +116,24 @@ show_srp_rport_roles(struct device *dev, struct device_attribute *attr, | |||
135 | 116 | ||
136 | static DEVICE_ATTR(roles, S_IRUGO, show_srp_rport_roles, NULL); | 117 | static DEVICE_ATTR(roles, S_IRUGO, show_srp_rport_roles, NULL); |
137 | 118 | ||
119 | static ssize_t store_srp_rport_delete(struct device *dev, | ||
120 | struct device_attribute *attr, | ||
121 | const char *buf, size_t count) | ||
122 | { | ||
123 | struct srp_rport *rport = transport_class_to_srp_rport(dev); | ||
124 | struct Scsi_Host *shost = dev_to_shost(dev); | ||
125 | struct srp_internal *i = to_srp_internal(shost->transportt); | ||
126 | |||
127 | if (i->f->rport_delete) { | ||
128 | i->f->rport_delete(rport); | ||
129 | return count; | ||
130 | } else { | ||
131 | return -ENOSYS; | ||
132 | } | ||
133 | } | ||
134 | |||
135 | static DEVICE_ATTR(delete, S_IWUSR, NULL, store_srp_rport_delete); | ||
136 | |||
138 | static void srp_rport_release(struct device *dev) | 137 | static void srp_rport_release(struct device *dev) |
139 | { | 138 | { |
140 | struct srp_rport *rport = dev_to_rport(dev); | 139 | struct srp_rport *rport = dev_to_rport(dev); |
@@ -324,12 +323,16 @@ srp_attach_transport(struct srp_function_template *ft) | |||
324 | i->rport_attr_cont.ac.attrs = &i->rport_attrs[0]; | 323 | i->rport_attr_cont.ac.attrs = &i->rport_attrs[0]; |
325 | i->rport_attr_cont.ac.class = &srp_rport_class.class; | 324 | i->rport_attr_cont.ac.class = &srp_rport_class.class; |
326 | i->rport_attr_cont.ac.match = srp_rport_match; | 325 | i->rport_attr_cont.ac.match = srp_rport_match; |
327 | transport_container_register(&i->rport_attr_cont); | ||
328 | 326 | ||
329 | count = 0; | 327 | count = 0; |
330 | SETUP_RPORT_ATTRIBUTE_RD(port_id); | 328 | i->rport_attrs[count++] = &dev_attr_port_id; |
331 | SETUP_RPORT_ATTRIBUTE_RD(roles); | 329 | i->rport_attrs[count++] = &dev_attr_roles; |
332 | i->rport_attrs[count] = NULL; | 330 | if (ft->rport_delete) |
331 | i->rport_attrs[count++] = &dev_attr_delete; | ||
332 | i->rport_attrs[count++] = NULL; | ||
333 | BUG_ON(count > ARRAY_SIZE(i->rport_attrs)); | ||
334 | |||
335 | transport_container_register(&i->rport_attr_cont); | ||
333 | 336 | ||
334 | i->f = ft; | 337 | i->f = ft; |
335 | 338 | ||