Commit 5771710b authored by Swen Schillig's avatar Swen Schillig Committed by James Bottomley

[SCSI] zfcp: Update dbf calls

Change the dbf data and functions to use the zfcp_dbf prefix
throughout the code. Also change the calls to dbf to use zfcp_dbf
instead of zfcp_adapter.
Signed-off-by: default avatarSwen Schillig <swen@vnet.ibm.com>
Signed-off-by: default avatarChristof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 799b76d0
...@@ -517,6 +517,7 @@ int zfcp_adapter_enqueue(struct ccw_device *ccw_device) ...@@ -517,6 +517,7 @@ int zfcp_adapter_enqueue(struct ccw_device *ccw_device)
goto qdio_mem_failed; goto qdio_mem_failed;
adapter->qdio->adapter = adapter; adapter->qdio->adapter = adapter;
ccw_device->handler = NULL; ccw_device->handler = NULL;
adapter->ccw_device = ccw_device; adapter->ccw_device = ccw_device;
atomic_set(&adapter->refcount, 0); atomic_set(&adapter->refcount, 0);
...@@ -530,7 +531,7 @@ int zfcp_adapter_enqueue(struct ccw_device *ccw_device) ...@@ -530,7 +531,7 @@ int zfcp_adapter_enqueue(struct ccw_device *ccw_device)
if (zfcp_reqlist_alloc(adapter)) if (zfcp_reqlist_alloc(adapter))
goto failed_low_mem_buffers; goto failed_low_mem_buffers;
if (zfcp_adapter_debug_register(adapter)) if (zfcp_dbf_adapter_register(adapter))
goto debug_register_failed; goto debug_register_failed;
if (zfcp_setup_adapter_work_queue(adapter)) if (zfcp_setup_adapter_work_queue(adapter))
...@@ -577,7 +578,7 @@ int zfcp_adapter_enqueue(struct ccw_device *ccw_device) ...@@ -577,7 +578,7 @@ int zfcp_adapter_enqueue(struct ccw_device *ccw_device)
sysfs_failed: sysfs_failed:
zfcp_destroy_adapter_work_queue(adapter); zfcp_destroy_adapter_work_queue(adapter);
work_queue_failed: work_queue_failed:
zfcp_adapter_debug_unregister(adapter); zfcp_dbf_adapter_unregister(adapter->dbf);
debug_register_failed: debug_register_failed:
dev_set_drvdata(&ccw_device->dev, NULL); dev_set_drvdata(&ccw_device->dev, NULL);
kfree(adapter->req_list); kfree(adapter->req_list);
...@@ -616,7 +617,7 @@ void zfcp_adapter_dequeue(struct zfcp_adapter *adapter) ...@@ -616,7 +617,7 @@ void zfcp_adapter_dequeue(struct zfcp_adapter *adapter)
return; return;
zfcp_destroy_adapter_work_queue(adapter); zfcp_destroy_adapter_work_queue(adapter);
zfcp_adapter_debug_unregister(adapter); zfcp_dbf_adapter_unregister(adapter->dbf);
zfcp_qdio_free(adapter->qdio); zfcp_qdio_free(adapter->qdio);
zfcp_free_low_mem_buffers(adapter); zfcp_free_low_mem_buffers(adapter);
kfree(adapter->req_list); kfree(adapter->req_list);
......
This diff is collapsed.
This diff is collapsed.
...@@ -74,9 +74,9 @@ static void zfcp_erp_action_ready(struct zfcp_erp_action *act) ...@@ -74,9 +74,9 @@ static void zfcp_erp_action_ready(struct zfcp_erp_action *act)
struct zfcp_adapter *adapter = act->adapter; struct zfcp_adapter *adapter = act->adapter;
list_move(&act->list, &act->adapter->erp_ready_head); list_move(&act->list, &act->adapter->erp_ready_head);
zfcp_rec_dbf_event_action("erardy1", act); zfcp_dbf_rec_action("erardy1", act);
up(&adapter->erp_ready_sem); up(&adapter->erp_ready_sem);
zfcp_rec_dbf_event_thread("erardy2", adapter); zfcp_dbf_rec_thread("erardy2", adapter->dbf);
} }
static void zfcp_erp_action_dismiss(struct zfcp_erp_action *act) static void zfcp_erp_action_dismiss(struct zfcp_erp_action *act)
...@@ -227,11 +227,10 @@ static int zfcp_erp_action_enqueue(int want, struct zfcp_adapter *adapter, ...@@ -227,11 +227,10 @@ static int zfcp_erp_action_enqueue(int want, struct zfcp_adapter *adapter,
++adapter->erp_total_count; ++adapter->erp_total_count;
list_add_tail(&act->list, &adapter->erp_ready_head); list_add_tail(&act->list, &adapter->erp_ready_head);
up(&adapter->erp_ready_sem); up(&adapter->erp_ready_sem);
zfcp_rec_dbf_event_thread("eracte1", adapter); zfcp_dbf_rec_thread("eracte1", adapter->dbf);
retval = 0; retval = 0;
out: out:
zfcp_rec_dbf_event_trigger(id, ref, want, need, act, zfcp_dbf_rec_trigger(id, ref, want, need, act, adapter, port, unit);
adapter, port, unit);
return retval; return retval;
} }
...@@ -442,28 +441,28 @@ static int status_change_clear(unsigned long mask, atomic_t *status) ...@@ -442,28 +441,28 @@ static int status_change_clear(unsigned long mask, atomic_t *status)
static void zfcp_erp_adapter_unblock(struct zfcp_adapter *adapter) static void zfcp_erp_adapter_unblock(struct zfcp_adapter *adapter)
{ {
if (status_change_set(ZFCP_STATUS_COMMON_UNBLOCKED, &adapter->status)) if (status_change_set(ZFCP_STATUS_COMMON_UNBLOCKED, &adapter->status))
zfcp_rec_dbf_event_adapter("eraubl1", NULL, adapter); zfcp_dbf_rec_adapter("eraubl1", NULL, adapter->dbf);
atomic_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, &adapter->status); atomic_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, &adapter->status);
} }
static void zfcp_erp_port_unblock(struct zfcp_port *port) static void zfcp_erp_port_unblock(struct zfcp_port *port)
{ {
if (status_change_set(ZFCP_STATUS_COMMON_UNBLOCKED, &port->status)) if (status_change_set(ZFCP_STATUS_COMMON_UNBLOCKED, &port->status))
zfcp_rec_dbf_event_port("erpubl1", NULL, port); zfcp_dbf_rec_port("erpubl1", NULL, port);
atomic_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, &port->status); atomic_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, &port->status);
} }
static void zfcp_erp_unit_unblock(struct zfcp_unit *unit) static void zfcp_erp_unit_unblock(struct zfcp_unit *unit)
{ {
if (status_change_set(ZFCP_STATUS_COMMON_UNBLOCKED, &unit->status)) if (status_change_set(ZFCP_STATUS_COMMON_UNBLOCKED, &unit->status))
zfcp_rec_dbf_event_unit("eruubl1", NULL, unit); zfcp_dbf_rec_unit("eruubl1", NULL, unit);
atomic_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, &unit->status); atomic_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, &unit->status);
} }
static void zfcp_erp_action_to_running(struct zfcp_erp_action *erp_action) static void zfcp_erp_action_to_running(struct zfcp_erp_action *erp_action)
{ {
list_move(&erp_action->list, &erp_action->adapter->erp_running_head); list_move(&erp_action->list, &erp_action->adapter->erp_running_head);
zfcp_rec_dbf_event_action("erator1", erp_action); zfcp_dbf_rec_action("erator1", erp_action);
} }
static void zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *act) static void zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *act)
...@@ -479,11 +478,11 @@ static void zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *act) ...@@ -479,11 +478,11 @@ static void zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *act)
if (act->status & (ZFCP_STATUS_ERP_DISMISSED | if (act->status & (ZFCP_STATUS_ERP_DISMISSED |
ZFCP_STATUS_ERP_TIMEDOUT)) { ZFCP_STATUS_ERP_TIMEDOUT)) {
act->fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED; act->fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED;
zfcp_rec_dbf_event_action("erscf_1", act); zfcp_dbf_rec_action("erscf_1", act);
act->fsf_req->erp_action = NULL; act->fsf_req->erp_action = NULL;
} }
if (act->status & ZFCP_STATUS_ERP_TIMEDOUT) if (act->status & ZFCP_STATUS_ERP_TIMEDOUT)
zfcp_rec_dbf_event_action("erscf_2", act); zfcp_dbf_rec_action("erscf_2", act);
if (act->fsf_req->status & ZFCP_STATUS_FSFREQ_DISMISSED) if (act->fsf_req->status & ZFCP_STATUS_FSFREQ_DISMISSED)
act->fsf_req = NULL; act->fsf_req = NULL;
} else } else
...@@ -641,9 +640,9 @@ static int zfcp_erp_adapter_strat_fsf_xconf(struct zfcp_erp_action *erp_action) ...@@ -641,9 +640,9 @@ static int zfcp_erp_adapter_strat_fsf_xconf(struct zfcp_erp_action *erp_action)
return ZFCP_ERP_FAILED; return ZFCP_ERP_FAILED;
} }
zfcp_rec_dbf_event_thread_lock("erasfx1", adapter); zfcp_dbf_rec_thread_lock("erasfx1", adapter->dbf);
down(&adapter->erp_ready_sem); down(&adapter->erp_ready_sem);
zfcp_rec_dbf_event_thread_lock("erasfx2", adapter); zfcp_dbf_rec_thread_lock("erasfx2", adapter->dbf);
if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT) if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT)
break; break;
...@@ -682,9 +681,9 @@ static int zfcp_erp_adapter_strategy_open_fsf_xport(struct zfcp_erp_action *act) ...@@ -682,9 +681,9 @@ static int zfcp_erp_adapter_strategy_open_fsf_xport(struct zfcp_erp_action *act)
if (ret) if (ret)
return ZFCP_ERP_FAILED; return ZFCP_ERP_FAILED;
zfcp_rec_dbf_event_thread_lock("erasox1", adapter); zfcp_dbf_rec_thread_lock("erasox1", adapter->dbf);
down(&adapter->erp_ready_sem); down(&adapter->erp_ready_sem);
zfcp_rec_dbf_event_thread_lock("erasox2", adapter); zfcp_dbf_rec_thread_lock("erasox2", adapter->dbf);
if (act->status & ZFCP_STATUS_ERP_TIMEDOUT) if (act->status & ZFCP_STATUS_ERP_TIMEDOUT)
return ZFCP_ERP_FAILED; return ZFCP_ERP_FAILED;
...@@ -1138,7 +1137,7 @@ static void zfcp_erp_action_dequeue(struct zfcp_erp_action *erp_action) ...@@ -1138,7 +1137,7 @@ static void zfcp_erp_action_dequeue(struct zfcp_erp_action *erp_action)
} }
list_del(&erp_action->list); list_del(&erp_action->list);
zfcp_rec_dbf_event_action("eractd1", erp_action); zfcp_dbf_rec_action("eractd1", erp_action);
switch (erp_action->action) { switch (erp_action->action) {
case ZFCP_ERP_ACTION_REOPEN_UNIT: case ZFCP_ERP_ACTION_REOPEN_UNIT:
...@@ -1297,9 +1296,9 @@ static int zfcp_erp_thread(void *data) ...@@ -1297,9 +1296,9 @@ static int zfcp_erp_thread(void *data)
while (!(atomic_read(&adapter->status) & while (!(atomic_read(&adapter->status) &
ZFCP_STATUS_ADAPTER_ERP_THREAD_KILL)) { ZFCP_STATUS_ADAPTER_ERP_THREAD_KILL)) {
zfcp_rec_dbf_event_thread_lock("erthrd1", adapter); zfcp_dbf_rec_thread_lock("erthrd1", adapter->dbf);
ignore = down_interruptible(&adapter->erp_ready_sem); ignore = down_interruptible(&adapter->erp_ready_sem);
zfcp_rec_dbf_event_thread_lock("erthrd2", adapter); zfcp_dbf_rec_thread_lock("erthrd2", adapter->dbf);
write_lock_irqsave(&adapter->erp_lock, flags); write_lock_irqsave(&adapter->erp_lock, flags);
next = adapter->erp_ready_head.next; next = adapter->erp_ready_head.next;
...@@ -1356,7 +1355,7 @@ void zfcp_erp_thread_kill(struct zfcp_adapter *adapter) ...@@ -1356,7 +1355,7 @@ void zfcp_erp_thread_kill(struct zfcp_adapter *adapter)
{ {
atomic_set_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_KILL, &adapter->status); atomic_set_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_KILL, &adapter->status);
up(&adapter->erp_ready_sem); up(&adapter->erp_ready_sem);
zfcp_rec_dbf_event_thread_lock("erthrk1", adapter); zfcp_dbf_rec_thread_lock("erthrk1", adapter->dbf);
wait_event(adapter->erp_thread_wqh, wait_event(adapter->erp_thread_wqh,
!(atomic_read(&adapter->status) & !(atomic_read(&adapter->status) &
...@@ -1431,11 +1430,11 @@ void zfcp_erp_modify_adapter_status(struct zfcp_adapter *adapter, char *id, ...@@ -1431,11 +1430,11 @@ void zfcp_erp_modify_adapter_status(struct zfcp_adapter *adapter, char *id,
if (set_or_clear == ZFCP_SET) { if (set_or_clear == ZFCP_SET) {
if (status_change_set(mask, &adapter->status)) if (status_change_set(mask, &adapter->status))
zfcp_rec_dbf_event_adapter(id, ref, adapter); zfcp_dbf_rec_adapter(id, ref, adapter->dbf);
atomic_set_mask(mask, &adapter->status); atomic_set_mask(mask, &adapter->status);
} else { } else {
if (status_change_clear(mask, &adapter->status)) if (status_change_clear(mask, &adapter->status))
zfcp_rec_dbf_event_adapter(id, ref, adapter); zfcp_dbf_rec_adapter(id, ref, adapter->dbf);
atomic_clear_mask(mask, &adapter->status); atomic_clear_mask(mask, &adapter->status);
if (mask & ZFCP_STATUS_COMMON_ERP_FAILED) if (mask & ZFCP_STATUS_COMMON_ERP_FAILED)
atomic_set(&adapter->erp_counter, 0); atomic_set(&adapter->erp_counter, 0);
...@@ -1465,11 +1464,11 @@ void zfcp_erp_modify_port_status(struct zfcp_port *port, char *id, void *ref, ...@@ -1465,11 +1464,11 @@ void zfcp_erp_modify_port_status(struct zfcp_port *port, char *id, void *ref,
if (set_or_clear == ZFCP_SET) { if (set_or_clear == ZFCP_SET) {
if (status_change_set(mask, &port->status)) if (status_change_set(mask, &port->status))
zfcp_rec_dbf_event_port(id, ref, port); zfcp_dbf_rec_port(id, ref, port);
atomic_set_mask(mask, &port->status); atomic_set_mask(mask, &port->status);
} else { } else {
if (status_change_clear(mask, &port->status)) if (status_change_clear(mask, &port->status))
zfcp_rec_dbf_event_port(id, ref, port); zfcp_dbf_rec_port(id, ref, port);
atomic_clear_mask(mask, &port->status); atomic_clear_mask(mask, &port->status);
if (mask & ZFCP_STATUS_COMMON_ERP_FAILED) if (mask & ZFCP_STATUS_COMMON_ERP_FAILED)
atomic_set(&port->erp_counter, 0); atomic_set(&port->erp_counter, 0);
...@@ -1494,11 +1493,11 @@ void zfcp_erp_modify_unit_status(struct zfcp_unit *unit, char *id, void *ref, ...@@ -1494,11 +1493,11 @@ void zfcp_erp_modify_unit_status(struct zfcp_unit *unit, char *id, void *ref,
{ {
if (set_or_clear == ZFCP_SET) { if (set_or_clear == ZFCP_SET) {
if (status_change_set(mask, &unit->status)) if (status_change_set(mask, &unit->status))
zfcp_rec_dbf_event_unit(id, ref, unit); zfcp_dbf_rec_unit(id, ref, unit);
atomic_set_mask(mask, &unit->status); atomic_set_mask(mask, &unit->status);
} else { } else {
if (status_change_clear(mask, &unit->status)) if (status_change_clear(mask, &unit->status))
zfcp_rec_dbf_event_unit(id, ref, unit); zfcp_dbf_rec_unit(id, ref, unit);
atomic_clear_mask(mask, &unit->status); atomic_clear_mask(mask, &unit->status);
if (mask & ZFCP_STATUS_COMMON_ERP_FAILED) { if (mask & ZFCP_STATUS_COMMON_ERP_FAILED) {
atomic_set(&unit->erp_counter, 0); atomic_set(&unit->erp_counter, 0);
......
...@@ -34,35 +34,31 @@ extern struct zfcp_adapter *zfcp_get_adapter_by_busid(char *); ...@@ -34,35 +34,31 @@ extern struct zfcp_adapter *zfcp_get_adapter_by_busid(char *);
extern struct miscdevice zfcp_cfdc_misc; extern struct miscdevice zfcp_cfdc_misc;
/* zfcp_dbf.c */ /* zfcp_dbf.c */
extern int zfcp_adapter_debug_register(struct zfcp_adapter *); extern int zfcp_dbf_adapter_register(struct zfcp_adapter *);
extern void zfcp_adapter_debug_unregister(struct zfcp_adapter *); extern void zfcp_dbf_adapter_unregister(struct zfcp_dbf *);
extern void zfcp_rec_dbf_event_thread(char *, struct zfcp_adapter *); extern void zfcp_dbf_rec_thread(char *, struct zfcp_dbf *);
extern void zfcp_rec_dbf_event_thread_lock(char *, struct zfcp_adapter *); extern void zfcp_dbf_rec_thread_lock(char *, struct zfcp_dbf *);
extern void zfcp_rec_dbf_event_adapter(char *, void *, struct zfcp_adapter *); extern void zfcp_dbf_rec_adapter(char *, void *, struct zfcp_dbf *);
extern void zfcp_rec_dbf_event_port(char *, void *, struct zfcp_port *); extern void zfcp_dbf_rec_port(char *, void *, struct zfcp_port *);
extern void zfcp_rec_dbf_event_unit(char *, void *, struct zfcp_unit *); extern void zfcp_dbf_rec_unit(char *, void *, struct zfcp_unit *);
extern void zfcp_rec_dbf_event_trigger(char *, void *, u8, u8, void *, extern void zfcp_dbf_rec_trigger(char *, void *, u8, u8, void *,
struct zfcp_adapter *, struct zfcp_adapter *, struct zfcp_port *,
struct zfcp_port *, struct zfcp_unit *); struct zfcp_unit *);
extern void zfcp_rec_dbf_event_action(char *, struct zfcp_erp_action *); extern void zfcp_dbf_rec_action(char *, struct zfcp_erp_action *);
extern void _zfcp_hba_dbf_event_fsf_response(const char *, int level, extern void _zfcp_dbf_hba_fsf_response(const char *, int, struct zfcp_fsf_req *,
struct zfcp_fsf_req *, struct zfcp_dbf *);
struct zfcp_dbf *dbf); extern void _zfcp_dbf_hba_fsf_unsol(const char *, int level, struct zfcp_dbf *,
extern void _zfcp_hba_dbf_event_fsf_unsol(const char *, int level,
struct zfcp_adapter *,
struct fsf_status_read_buffer *); struct fsf_status_read_buffer *);
extern void zfcp_hba_dbf_event_qdio(struct zfcp_qdio *, unsigned int, int, extern void zfcp_dbf_hba_qdio(struct zfcp_dbf *, unsigned int, int, int);
int); extern void zfcp_dbf_hba_berr(struct zfcp_dbf *, struct zfcp_fsf_req *);
extern void zfcp_hba_dbf_event_berr(struct zfcp_adapter *, extern void zfcp_dbf_san_ct_request(struct zfcp_fsf_req *);
struct zfcp_fsf_req *); extern void zfcp_dbf_san_ct_response(struct zfcp_fsf_req *);
extern void zfcp_san_dbf_event_ct_request(struct zfcp_fsf_req *); extern void zfcp_dbf_san_els_request(struct zfcp_fsf_req *);
extern void zfcp_san_dbf_event_ct_response(struct zfcp_fsf_req *); extern void zfcp_dbf_san_els_response(struct zfcp_fsf_req *);
extern void zfcp_san_dbf_event_els_request(struct zfcp_fsf_req *); extern void zfcp_dbf_san_incoming_els(struct zfcp_fsf_req *);
extern void zfcp_san_dbf_event_els_response(struct zfcp_fsf_req *); extern void _zfcp_dbf_scsi(const char *, const char *, int, struct zfcp_dbf *,
extern void zfcp_san_dbf_event_incoming_els(struct zfcp_fsf_req *); struct scsi_cmnd *, struct zfcp_fsf_req *,
extern void _zfcp_scsi_dbf_event(const char *, const char *, int, unsigned long);
struct zfcp_dbf *, struct scsi_cmnd *,
struct zfcp_fsf_req *, unsigned long);
/* zfcp_erp.c */ /* zfcp_erp.c */
extern void zfcp_erp_modify_adapter_status(struct zfcp_adapter *, char *, extern void zfcp_erp_modify_adapter_status(struct zfcp_adapter *, char *,
......
...@@ -242,7 +242,7 @@ void zfcp_fc_incoming_els(struct zfcp_fsf_req *fsf_req) ...@@ -242,7 +242,7 @@ void zfcp_fc_incoming_els(struct zfcp_fsf_req *fsf_req)
(struct fsf_status_read_buffer *) fsf_req->data; (struct fsf_status_read_buffer *) fsf_req->data;
unsigned int els_type = status_buffer->payload.data[0]; unsigned int els_type = status_buffer->payload.data[0];
zfcp_san_dbf_event_incoming_els(fsf_req); zfcp_dbf_san_incoming_els(fsf_req);
if (els_type == LS_PLOGI) if (els_type == LS_PLOGI)
zfcp_fc_incoming_plogi(fsf_req); zfcp_fc_incoming_plogi(fsf_req);
else if (els_type == LS_LOGO) else if (els_type == LS_LOGO)
......
...@@ -248,13 +248,13 @@ static void zfcp_fsf_status_read_handler(struct zfcp_fsf_req *req) ...@@ -248,13 +248,13 @@ static void zfcp_fsf_status_read_handler(struct zfcp_fsf_req *req)
struct fsf_status_read_buffer *sr_buf = req->data; struct fsf_status_read_buffer *sr_buf = req->data;
if (req->status & ZFCP_STATUS_FSFREQ_DISMISSED) { if (req->status & ZFCP_STATUS_FSFREQ_DISMISSED) {
zfcp_hba_dbf_event_fsf_unsol("dism", adapter, sr_buf); zfcp_dbf_hba_fsf_unsol("dism", adapter->dbf, sr_buf);
mempool_free(sr_buf, adapter->pool.status_read_data); mempool_free(sr_buf, adapter->pool.status_read_data);
zfcp_fsf_req_free(req); zfcp_fsf_req_free(req);
return; return;
} }
zfcp_hba_dbf_event_fsf_unsol("read", adapter, sr_buf); zfcp_dbf_hba_fsf_unsol("read", adapter->dbf, sr_buf);
switch (sr_buf->status_type) { switch (sr_buf->status_type) {
case FSF_STATUS_READ_PORT_CLOSED: case FSF_STATUS_READ_PORT_CLOSED:
...@@ -269,7 +269,7 @@ static void zfcp_fsf_status_read_handler(struct zfcp_fsf_req *req) ...@@ -269,7 +269,7 @@ static void zfcp_fsf_status_read_handler(struct zfcp_fsf_req *req)
dev_warn(&adapter->ccw_device->dev, dev_warn(&adapter->ccw_device->dev,
"The error threshold for checksum statistics " "The error threshold for checksum statistics "
"has been exceeded\n"); "has been exceeded\n");
zfcp_hba_dbf_event_berr(adapter, req); zfcp_dbf_hba_berr(adapter->dbf, req);
break; break;
case FSF_STATUS_READ_LINK_DOWN: case FSF_STATUS_READ_LINK_DOWN:
zfcp_fsf_status_read_link_down(req); zfcp_fsf_status_read_link_down(req);
...@@ -355,7 +355,7 @@ static void zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *req) ...@@ -355,7 +355,7 @@ static void zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *req)
struct fsf_qtcb *qtcb = req->qtcb; struct fsf_qtcb *qtcb = req->qtcb;
union fsf_prot_status_qual *psq = &qtcb->prefix.prot_status_qual; union fsf_prot_status_qual *psq = &qtcb->prefix.prot_status_qual;
zfcp_hba_dbf_event_fsf_response(req); zfcp_dbf_hba_fsf_response(req);
if (req->status & ZFCP_STATUS_FSFREQ_DISMISSED) { if (req->status & ZFCP_STATUS_FSFREQ_DISMISSED) {
req->status |= ZFCP_STATUS_FSFREQ_ERROR | req->status |= ZFCP_STATUS_FSFREQ_ERROR |
...@@ -848,7 +848,7 @@ int zfcp_fsf_status_read(struct zfcp_qdio *qdio) ...@@ -848,7 +848,7 @@ int zfcp_fsf_status_read(struct zfcp_qdio *qdio)
mempool_free(sr_buf, adapter->pool.status_read_data); mempool_free(sr_buf, adapter->pool.status_read_data);
failed_buf: failed_buf:
zfcp_fsf_req_free(req); zfcp_fsf_req_free(req);
zfcp_hba_dbf_event_fsf_unsol("fail", adapter, NULL); zfcp_dbf_hba_fsf_unsol("fail", adapter->dbf, NULL);
out: out:
spin_unlock_bh(&qdio->req_q_lock); spin_unlock_bh(&qdio->req_q_lock);
return retval; return retval;
...@@ -968,7 +968,7 @@ static void zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *req) ...@@ -968,7 +968,7 @@ static void zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *req)
switch (header->fsf_status) { switch (header->fsf_status) {
case FSF_GOOD: case FSF_GOOD:
zfcp_san_dbf_event_ct_response(req); zfcp_dbf_san_ct_response(req);
send_ct->status = 0; send_ct->status = 0;
break; break;
case FSF_SERVICE_CLASS_NOT_SUPPORTED: case FSF_SERVICE_CLASS_NOT_SUPPORTED:
...@@ -1100,7 +1100,7 @@ int zfcp_fsf_send_ct(struct zfcp_send_ct *ct, mempool_t *pool) ...@@ -1100,7 +1100,7 @@ int zfcp_fsf_send_ct(struct zfcp_send_ct *ct, mempool_t *pool)
req->qtcb->bottom.support.timeout = ct->timeout; req->qtcb->bottom.support.timeout = ct->timeout;
req->data = ct; req->data = ct;
zfcp_san_dbf_event_ct_request(req); zfcp_dbf_san_ct_request(req);
zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT); zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT);
ret = zfcp_fsf_req_send(req); ret = zfcp_fsf_req_send(req);
...@@ -1129,7 +1129,7 @@ static void zfcp_fsf_send_els_handler(struct zfcp_fsf_req *req) ...@@ -1129,7 +1129,7 @@ static void zfcp_fsf_send_els_handler(struct zfcp_fsf_req *req)
switch (header->fsf_status) { switch (header->fsf_status) {
case FSF_GOOD: case FSF_GOOD:
zfcp_san_dbf_event_els_response(req); zfcp_dbf_san_els_response(req);
send_els->status = 0; send_els->status = 0;
break; break;
case FSF_SERVICE_CLASS_NOT_SUPPORTED: case FSF_SERVICE_CLASS_NOT_SUPPORTED:
...@@ -1203,7 +1203,7 @@ int zfcp_fsf_send_els(struct zfcp_send_els *els) ...@@ -1203,7 +1203,7 @@ int zfcp_fsf_send_els(struct zfcp_send_els *els)
bottom->timeout = 2 * R_A_TOV; bottom->timeout = 2 * R_A_TOV;
req->data = els; req->data = els;
zfcp_san_dbf_event_els_request(req); zfcp_dbf_san_els_request(req);
zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT); zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT);
ret = zfcp_fsf_req_send(req); ret = zfcp_fsf_req_send(req);
...@@ -2213,11 +2213,11 @@ static void zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *req) ...@@ -2213,11 +2213,11 @@ static void zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *req)
} }
skip_fsfstatus: skip_fsfstatus:
if (scpnt->result != 0) if (scpnt->result != 0)
zfcp_scsi_dbf_event_result("erro", 3, req->adapter, scpnt, req); zfcp_dbf_scsi_result("erro", 3, req->adapter->dbf, scpnt, req);
else if (scpnt->retries > 0) else if (scpnt->retries > 0)
zfcp_scsi_dbf_event_result("retr", 4, req->adapter, scpnt, req); zfcp_dbf_scsi_result("retr", 4, req->adapter->dbf, scpnt, req);
else else
zfcp_scsi_dbf_event_result("norm", 6, req->adapter, scpnt, req); zfcp_dbf_scsi_result("norm", 6, req->adapter->dbf, scpnt, req);
scpnt->host_scribble = NULL; scpnt->host_scribble = NULL;
(scpnt->scsi_done) (scpnt); (scpnt->scsi_done) (scpnt);
......
...@@ -101,7 +101,8 @@ static void zfcp_qdio_int_req(struct ccw_device *cdev, unsigned int qdio_err, ...@@ -101,7 +101,8 @@ static void zfcp_qdio_int_req(struct ccw_device *cdev, unsigned int qdio_err,
struct zfcp_qdio_queue *queue = &qdio->req_q; struct zfcp_qdio_queue *queue = &qdio->req_q;
if (unlikely(qdio_err)) { if (unlikely(qdio_err)) {
zfcp_hba_dbf_event_qdio(qdio, qdio_err, first, count); zfcp_dbf_hba_qdio(qdio->adapter->dbf, qdio_err, first,
count);
zfcp_qdio_handler_error(qdio, "qdireq1"); zfcp_qdio_handler_error(qdio, "qdireq1");
return; return;
} }
...@@ -143,7 +144,8 @@ static void zfcp_qdio_int_resp(struct ccw_device *cdev, unsigned int qdio_err, ...@@ -143,7 +144,8 @@ static void zfcp_qdio_int_resp(struct ccw_device *cdev, unsigned int qdio_err,
int sbal_idx, sbal_no; int sbal_idx, sbal_no;
if (unlikely(qdio_err)) { if (unlikely(qdio_err)) {
zfcp_hba_dbf_event_qdio(qdio, qdio_err, first, count); zfcp_dbf_hba_qdio(qdio->adapter->dbf, qdio_err, first,
count);
zfcp_qdio_handler_error(qdio, "qdires1"); zfcp_qdio_handler_error(qdio, "qdires1");
return; return;
} }
......
...@@ -53,11 +53,11 @@ static int zfcp_scsi_slave_configure(struct scsi_device *sdp) ...@@ -53,11 +53,11 @@ static int zfcp_scsi_slave_configure(struct scsi_device *sdp)
static void zfcp_scsi_command_fail(struct scsi_cmnd *scpnt, int result) static void zfcp_scsi_command_fail(struct scsi_cmnd *scpnt, int result)
{ {
struct zfcp_adapter *adapter =
(struct zfcp_adapter *) scpnt->device->host->hostdata[0];
set_host_byte(scpnt, result); set_host_byte(scpnt, result);
if ((scpnt->device != NULL) && (scpnt->device->host != NULL)) if ((scpnt->device != NULL) && (scpnt->device->host != NULL))
zfcp_scsi_dbf_event_result("fail", 4, zfcp_dbf_scsi_result("fail", 4, adapter->dbf, scpnt, NULL);
(struct zfcp_adapter*) scpnt->device->host->hostdata[0],
scpnt, NULL);
/* return directly */ /* return directly */
scpnt->scsi_done(scpnt); scpnt->scsi_done(scpnt);
} }
...@@ -93,7 +93,7 @@ static int zfcp_scsi_queuecommand(struct scsi_cmnd *scpnt, ...@@ -93,7 +93,7 @@ static int zfcp_scsi_queuecommand(struct scsi_cmnd *scpnt,
scsi_result = fc_remote_port_chkready(rport); scsi_result = fc_remote_port_chkready(rport);
if (unlikely(scsi_result)) { if (unlikely(scsi_result)) {
scpnt->result = scsi_result; scpnt->result = scsi_result;
zfcp_scsi_dbf_event_result("fail", 4, adapter, scpnt, NULL); zfcp_dbf_scsi_result("fail", 4, adapter->dbf, scpnt, NULL);
scpnt->scsi_done(scpnt); scpnt->scsi_done(scpnt);
return 0; return 0;
} }
...@@ -181,8 +181,8 @@ static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) ...@@ -181,8 +181,8 @@ static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
spin_unlock(&adapter->req_list_lock); spin_unlock(&adapter->req_list_lock);
if (!old_req) { if (!old_req) {
write_unlock_irqrestore(&adapter->abort_lock, flags); write_unlock_irqrestore(&adapter->abort_lock, flags);
zfcp_scsi_dbf_event_abort("lte1", adapter, scpnt, NULL, zfcp_dbf_scsi_abort("lte1", adapter->dbf, scpnt, NULL,
old_reqid); old_reqid);
return FAILED; /* completion could be in progress */ return FAILED; /* completion could be in progress */
} }
old_req->data = NULL; old_req->data = NULL;
...@@ -198,8 +198,8 @@ static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) ...@@ -198,8 +198,8 @@ static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
zfcp_erp_wait(adapter); zfcp_erp_wait(adapter);
if (!(atomic_read(&adapter->status) & if (!(atomic_read(&adapter->status) &
ZFCP_STATUS_COMMON_RUNNING)) { ZFCP_STATUS_COMMON_RUNNING)) {
zfcp_scsi_dbf_event_abort("nres", adapter, scpnt, NULL, zfcp_dbf_scsi_abort("nres", adapter->dbf, scpnt, NULL,
old_reqid); old_reqid);
return SUCCESS; return SUCCESS;
} }
} }
...@@ -216,7 +216,7 @@ static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) ...@@ -216,7 +216,7 @@ static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
dbf_tag = "fail"; dbf_tag = "fail";
retval = FAILED; retval = FAILED;
} }
zfcp_scsi_dbf_event_abort(dbf_tag, adapter, scpnt, abrt_req, old_reqid); zfcp_dbf_scsi_abort(dbf_tag, adapter->dbf, scpnt, abrt_req, old_reqid);
zfcp_fsf_req_free(abrt_req); zfcp_fsf_req_free(abrt_req);
return retval; return retval;
} }
...@@ -237,8 +237,7 @@ static int zfcp_task_mgmt_function(struct scsi_cmnd *scpnt, u8 tm_flags) ...@@ -237,8 +237,7 @@ static int zfcp_task_mgmt_function(struct scsi_cmnd *scpnt, u8 tm_flags)
zfcp_erp_wait(adapter); zfcp_erp_wait(adapter);
if (!(atomic_read(&adapter->status) & if (!(atomic_read(&adapter->status) &
ZFCP_STATUS_COMMON_RUNNING)) { ZFCP_STATUS_COMMON_RUNNING)) {
zfcp_scsi_dbf_event_devreset("nres", tm_flags, unit, zfcp_dbf_scsi_devreset("nres", tm_flags, unit, scpnt);
scpnt);
return SUCCESS; return SUCCESS;
} }
} }
...@@ -248,13 +247,13 @@ static int zfcp_task_mgmt_function(struct scsi_cmnd *scpnt, u8 tm_flags) ...@@ -248,13 +247,13 @@ static int zfcp_task_mgmt_function(struct scsi_cmnd *scpnt, u8 tm_flags)
wait_for_completion(&fsf_req->completion); wait_for_completion(&fsf_req->completion);
if (fsf_req->status & ZFCP_STATUS_FSFREQ_TMFUNCFAILED) { if (fsf_req->status & ZFCP_STATUS_FSFREQ_TMFUNCFAILED) {
zfcp_scsi_dbf_event_devreset("fail", tm_flags, unit, scpnt); zfcp_dbf_scsi_devreset("fail", tm_flags, unit, scpnt);
retval = FAILED; retval = FAILED;
} else if (fsf_req->status & ZFCP_STATUS_FSFREQ_TMFUNCNOTSUPP) { } else if (fsf_req->status & ZFCP_STATUS_FSFREQ_TMFUNCNOTSUPP) {
zfcp_scsi_dbf_event_devreset("nsup", tm_flags, unit, scpnt); zfcp_dbf_scsi_devreset("nsup", tm_flags, unit, scpnt);
retval = FAILED; retval = FAILED;
} else } else
zfcp_scsi_dbf_event_devreset("okay", tm_flags, unit, scpnt); zfcp_dbf_scsi_devreset("okay", tm_flags, unit, scpnt);
zfcp_fsf_req_free(fsf_req); zfcp_fsf_req_free(fsf_req);
return retval; return retval;
......
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