Commit 8daeca52 authored by Heiko Carstens's avatar Heiko Carstens Committed by James Bottomley

[PATCH] zfcp: bugfixes (without kfree) for -bk

From: Andreas Herrmann <aherrman@de.ibm.com>
From: Maxim Shchetynin <maxim@de.ibm.com>

zfcp changes:
 - don't call del_timer_sync() in interrupt context
 - correct residual count handling for data underruns
 - mark LUN as ACCESS_DENIED on status LUN_SHARING_VIOLATION
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 6e59c939
......@@ -31,7 +31,7 @@
#define ZFCP_LOG_AREA ZFCP_LOG_AREA_ERP
#define ZFCP_ERP_REVISION "$Revision: 1.85 $"
#define ZFCP_ERP_REVISION "$Revision: 1.86 $"
#include "zfcp_ext.h"
......@@ -369,7 +369,7 @@ zfcp_erp_adisc(struct zfcp_adapter *adapter, fc_id_t d_id)
ZFCP_LOG_NORMAL("error: initiation of Send ELS failed for port "
"0x%08x on adapter %s\n", d_id,
zfcp_get_busid_by_adapter(adapter));
del_timer_sync(send_els->timer);
del_timer(send_els->timer);
goto freemem;
}
......@@ -969,7 +969,7 @@ zfcp_erp_async_handler_nolock(struct zfcp_erp_action *erp_action,
debug_event(adapter->erp_dbf, 2, &erp_action->action,
sizeof (int));
if (!(set_mask & ZFCP_STATUS_ERP_TIMEDOUT))
del_timer_sync(&erp_action->timer);
del_timer(&erp_action->timer);
erp_action->status |= set_mask;
zfcp_erp_action_ready(erp_action);
retval = 0;
......
......@@ -30,7 +30,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#define ZFCP_FSF_C_REVISION "$Revision: 1.88 $"
#define ZFCP_FSF_C_REVISION "$Revision: 1.92 $"
#include "zfcp_ext.h"
......@@ -3203,7 +3203,9 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
sizeof (union fsf_status_qual));
debug_text_event(adapter->erp_dbf, 2,
"fsf_s_l_sh_vio");
zfcp_erp_unit_failed(unit);
zfcp_erp_unit_access_denied(unit);
atomic_clear_mask(ZFCP_STATUS_UNIT_SHARED, &unit->status);
atomic_clear_mask(ZFCP_STATUS_UNIT_READONLY, &unit->status);
fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
break;
......@@ -4320,22 +4322,19 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req)
/* check for underrun */
if (unlikely(fcp_rsp_iu->validity.bits.fcp_resid_under)) {
ZFCP_LOG_DEBUG("A data underrun was detected for a command. "
"unit 0x%016Lx, port 0x%016Lx, adapter %s. "
"The response data length is "
"%d, the original length was %d.\n",
unit->fcp_lun,
unit->port->wwpn,
zfcp_get_busid_by_unit(unit),
fcp_rsp_iu->fcp_resid,
(int) zfcp_get_fcp_dl(fcp_cmnd_iu));
/*
* It may not have been possible to send all data and the
* underrun on send may already be in scpnt->resid, so it's add
* not equals in the below statement.
*/
scpnt->resid += fcp_rsp_iu->fcp_resid;
ZFCP_LOG_TRACE("scpnt->resid=0x%x\n", scpnt->resid);
ZFCP_LOG_INFO("A data underrun was detected for a command. "
"unit 0x%016Lx, port 0x%016Lx, adapter %s. "
"The response data length is "
"%d, the original length was %d.\n",
unit->fcp_lun,
unit->port->wwpn,
zfcp_get_busid_by_unit(unit),
fcp_rsp_iu->fcp_resid,
(int) zfcp_get_fcp_dl(fcp_cmnd_iu));
scpnt->resid = fcp_rsp_iu->fcp_resid;
if (scpnt->request_bufflen - scpnt->resid < scpnt->underflow)
scpnt->result |= DID_ERROR << 16;
}
skip_fsfstatus:
......@@ -5023,7 +5022,7 @@ zfcp_fsf_req_send(struct zfcp_fsf_req *fsf_req, struct timer_list *timer)
* timer might be expired (absolutely unlikely)
*/
if (timer)
del_timer_sync(timer);
del_timer(timer);
write_lock_irqsave(&adapter->fsf_req_list_lock, flags);
list_del(&fsf_req->list);
write_unlock_irqrestore(&adapter->fsf_req_list_lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment