blob: 47c9ecfc1d8f04781ef86b074f8ee8862d36b4ae [file] [log] [blame]
8482e1182005-04-17 15:04:54 -05001/*
2 * QLOGIC LINUX SOFTWARE
3 *
4 * QLogic ISP2x00 device driver for Linux 2.6.x
5 * Copyright (C) 2003-2005 QLogic Corporation
6 * (www.qlogic.com)
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2, or (at your option) any
11 * later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 */
19#include "qla_def.h"
20
7aaef272005-04-17 16:32:42 -050021#include <linux/vmalloc.h>
8482e1182005-04-17 15:04:54 -050022#include <scsi/scsi_transport_fc.h>
23
24/* SYSFS attributes --------------------------------------------------------- */
25
26static ssize_t
27qla2x00_sysfs_read_fw_dump(struct kobject *kobj, char *buf, loff_t off,
28 size_t count)
29{
30 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
31 struct device, kobj)));
32
33 if (ha->fw_dump_reading == 0)
34 return 0;
35 if (off > ha->fw_dump_buffer_len)
36 return 0;
37 if (off + count > ha->fw_dump_buffer_len)
38 count = ha->fw_dump_buffer_len - off;
39
40 memcpy(buf, &ha->fw_dump_buffer[off], count);
41
42 return (count);
43}
44
45static ssize_t
46qla2x00_sysfs_write_fw_dump(struct kobject *kobj, char *buf, loff_t off,
47 size_t count)
48{
49 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
50 struct device, kobj)));
51 int reading;
52 uint32_t dump_size;
53
54 if (off != 0)
55 return (0);
56
57 reading = simple_strtol(buf, NULL, 10);
58 switch (reading) {
59 case 0:
60 if (ha->fw_dump_reading == 1) {
61 qla_printk(KERN_INFO, ha,
62 "Firmware dump cleared on (%ld).\n",
63 ha->host_no);
64
65 vfree(ha->fw_dump_buffer);
Andrew Vasquezfca29702005-07-06 10:31:47 -070066 if (!IS_QLA24XX(ha) && !IS_QLA25XX(ha))
67 free_pages((unsigned long)ha->fw_dump,
68 ha->fw_dump_order);
8482e1182005-04-17 15:04:54 -050069
70 ha->fw_dump_reading = 0;
71 ha->fw_dump_buffer = NULL;
72 ha->fw_dump = NULL;
Andrew Vasquezfca29702005-07-06 10:31:47 -070073 ha->fw_dumped = 0;
8482e1182005-04-17 15:04:54 -050074 }
75 break;
76 case 1:
Andrew Vasquezfca29702005-07-06 10:31:47 -070077 if ((ha->fw_dump || ha->fw_dumped) && !ha->fw_dump_reading) {
8482e1182005-04-17 15:04:54 -050078 ha->fw_dump_reading = 1;
79
Andrew Vasquezfca29702005-07-06 10:31:47 -070080 if (IS_QLA24XX(ha) || IS_QLA25XX(ha))
81 dump_size = FW_DUMP_SIZE_24XX;
82 else {
83 dump_size = FW_DUMP_SIZE_1M;
84 if (ha->fw_memory_size < 0x20000)
85 dump_size = FW_DUMP_SIZE_128K;
86 else if (ha->fw_memory_size < 0x80000)
87 dump_size = FW_DUMP_SIZE_512K;
88 }
8482e1182005-04-17 15:04:54 -050089 ha->fw_dump_buffer = (char *)vmalloc(dump_size);
90 if (ha->fw_dump_buffer == NULL) {
91 qla_printk(KERN_WARNING, ha,
92 "Unable to allocate memory for firmware "
93 "dump buffer (%d).\n", dump_size);
94
95 ha->fw_dump_reading = 0;
96 return (count);
97 }
98 qla_printk(KERN_INFO, ha,
99 "Firmware dump ready for read on (%ld).\n",
100 ha->host_no);
101 memset(ha->fw_dump_buffer, 0, dump_size);
Andrew Vasquezabbd8872005-07-06 10:30:05 -0700102 ha->isp_ops.ascii_fw_dump(ha);
8482e1182005-04-17 15:04:54 -0500103 ha->fw_dump_buffer_len = strlen(ha->fw_dump_buffer);
104 }
105 break;
106 }
107 return (count);
108}
109
110static struct bin_attribute sysfs_fw_dump_attr = {
111 .attr = {
112 .name = "fw_dump",
113 .mode = S_IRUSR | S_IWUSR,
114 .owner = THIS_MODULE,
115 },
116 .size = 0,
117 .read = qla2x00_sysfs_read_fw_dump,
118 .write = qla2x00_sysfs_write_fw_dump,
119};
120
121static ssize_t
122qla2x00_sysfs_read_nvram(struct kobject *kobj, char *buf, loff_t off,
123 size_t count)
124{
125 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
126 struct device, kobj)));
8482e1182005-04-17 15:04:54 -0500127 unsigned long flags;
8482e1182005-04-17 15:04:54 -0500128
Andrew Vasquez459c5372005-07-06 10:31:07 -0700129 if (!capable(CAP_SYS_ADMIN) || off != 0 || count != ha->nvram_size)
8482e1182005-04-17 15:04:54 -0500130 return 0;
131
132 /* Read NVRAM. */
133 spin_lock_irqsave(&ha->hardware_lock, flags);
Andrew Vasquez459c5372005-07-06 10:31:07 -0700134 ha->isp_ops.read_nvram(ha, (uint8_t *)buf, ha->nvram_base,
135 ha->nvram_size);
8482e1182005-04-17 15:04:54 -0500136 spin_unlock_irqrestore(&ha->hardware_lock, flags);
137
138 return (count);
139}
140
141static ssize_t
142qla2x00_sysfs_write_nvram(struct kobject *kobj, char *buf, loff_t off,
143 size_t count)
144{
145 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
146 struct device, kobj)));
8482e1182005-04-17 15:04:54 -0500147 unsigned long flags;
148 uint16_t cnt;
8482e1182005-04-17 15:04:54 -0500149
Andrew Vasquez459c5372005-07-06 10:31:07 -0700150 if (!capable(CAP_SYS_ADMIN) || off != 0 || count != ha->nvram_size)
8482e1182005-04-17 15:04:54 -0500151 return 0;
152
153 /* Checksum NVRAM. */
Andrew Vasquez459c5372005-07-06 10:31:07 -0700154 if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) {
155 uint32_t *iter;
156 uint32_t chksum;
157
158 iter = (uint32_t *)buf;
159 chksum = 0;
160 for (cnt = 0; cnt < ((count >> 2) - 1); cnt++)
161 chksum += le32_to_cpu(*iter++);
162 chksum = ~chksum + 1;
163 *iter = cpu_to_le32(chksum);
164 } else {
165 uint8_t *iter;
166 uint8_t chksum;
167
168 iter = (uint8_t *)buf;
169 chksum = 0;
170 for (cnt = 0; cnt < count - 1; cnt++)
171 chksum += *iter++;
172 chksum = ~chksum + 1;
173 *iter = chksum;
174 }
8482e1182005-04-17 15:04:54 -0500175
176 /* Write NVRAM. */
177 spin_lock_irqsave(&ha->hardware_lock, flags);
Andrew Vasquez459c5372005-07-06 10:31:07 -0700178 ha->isp_ops.write_nvram(ha, (uint8_t *)buf, ha->nvram_base, count);
8482e1182005-04-17 15:04:54 -0500179 spin_unlock_irqrestore(&ha->hardware_lock, flags);
180
181 return (count);
182}
183
184static struct bin_attribute sysfs_nvram_attr = {
185 .attr = {
186 .name = "nvram",
187 .mode = S_IRUSR | S_IWUSR,
188 .owner = THIS_MODULE,
189 },
Andrew Vasquez459c5372005-07-06 10:31:07 -0700190 .size = 0,
8482e1182005-04-17 15:04:54 -0500191 .read = qla2x00_sysfs_read_nvram,
192 .write = qla2x00_sysfs_write_nvram,
193};
194
195void
196qla2x00_alloc_sysfs_attr(scsi_qla_host_t *ha)
197{
198 struct Scsi_Host *host = ha->host;
199
200 sysfs_create_bin_file(&host->shost_gendev.kobj, &sysfs_fw_dump_attr);
Andrew Vasquez459c5372005-07-06 10:31:07 -0700201 sysfs_nvram_attr.size = ha->nvram_size;
8482e1182005-04-17 15:04:54 -0500202 sysfs_create_bin_file(&host->shost_gendev.kobj, &sysfs_nvram_attr);
203}
204
205void
206qla2x00_free_sysfs_attr(scsi_qla_host_t *ha)
207{
208 struct Scsi_Host *host = ha->host;
209
210 sysfs_remove_bin_file(&host->shost_gendev.kobj, &sysfs_fw_dump_attr);
211 sysfs_remove_bin_file(&host->shost_gendev.kobj, &sysfs_nvram_attr);
212}
213
Andrew Vasquezafb046e2005-08-26 19:09:40 -0700214/* Scsi_Host attributes. */
215
216static ssize_t
217qla2x00_drvr_version_show(struct class_device *cdev, char *buf)
218{
219 return snprintf(buf, PAGE_SIZE, "%s\n", qla2x00_version_str);
220}
221
222static ssize_t
223qla2x00_fw_version_show(struct class_device *cdev, char *buf)
224{
225 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
226 char fw_str[30];
227
228 return snprintf(buf, PAGE_SIZE, "%s\n",
229 ha->isp_ops.fw_version_str(ha, fw_str));
230}
231
232static ssize_t
233qla2x00_serial_num_show(struct class_device *cdev, char *buf)
234{
235 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
236 uint32_t sn;
237
238 sn = ((ha->serial0 & 0x1f) << 16) | (ha->serial2 << 8) | ha->serial1;
239 return snprintf(buf, PAGE_SIZE, "%c%05d\n", 'A' + sn / 100000,
240 sn % 100000);
241}
242
243static ssize_t
244qla2x00_isp_name_show(struct class_device *cdev, char *buf)
245{
246 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
247 return snprintf(buf, PAGE_SIZE, "%s\n", ha->brd_info->isp_name);
248}
249
250static ssize_t
251qla2x00_isp_id_show(struct class_device *cdev, char *buf)
252{
253 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
254 return snprintf(buf, PAGE_SIZE, "%04x %04x %04x %04x\n",
255 ha->product_id[0], ha->product_id[1], ha->product_id[2],
256 ha->product_id[3]);
257}
258
259static ssize_t
260qla2x00_model_name_show(struct class_device *cdev, char *buf)
261{
262 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
263 return snprintf(buf, PAGE_SIZE, "%s\n", ha->model_number);
264}
265
266static ssize_t
267qla2x00_model_desc_show(struct class_device *cdev, char *buf)
268{
269 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
270 return snprintf(buf, PAGE_SIZE, "%s\n",
271 ha->model_desc ? ha->model_desc: "");
272}
273
274static ssize_t
275qla2x00_pci_info_show(struct class_device *cdev, char *buf)
276{
277 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
278 char pci_info[30];
279
280 return snprintf(buf, PAGE_SIZE, "%s\n",
281 ha->isp_ops.pci_info_str(ha, pci_info));
282}
283
284static ssize_t
285qla2x00_state_show(struct class_device *cdev, char *buf)
286{
287 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
288 int len = 0;
289
290 if (atomic_read(&ha->loop_state) == LOOP_DOWN ||
291 atomic_read(&ha->loop_state) == LOOP_DEAD)
292 len = snprintf(buf, PAGE_SIZE, "Link Down\n");
293 else if (atomic_read(&ha->loop_state) != LOOP_READY ||
294 test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags) ||
295 test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags))
296 len = snprintf(buf, PAGE_SIZE, "Unknown Link State\n");
297 else {
298 len = snprintf(buf, PAGE_SIZE, "Link Up - ");
299
300 switch (ha->current_topology) {
301 case ISP_CFG_NL:
302 len += snprintf(buf + len, PAGE_SIZE-len, "Loop\n");
303 break;
304 case ISP_CFG_FL:
305 len += snprintf(buf + len, PAGE_SIZE-len, "FL_Port\n");
306 break;
307 case ISP_CFG_N:
308 len += snprintf(buf + len, PAGE_SIZE-len,
309 "N_Port to N_Port\n");
310 break;
311 case ISP_CFG_F:
312 len += snprintf(buf + len, PAGE_SIZE-len, "F_Port\n");
313 break;
314 default:
315 len += snprintf(buf + len, PAGE_SIZE-len, "Loop\n");
316 break;
317 }
318 }
319 return len;
320}
321
Andrew Vasquez4fdfefe2005-10-27 11:09:48 -0700322static ssize_t
323qla2x00_zio_show(struct class_device *cdev, char *buf)
324{
325 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
326 int len = 0;
327
328 switch (ha->zio_mode) {
329 case QLA_ZIO_MODE_5:
330 len += snprintf(buf + len, PAGE_SIZE-len, "Mode 5\n");
331 break;
332 case QLA_ZIO_MODE_6:
333 len += snprintf(buf + len, PAGE_SIZE-len, "Mode 6\n");
334 break;
335 case QLA_ZIO_DISABLED:
336 len += snprintf(buf + len, PAGE_SIZE-len, "Disabled\n");
337 break;
338 }
339 return len;
340}
341
342static ssize_t
343qla2x00_zio_store(struct class_device *cdev, const char *buf, size_t count)
344{
345 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
346 int val = 0;
347 uint16_t zio_mode;
348
349 if (sscanf(buf, "%d", &val) != 1)
350 return -EINVAL;
351
352 switch (val) {
353 case 1:
354 zio_mode = QLA_ZIO_MODE_5;
355 break;
356 case 2:
357 zio_mode = QLA_ZIO_MODE_6;
358 break;
359 default:
360 zio_mode = QLA_ZIO_DISABLED;
361 break;
362 }
363
364 /* Update per-hba values and queue a reset. */
365 if (zio_mode != QLA_ZIO_DISABLED || ha->zio_mode != QLA_ZIO_DISABLED) {
366 ha->zio_mode = zio_mode;
367 set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
368 }
369 return strlen(buf);
370}
371
372static ssize_t
373qla2x00_zio_timer_show(struct class_device *cdev, char *buf)
374{
375 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
376
377 return snprintf(buf, PAGE_SIZE, "%d us\n", ha->zio_timer * 100);
378}
379
380static ssize_t
381qla2x00_zio_timer_store(struct class_device *cdev, const char *buf,
382 size_t count)
383{
384 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
385 int val = 0;
386 uint16_t zio_timer;
387
388 if (sscanf(buf, "%d", &val) != 1)
389 return -EINVAL;
390 if (val > 25500 || val < 100)
391 return -ERANGE;
392
393 zio_timer = (uint16_t)(val / 100);
394 ha->zio_timer = zio_timer;
395
396 return strlen(buf);
397}
398
Andrew Vasquezafb046e2005-08-26 19:09:40 -0700399static CLASS_DEVICE_ATTR(driver_version, S_IRUGO, qla2x00_drvr_version_show,
400 NULL);
401static CLASS_DEVICE_ATTR(fw_version, S_IRUGO, qla2x00_fw_version_show, NULL);
402static CLASS_DEVICE_ATTR(serial_num, S_IRUGO, qla2x00_serial_num_show, NULL);
403static CLASS_DEVICE_ATTR(isp_name, S_IRUGO, qla2x00_isp_name_show, NULL);
404static CLASS_DEVICE_ATTR(isp_id, S_IRUGO, qla2x00_isp_id_show, NULL);
405static CLASS_DEVICE_ATTR(model_name, S_IRUGO, qla2x00_model_name_show, NULL);
406static CLASS_DEVICE_ATTR(model_desc, S_IRUGO, qla2x00_model_desc_show, NULL);
407static CLASS_DEVICE_ATTR(pci_info, S_IRUGO, qla2x00_pci_info_show, NULL);
408static CLASS_DEVICE_ATTR(state, S_IRUGO, qla2x00_state_show, NULL);
Andrew Vasquez4fdfefe2005-10-27 11:09:48 -0700409static CLASS_DEVICE_ATTR(zio, S_IRUGO | S_IWUSR, qla2x00_zio_show,
410 qla2x00_zio_store);
411static CLASS_DEVICE_ATTR(zio_timer, S_IRUGO | S_IWUSR, qla2x00_zio_timer_show,
412 qla2x00_zio_timer_store);
Andrew Vasquezafb046e2005-08-26 19:09:40 -0700413
414struct class_device_attribute *qla2x00_host_attrs[] = {
415 &class_device_attr_driver_version,
416 &class_device_attr_fw_version,
417 &class_device_attr_serial_num,
418 &class_device_attr_isp_name,
419 &class_device_attr_isp_id,
420 &class_device_attr_model_name,
421 &class_device_attr_model_desc,
422 &class_device_attr_pci_info,
423 &class_device_attr_state,
Andrew Vasquez4fdfefe2005-10-27 11:09:48 -0700424 &class_device_attr_zio,
425 &class_device_attr_zio_timer,
Andrew Vasquezafb046e2005-08-26 19:09:40 -0700426 NULL,
427};
428
8482e1182005-04-17 15:04:54 -0500429/* Host attributes. */
430
431static void
432qla2x00_get_host_port_id(struct Scsi_Host *shost)
433{
434 scsi_qla_host_t *ha = to_qla_host(shost);
435
436 fc_host_port_id(shost) = ha->d_id.b.domain << 16 |
437 ha->d_id.b.area << 8 | ha->d_id.b.al_pa;
438}
439
440static void
441qla2x00_get_starget_node_name(struct scsi_target *starget)
442{
443 struct Scsi_Host *host = dev_to_shost(starget->dev.parent);
444 scsi_qla_host_t *ha = to_qla_host(host);
bdf79622005-04-17 15:06:53 -0500445 fc_port_t *fcport;
Andrew Vasquezf8b02a82005-08-31 15:21:20 -0700446 u64 node_name = 0;
8482e1182005-04-17 15:04:54 -0500447
bdf79622005-04-17 15:06:53 -0500448 list_for_each_entry(fcport, &ha->fcports, list) {
449 if (starget->id == fcport->os_target_id) {
Andrew Vasquezf8b02a82005-08-31 15:21:20 -0700450 node_name = wwn_to_u64(fcport->node_name);
bdf79622005-04-17 15:06:53 -0500451 break;
452 }
453 }
454
Andrew Vasquezf8b02a82005-08-31 15:21:20 -0700455 fc_starget_node_name(starget) = node_name;
8482e1182005-04-17 15:04:54 -0500456}
457
458static void
459qla2x00_get_starget_port_name(struct scsi_target *starget)
460{
461 struct Scsi_Host *host = dev_to_shost(starget->dev.parent);
462 scsi_qla_host_t *ha = to_qla_host(host);
bdf79622005-04-17 15:06:53 -0500463 fc_port_t *fcport;
Andrew Vasquezf8b02a82005-08-31 15:21:20 -0700464 u64 port_name = 0;
8482e1182005-04-17 15:04:54 -0500465
bdf79622005-04-17 15:06:53 -0500466 list_for_each_entry(fcport, &ha->fcports, list) {
467 if (starget->id == fcport->os_target_id) {
Andrew Vasquezf8b02a82005-08-31 15:21:20 -0700468 port_name = wwn_to_u64(fcport->port_name);
bdf79622005-04-17 15:06:53 -0500469 break;
470 }
471 }
472
Andrew Vasquezf8b02a82005-08-31 15:21:20 -0700473 fc_starget_port_name(starget) = port_name;
8482e1182005-04-17 15:04:54 -0500474}
475
476static void
477qla2x00_get_starget_port_id(struct scsi_target *starget)
478{
479 struct Scsi_Host *host = dev_to_shost(starget->dev.parent);
480 scsi_qla_host_t *ha = to_qla_host(host);
bdf79622005-04-17 15:06:53 -0500481 fc_port_t *fcport;
482 uint32_t port_id = ~0U;
8482e1182005-04-17 15:04:54 -0500483
bdf79622005-04-17 15:06:53 -0500484 list_for_each_entry(fcport, &ha->fcports, list) {
485 if (starget->id == fcport->os_target_id) {
486 port_id = fcport->d_id.b.domain << 16 |
487 fcport->d_id.b.area << 8 | fcport->d_id.b.al_pa;
488 break;
489 }
490 }
491
8482e1182005-04-17 15:04:54 -0500492 fc_starget_port_id(starget) = port_id;
493}
494
495static void
496qla2x00_get_rport_loss_tmo(struct fc_rport *rport)
497{
bdf79622005-04-17 15:06:53 -0500498 struct Scsi_Host *host = rport_to_shost(rport);
499 scsi_qla_host_t *ha = to_qla_host(host);
8482e1182005-04-17 15:04:54 -0500500
501 rport->dev_loss_tmo = ha->port_down_retry_count + 5;
502}
503
504static void
505qla2x00_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout)
506{
bdf79622005-04-17 15:06:53 -0500507 struct Scsi_Host *host = rport_to_shost(rport);
508 scsi_qla_host_t *ha = to_qla_host(host);
8482e1182005-04-17 15:04:54 -0500509
510 if (timeout)
511 ha->port_down_retry_count = timeout;
512 else
513 ha->port_down_retry_count = 1;
514
515 rport->dev_loss_tmo = ha->port_down_retry_count + 5;
516}
517
Andrew Vasquez1c97a122005-04-21 16:13:36 -0400518struct fc_function_template qla2xxx_transport_functions = {
8482e1182005-04-17 15:04:54 -0500519
520 .show_host_node_name = 1,
521 .show_host_port_name = 1,
Andrew Vasquezad3e0ed2005-08-26 19:08:10 -0700522 .show_host_supported_classes = 1,
523
8482e1182005-04-17 15:04:54 -0500524 .get_host_port_id = qla2x00_get_host_port_id,
525 .show_host_port_id = 1,
526
bdf79622005-04-17 15:06:53 -0500527 .dd_fcrport_size = sizeof(struct fc_port *),
Andrew Vasquezad3e0ed2005-08-26 19:08:10 -0700528 .show_rport_supported_classes = 1,
8482e1182005-04-17 15:04:54 -0500529
530 .get_starget_node_name = qla2x00_get_starget_node_name,
531 .show_starget_node_name = 1,
532 .get_starget_port_name = qla2x00_get_starget_port_name,
533 .show_starget_port_name = 1,
534 .get_starget_port_id = qla2x00_get_starget_port_id,
535 .show_starget_port_id = 1,
536
537 .get_rport_dev_loss_tmo = qla2x00_get_rport_loss_tmo,
538 .set_rport_dev_loss_tmo = qla2x00_set_rport_loss_tmo,
539 .show_rport_dev_loss_tmo = 1,
540
541};
542
8482e1182005-04-17 15:04:54 -0500543void
544qla2x00_init_host_attr(scsi_qla_host_t *ha)
545{
Andrew Vasquezf8b02a82005-08-31 15:21:20 -0700546 fc_host_node_name(ha->host) = wwn_to_u64(ha->init_cb->node_name);
547 fc_host_port_name(ha->host) = wwn_to_u64(ha->init_cb->port_name);
Andrew Vasquezad3e0ed2005-08-26 19:08:10 -0700548 fc_host_supported_classes(ha->host) = FC_COS_CLASS3;
8482e1182005-04-17 15:04:54 -0500549}