Skip to content

Commit

Permalink
[SCSI] zfcp: Update message with input from review
Browse files Browse the repository at this point in the history
Update the kernel messages in zfcp with input from the message review
and remove some messages that have been identified as redundant.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
  • Loading branch information
Christof Schmitt authored and James Bottomley committed Oct 3, 2008
1 parent 2450d3e commit ff3b24f
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 207 deletions.
8 changes: 4 additions & 4 deletions drivers/s390/scsi/zfcp_aux.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ static int __init zfcp_device_setup(char *devstr)

err_out:
kfree(str);
pr_err("zfcp: Parse error for device parameter string %s, "
"device not attached.\n", devstr);
pr_err("zfcp: %s is not a valid SCSI device\n", devstr);
return 0;
}

Expand Down Expand Up @@ -193,13 +192,14 @@ static int __init zfcp_module_init(void)

retval = misc_register(&zfcp_cfdc_misc);
if (retval) {
pr_err("zfcp: registration of misc device zfcp_cfdc failed\n");
pr_err("zfcp: Registering the misc device zfcp_cfdc failed\n");
goto out_misc;
}

retval = zfcp_ccw_register();
if (retval) {
pr_err("zfcp: Registration with common I/O layer failed.\n");
pr_err("zfcp: The zfcp device driver could not register with "
"the common I/O layer\n");
goto out_ccw_register;
}

Expand Down
12 changes: 8 additions & 4 deletions drivers/s390/scsi/zfcp_ccw.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ static int zfcp_ccw_probe(struct ccw_device *ccw_device)
down(&zfcp_data.config_sema);
if (zfcp_adapter_enqueue(ccw_device)) {
dev_err(&ccw_device->dev,
"Setup of data structures failed.\n");
"Setting up data structures for the "
"FCP adapter failed\n");
retval = -EINVAL;
}
up(&zfcp_data.config_sema);
Expand Down Expand Up @@ -156,15 +157,18 @@ static int zfcp_ccw_notify(struct ccw_device *ccw_device, int event)

switch (event) {
case CIO_GONE:
dev_warn(&adapter->ccw_device->dev, "device gone\n");
dev_warn(&adapter->ccw_device->dev,
"The FCP device has been detached\n");
zfcp_erp_adapter_shutdown(adapter, 0, 87, NULL);
break;
case CIO_NO_PATH:
dev_warn(&adapter->ccw_device->dev, "no path\n");
dev_warn(&adapter->ccw_device->dev,
"The CHPID for the FCP device is offline\n");
zfcp_erp_adapter_shutdown(adapter, 0, 88, NULL);
break;
case CIO_OPER:
dev_info(&adapter->ccw_device->dev, "operational again\n");
dev_info(&adapter->ccw_device->dev,
"The FCP device is operational again\n");
zfcp_erp_modify_adapter_status(adapter, 11, NULL,
ZFCP_STATUS_COMMON_RUNNING,
ZFCP_SET);
Expand Down
2 changes: 1 addition & 1 deletion drivers/s390/scsi/zfcp_dbf.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ static const char *zfcp_rec_dbf_ids[] = {
[125] = "need newer zfcp",
[126] = "need newer microcode",
[127] = "arbitrated loop not supported",
[128] = "unknown topology",
[128] = "",
[129] = "qtcb size mismatch",
[130] = "unknown fsf status ecd",
[131] = "fcp request too big",
Expand Down
50 changes: 22 additions & 28 deletions drivers/s390/scsi/zfcp_erp.c
Original file line number Diff line number Diff line change
Expand Up @@ -901,11 +901,6 @@ static int zfcp_erp_open_ptp_port(struct zfcp_erp_action *act)
struct zfcp_port *port = act->port;

if (port->wwpn != adapter->peer_wwpn) {
dev_err(&adapter->ccw_device->dev,
"Failed to open port 0x%016Lx, "
"Peer WWPN 0x%016Lx does not "
"match.\n", port->wwpn,
adapter->peer_wwpn);
zfcp_erp_port_failed(port, 25, NULL);
return ZFCP_ERP_FAILED;
}
Expand All @@ -929,7 +924,8 @@ static int zfcp_erp_port_strategy_open_common(struct zfcp_erp_action *act)
return zfcp_erp_open_ptp_port(act);
if (!ns_port) {
dev_err(&adapter->ccw_device->dev,
"Nameserver port unavailable.\n");
"Attaching the name server port to the "
"FCP device failed\n");
return ZFCP_ERP_FAILED;
}
if (!(atomic_read(&ns_port->status) &
Expand Down Expand Up @@ -1065,8 +1061,13 @@ static int zfcp_erp_strategy_check_unit(struct zfcp_unit *unit, int result)
break;
case ZFCP_ERP_FAILED :
atomic_inc(&unit->erp_counter);
if (atomic_read(&unit->erp_counter) > ZFCP_MAX_ERPS)
if (atomic_read(&unit->erp_counter) > ZFCP_MAX_ERPS) {
dev_err(&unit->port->adapter->ccw_device->dev,
"ERP failed for unit 0x%016Lx on "
"port 0x%016Lx\n",
unit->fcp_lun, unit->port->wwpn);
zfcp_erp_unit_failed(unit, 21, NULL);
}
break;
}

Expand All @@ -1091,8 +1092,12 @@ static int zfcp_erp_strategy_check_port(struct zfcp_port *port, int result)
result = ZFCP_ERP_EXIT;
}
atomic_inc(&port->erp_counter);
if (atomic_read(&port->erp_counter) > ZFCP_MAX_ERPS)
if (atomic_read(&port->erp_counter) > ZFCP_MAX_ERPS) {
dev_err(&port->adapter->ccw_device->dev,
"ERP failed for remote port 0x%016Lx\n",
port->wwpn);
zfcp_erp_port_failed(port, 22, NULL);
}
break;
}

Expand All @@ -1114,8 +1119,12 @@ static int zfcp_erp_strategy_check_adapter(struct zfcp_adapter *adapter,

case ZFCP_ERP_FAILED :
atomic_inc(&adapter->erp_counter);
if (atomic_read(&adapter->erp_counter) > ZFCP_MAX_ERPS)
if (atomic_read(&adapter->erp_counter) > ZFCP_MAX_ERPS) {
dev_err(&adapter->ccw_device->dev,
"ERP cannot recover an error "
"on the FCP device\n");
zfcp_erp_adapter_failed(adapter, 23, NULL);
}
break;
}

Expand Down Expand Up @@ -1263,8 +1272,7 @@ static void zfcp_erp_schedule_work(struct zfcp_unit *unit)
p = kzalloc(sizeof(*p), GFP_KERNEL);
if (!p) {
dev_err(&unit->port->adapter->ccw_device->dev,
"Out of resources. Could not register unit "
"0x%016Lx on port 0x%016Lx with SCSI stack.\n",
"Registering unit 0x%016Lx on port 0x%016Lx failed\n",
unit->fcp_lun, unit->port->wwpn);
return;
}
Expand All @@ -1286,8 +1294,8 @@ static void zfcp_erp_rport_register(struct zfcp_port *port)
port->rport = fc_remote_port_add(port->adapter->scsi_host, 0, &ids);
if (!port->rport) {
dev_err(&port->adapter->ccw_device->dev,
"Failed registration of rport "
"0x%016Lx.\n", port->wwpn);
"Registering port 0x%016Lx failed\n",
port->wwpn);
return;
}

Expand Down Expand Up @@ -1484,7 +1492,7 @@ int zfcp_erp_thread_setup(struct zfcp_adapter *adapter)
retval = kernel_thread(zfcp_erp_thread, adapter, SIGCHLD);
if (retval < 0) {
dev_err(&adapter->ccw_device->dev,
"Creation of ERP thread failed.\n");
"Creating an ERP thread for the FCP device failed.\n");
return retval;
}
wait_event(adapter->erp_thread_wqh,
Expand Down Expand Up @@ -1526,7 +1534,6 @@ void zfcp_erp_adapter_failed(struct zfcp_adapter *adapter, u8 id, void *ref)
{
zfcp_erp_modify_adapter_status(adapter, id, ref,
ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET);
dev_err(&adapter->ccw_device->dev, "Adapter ERP failed.\n");
}

/**
Expand All @@ -1539,15 +1546,6 @@ void zfcp_erp_port_failed(struct zfcp_port *port, u8 id, void *ref)
{
zfcp_erp_modify_port_status(port, id, ref,
ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET);

if (atomic_read(&port->status) & ZFCP_STATUS_PORT_WKA)
dev_err(&port->adapter->ccw_device->dev,
"Port ERP failed for WKA port d_id=0x%06x.\n",
port->d_id);
else
dev_err(&port->adapter->ccw_device->dev,
"Port ERP failed for port wwpn=0x%016Lx.\n",
port->wwpn);
}

/**
Expand All @@ -1560,10 +1558,6 @@ void zfcp_erp_unit_failed(struct zfcp_unit *unit, u8 id, void *ref)
{
zfcp_erp_modify_unit_status(unit, id, ref,
ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET);

dev_err(&unit->port->adapter->ccw_device->dev,
"Unit ERP failed for unit 0x%016Lx on port 0x%016Lx.\n",
unit->fcp_lun, unit->port->wwpn);
}

/**
Expand Down
Loading

0 comments on commit ff3b24f

Please sign in to comment.