* [patch 1/3] zfcp: Fix adapter activation on link down
2010-10-05 15:12 [patch 0/3] zfcp fixes for scsi-misc Christof Schmitt
@ 2010-10-05 15:12 ` Christof Schmitt
2010-10-05 15:12 ` [patch 2/3] zfcp: Call get_device on port before calling put_device Christof Schmitt
2010-10-05 15:12 ` [patch 3/3] zfcp: Use correct length for FCP_RSP_INFO Christof Schmitt
2 siblings, 0 replies; 4+ messages in thread
From: Christof Schmitt @ 2010-10-05 15:12 UTC (permalink / raw)
To: James Bottomley
Cc: linux-scsi, linux-s390, schwidefsky, heiko.carstens,
Swen Schillig
[-- Attachment #1: 712-zfcp-adapter-activation.diff --]
[-- Type: text/plain, Size: 1207 bytes --]
From: Swen Schillig <swen@vnet.ibm.com>
If an exchange config is executed while the local link is down, the
request succeeds but the returned data is incomplete. Proceeding with
the adapter activation is leading to an unpredictable behaviour (e.g.
kernel panic) caused by invalid values. In such a scenario the
recommended ERP is to retry the action and wait for a link up event.
If the issue persists the activation has to fail.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Sigend-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
---
drivers/s390/scsi/zfcp_fsf.c | 3 ---
1 file changed, 3 deletions(-)
diff -urpN linux-2.6/drivers/s390/scsi/zfcp_fsf.c linux-2.6-patched/drivers/s390/scsi/zfcp_fsf.c
--- linux-2.6/drivers/s390/scsi/zfcp_fsf.c 2010-10-05 15:58:20.000000000 +0200
+++ linux-2.6-patched/drivers/s390/scsi/zfcp_fsf.c 2010-10-05 15:58:20.000000000 +0200
@@ -532,9 +532,6 @@ static void zfcp_fsf_exchange_config_dat
fc_host_port_type(shost) = FC_PORTTYPE_UNKNOWN;
adapter->hydra_version = 0;
- atomic_set_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK,
- &adapter->status);
-
zfcp_fsf_link_down_info_eval(req,
&qtcb->header.fsf_status_qual.link_down_info);
break;
^ permalink raw reply [flat|nested] 4+ messages in thread
* [patch 2/3] zfcp: Call get_device on port before calling put_device
2010-10-05 15:12 [patch 0/3] zfcp fixes for scsi-misc Christof Schmitt
2010-10-05 15:12 ` [patch 1/3] zfcp: Fix adapter activation on link down Christof Schmitt
@ 2010-10-05 15:12 ` Christof Schmitt
2010-10-05 15:12 ` [patch 3/3] zfcp: Use correct length for FCP_RSP_INFO Christof Schmitt
2 siblings, 0 replies; 4+ messages in thread
From: Christof Schmitt @ 2010-10-05 15:12 UTC (permalink / raw)
To: James Bottomley
Cc: linux-scsi, linux-s390, schwidefsky, heiko.carstens,
Christof Schmitt
[-- Attachment #1: 713-zfcp-ref-counting.diff --]
[-- Type: text/plain, Size: 1148 bytes --]
From: Christof Schmitt <christof.schmitt@de.ibm.com>
zfcp_unit_release calls put_device on the port. Ensure that get_device
has been called before possibly triggering the release function
through put_device or device_unregister.
Reviewed-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
---
drivers/s390/scsi/zfcp_unit.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff -urpN linux-2.6/drivers/s390/scsi/zfcp_unit.c linux-2.6-patched/drivers/s390/scsi/zfcp_unit.c
--- linux-2.6/drivers/s390/scsi/zfcp_unit.c 2010-10-05 15:58:17.000000000 +0200
+++ linux-2.6-patched/drivers/s390/scsi/zfcp_unit.c 2010-10-05 15:58:21.000000000 +0200
@@ -142,6 +142,8 @@ int zfcp_unit_add(struct zfcp_port *port
return -ENOMEM;
}
+ get_device(&port->dev);
+
if (device_register(&unit->dev)) {
put_device(&unit->dev);
return -ENOMEM;
@@ -152,8 +154,6 @@ int zfcp_unit_add(struct zfcp_port *port
return -EINVAL;
}
- get_device(&port->dev);
-
write_lock_irq(&port->unit_list_lock);
list_add_tail(&unit->list, &port->unit_list);
write_unlock_irq(&port->unit_list_lock);
^ permalink raw reply [flat|nested] 4+ messages in thread* [patch 3/3] zfcp: Use correct length for FCP_RSP_INFO
2010-10-05 15:12 [patch 0/3] zfcp fixes for scsi-misc Christof Schmitt
2010-10-05 15:12 ` [patch 1/3] zfcp: Fix adapter activation on link down Christof Schmitt
2010-10-05 15:12 ` [patch 2/3] zfcp: Call get_device on port before calling put_device Christof Schmitt
@ 2010-10-05 15:12 ` Christof Schmitt
2 siblings, 0 replies; 4+ messages in thread
From: Christof Schmitt @ 2010-10-05 15:12 UTC (permalink / raw)
To: James Bottomley
Cc: linux-scsi, linux-s390, schwidefsky, heiko.carstens,
Christof Schmitt
[-- Attachment #1: 715-zfcp-rsp-info-len.diff --]
[-- Type: text/plain, Size: 966 bytes --]
From: Christof Schmitt <christof.schmitt@de.ibm.com>
Use the FCP_RSP_INFO length to correctly skip the FCP_RSP_INFO field.
Reviewed-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
---
drivers/s390/scsi/zfcp_fc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -urpN linux-2.6/drivers/s390/scsi/zfcp_fc.h linux-2.6-patched/drivers/s390/scsi/zfcp_fc.h
--- linux-2.6/drivers/s390/scsi/zfcp_fc.h 2010-10-05 15:57:41.000000000 +0200
+++ linux-2.6-patched/drivers/s390/scsi/zfcp_fc.h 2010-10-05 15:58:22.000000000 +0200
@@ -270,7 +270,7 @@ void zfcp_fc_eval_fcp_rsp(struct fcp_res
if (unlikely(rsp_flags & FCP_SNS_LEN_VAL)) {
sense = (char *) &fcp_rsp[1];
if (rsp_flags & FCP_RSP_LEN_VAL)
- sense += fcp_rsp->ext.fr_sns_len;
+ sense += fcp_rsp->ext.fr_rsp_len;
sense_len = min(fcp_rsp->ext.fr_sns_len,
(u32) SCSI_SENSE_BUFFERSIZE);
memcpy(scsi->sense_buffer, sense, sense_len);
^ permalink raw reply [flat|nested] 4+ messages in thread