diff options
Diffstat (limited to 'drivers/s390/scsi/zfcp_aux.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_aux.c | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index 3d4e3e3f3fc0..e529b55b3ce9 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c | |||
@@ -25,9 +25,15 @@ | |||
25 | * Sven Schuetz | 25 | * Sven Schuetz |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #define KMSG_COMPONENT "zfcp" | ||
29 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | ||
30 | |||
28 | #include <linux/miscdevice.h> | 31 | #include <linux/miscdevice.h> |
32 | #include <linux/seq_file.h> | ||
29 | #include "zfcp_ext.h" | 33 | #include "zfcp_ext.h" |
30 | 34 | ||
35 | #define ZFCP_BUS_ID_SIZE 20 | ||
36 | |||
31 | static char *device; | 37 | static char *device; |
32 | 38 | ||
33 | MODULE_AUTHOR("IBM Deutschland Entwicklung GmbH - linux390@de.ibm.com"); | 39 | MODULE_AUTHOR("IBM Deutschland Entwicklung GmbH - linux390@de.ibm.com"); |
@@ -83,9 +89,9 @@ static int __init zfcp_device_setup(char *devstr) | |||
83 | strcpy(str, devstr); | 89 | strcpy(str, devstr); |
84 | 90 | ||
85 | token = strsep(&str, ","); | 91 | token = strsep(&str, ","); |
86 | if (!token || strlen(token) >= BUS_ID_SIZE) | 92 | if (!token || strlen(token) >= ZFCP_BUS_ID_SIZE) |
87 | goto err_out; | 93 | goto err_out; |
88 | strncpy(zfcp_data.init_busid, token, BUS_ID_SIZE); | 94 | strncpy(zfcp_data.init_busid, token, ZFCP_BUS_ID_SIZE); |
89 | 95 | ||
90 | token = strsep(&str, ","); | 96 | token = strsep(&str, ","); |
91 | if (!token || strict_strtoull(token, 0, | 97 | if (!token || strict_strtoull(token, 0, |
@@ -102,7 +108,7 @@ static int __init zfcp_device_setup(char *devstr) | |||
102 | 108 | ||
103 | err_out: | 109 | err_out: |
104 | kfree(str); | 110 | kfree(str); |
105 | pr_err("zfcp: %s is not a valid SCSI device\n", devstr); | 111 | pr_err("%s is not a valid SCSI device\n", devstr); |
106 | return 0; | 112 | return 0; |
107 | } | 113 | } |
108 | 114 | ||
@@ -186,13 +192,13 @@ static int __init zfcp_module_init(void) | |||
186 | 192 | ||
187 | retval = misc_register(&zfcp_cfdc_misc); | 193 | retval = misc_register(&zfcp_cfdc_misc); |
188 | if (retval) { | 194 | if (retval) { |
189 | pr_err("zfcp: Registering the misc device zfcp_cfdc failed\n"); | 195 | pr_err("Registering the misc device zfcp_cfdc failed\n"); |
190 | goto out_misc; | 196 | goto out_misc; |
191 | } | 197 | } |
192 | 198 | ||
193 | retval = zfcp_ccw_register(); | 199 | retval = zfcp_ccw_register(); |
194 | if (retval) { | 200 | if (retval) { |
195 | pr_err("zfcp: The zfcp device driver could not register with " | 201 | pr_err("The zfcp device driver could not register with " |
196 | "the common I/O layer\n"); | 202 | "the common I/O layer\n"); |
197 | goto out_ccw_register; | 203 | goto out_ccw_register; |
198 | } | 204 | } |
@@ -436,6 +442,16 @@ static void _zfcp_status_read_scheduler(struct work_struct *work) | |||
436 | stat_work)); | 442 | stat_work)); |
437 | } | 443 | } |
438 | 444 | ||
445 | static void zfcp_print_sl(struct seq_file *m, struct service_level *sl) | ||
446 | { | ||
447 | struct zfcp_adapter *adapter = | ||
448 | container_of(sl, struct zfcp_adapter, service_level); | ||
449 | |||
450 | seq_printf(m, "zfcp: %s microcode level %x\n", | ||
451 | dev_name(&adapter->ccw_device->dev), | ||
452 | adapter->fsf_lic_version); | ||
453 | } | ||
454 | |||
439 | /** | 455 | /** |
440 | * zfcp_adapter_enqueue - enqueue a new adapter to the list | 456 | * zfcp_adapter_enqueue - enqueue a new adapter to the list |
441 | * @ccw_device: pointer to the struct cc_device | 457 | * @ccw_device: pointer to the struct cc_device |
@@ -500,6 +516,8 @@ int zfcp_adapter_enqueue(struct ccw_device *ccw_device) | |||
500 | INIT_WORK(&adapter->stat_work, _zfcp_status_read_scheduler); | 516 | INIT_WORK(&adapter->stat_work, _zfcp_status_read_scheduler); |
501 | INIT_WORK(&adapter->scan_work, _zfcp_scan_ports_later); | 517 | INIT_WORK(&adapter->scan_work, _zfcp_scan_ports_later); |
502 | 518 | ||
519 | adapter->service_level.seq_print = zfcp_print_sl; | ||
520 | |||
503 | /* mark adapter unusable as long as sysfs registration is not complete */ | 521 | /* mark adapter unusable as long as sysfs registration is not complete */ |
504 | atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE, &adapter->status); | 522 | atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE, &adapter->status); |
505 | 523 | ||