aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fcoe
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/fcoe')
-rw-r--r--drivers/scsi/fcoe/fcoe.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index d1146994a1b5..6d6c8bf5d155 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -145,8 +145,8 @@ static struct notifier_block fcoe_cpu_notifier = {
145 .notifier_call = fcoe_cpu_callback, 145 .notifier_call = fcoe_cpu_callback,
146}; 146};
147 147
148static struct scsi_transport_template *fcoe_transport_template; 148static struct scsi_transport_template *fcoe_nport_scsi_transport;
149static struct scsi_transport_template *fcoe_vport_transport_template; 149static struct scsi_transport_template *fcoe_vport_scsi_transport;
150 150
151static int fcoe_vport_destroy(struct fc_vport *); 151static int fcoe_vport_destroy(struct fc_vport *);
152static int fcoe_vport_create(struct fc_vport *, bool disabled); 152static int fcoe_vport_create(struct fc_vport *, bool disabled);
@@ -163,7 +163,7 @@ static struct libfc_function_template fcoe_libfc_fcn_templ = {
163 .lport_set_port_id = fcoe_set_port_id, 163 .lport_set_port_id = fcoe_set_port_id,
164}; 164};
165 165
166struct fc_function_template fcoe_transport_function = { 166struct fc_function_template fcoe_nport_fc_functions = {
167 .show_host_node_name = 1, 167 .show_host_node_name = 1,
168 .show_host_port_name = 1, 168 .show_host_port_name = 1,
169 .show_host_supported_classes = 1, 169 .show_host_supported_classes = 1,
@@ -203,7 +203,7 @@ struct fc_function_template fcoe_transport_function = {
203 .bsg_request = fc_lport_bsg_request, 203 .bsg_request = fc_lport_bsg_request,
204}; 204};
205 205
206struct fc_function_template fcoe_vport_transport_function = { 206struct fc_function_template fcoe_vport_fc_functions = {
207 .show_host_node_name = 1, 207 .show_host_node_name = 1,
208 .show_host_port_name = 1, 208 .show_host_port_name = 1,
209 .show_host_supported_classes = 1, 209 .show_host_supported_classes = 1,
@@ -723,9 +723,9 @@ static int fcoe_shost_config(struct fc_lport *lport, struct device *dev)
723 lport->host->max_cmd_len = FCOE_MAX_CMD_LEN; 723 lport->host->max_cmd_len = FCOE_MAX_CMD_LEN;
724 724
725 if (lport->vport) 725 if (lport->vport)
726 lport->host->transportt = fcoe_vport_transport_template; 726 lport->host->transportt = fcoe_vport_scsi_transport;
727 else 727 else
728 lport->host->transportt = fcoe_transport_template; 728 lport->host->transportt = fcoe_nport_scsi_transport;
729 729
730 /* add the new host to the SCSI-ml */ 730 /* add the new host to the SCSI-ml */
731 rc = scsi_add_host(lport->host, dev); 731 rc = scsi_add_host(lport->host, dev);
@@ -1064,11 +1064,12 @@ out:
1064static int __init fcoe_if_init(void) 1064static int __init fcoe_if_init(void)
1065{ 1065{
1066 /* attach to scsi transport */ 1066 /* attach to scsi transport */
1067 fcoe_transport_template = fc_attach_transport(&fcoe_transport_function); 1067 fcoe_nport_scsi_transport =
1068 fcoe_vport_transport_template = 1068 fc_attach_transport(&fcoe_nport_fc_functions);
1069 fc_attach_transport(&fcoe_vport_transport_function); 1069 fcoe_vport_scsi_transport =
1070 fc_attach_transport(&fcoe_vport_fc_functions);
1070 1071
1071 if (!fcoe_transport_template) { 1072 if (!fcoe_nport_scsi_transport) {
1072 printk(KERN_ERR "fcoe: Failed to attach to the FC transport\n"); 1073 printk(KERN_ERR "fcoe: Failed to attach to the FC transport\n");
1073 return -ENODEV; 1074 return -ENODEV;
1074 } 1075 }
@@ -1085,10 +1086,10 @@ static int __init fcoe_if_init(void)
1085 */ 1086 */
1086int __exit fcoe_if_exit(void) 1087int __exit fcoe_if_exit(void)
1087{ 1088{
1088 fc_release_transport(fcoe_transport_template); 1089 fc_release_transport(fcoe_nport_scsi_transport);
1089 fc_release_transport(fcoe_vport_transport_template); 1090 fc_release_transport(fcoe_vport_scsi_transport);
1090 fcoe_transport_template = NULL; 1091 fcoe_nport_scsi_transport = NULL;
1091 fcoe_vport_transport_template = NULL; 1092 fcoe_vport_scsi_transport = NULL;
1092 return 0; 1093 return 0;
1093} 1094}
1094 1095