Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -517,6 +517,7 @@ int zfcp_adapter_enqueue(struct ccw_device *ccw_device)
		goto qdio_mem_failed;

	adapter->qdio->adapter = adapter;

	ccw_device->handler = NULL;
	adapter->ccw_device = ccw_device;
	atomic_set(&adapter->refcount, 0);
@@ -530,7 +531,7 @@ int zfcp_adapter_enqueue(struct ccw_device *ccw_device)
	if (zfcp_reqlist_alloc(adapter))
		goto failed_low_mem_buffers;

	if (zfcp_adapter_debug_register(adapter))
	if (zfcp_dbf_adapter_register(adapter))
		goto debug_register_failed;

	if (zfcp_setup_adapter_work_queue(adapter))
@@ -577,7 +578,7 @@ int zfcp_adapter_enqueue(struct ccw_device *ccw_device)
sysfs_failed:
	zfcp_destroy_adapter_work_queue(adapter);
work_queue_failed:
	zfcp_adapter_debug_unregister(adapter);
	zfcp_dbf_adapter_unregister(adapter->dbf);
debug_register_failed:
	dev_set_drvdata(&ccw_device->dev, NULL);
	kfree(adapter->req_list);
@@ -616,7 +617,7 @@ void zfcp_adapter_dequeue(struct zfcp_adapter *adapter)
		return;

	zfcp_destroy_adapter_work_queue(adapter);
	zfcp_adapter_debug_unregister(adapter);
	zfcp_dbf_adapter_unregister(adapter->dbf);
	zfcp_qdio_free(adapter->qdio);
	zfcp_free_low_mem_buffers(adapter);
	kfree(adapter->req_list);
+192 −216

File changed.

Preview size limit exceeded, changes collapsed.

+73 −79
Original line number Diff line number Diff line
@@ -37,13 +37,13 @@ struct zfcp_dbf_dump {
	u8 data[];		/* dump data */
} __attribute__ ((packed));

struct zfcp_rec_dbf_record_thread {
struct zfcp_dbf_rec_record_thread {
	u32 total;
	u32 ready;
	u32 running;
};

struct zfcp_rec_dbf_record_target {
struct zfcp_dbf_rec_record_target {
	u64 ref;
	u32 status;
	u32 d_id;
@@ -52,7 +52,7 @@ struct zfcp_rec_dbf_record_target {
	u32 erp_count;
};

struct zfcp_rec_dbf_record_trigger {
struct zfcp_dbf_rec_record_trigger {
	u8 want;
	u8 need;
	u32 as;
@@ -64,21 +64,21 @@ struct zfcp_rec_dbf_record_trigger {
	u64 fcp_lun;
};

struct zfcp_rec_dbf_record_action {
struct zfcp_dbf_rec_record_action {
	u32 status;
	u32 step;
	u64 action;
	u64 fsf_req;
};

struct zfcp_rec_dbf_record {
struct zfcp_dbf_rec_record {
	u8 id;
	char id2[7];
	union {
		struct zfcp_rec_dbf_record_action action;
		struct zfcp_rec_dbf_record_thread thread;
		struct zfcp_rec_dbf_record_target target;
		struct zfcp_rec_dbf_record_trigger trigger;
		struct zfcp_dbf_rec_record_action action;
		struct zfcp_dbf_rec_record_thread thread;
		struct zfcp_dbf_rec_record_target target;
		struct zfcp_dbf_rec_record_trigger trigger;
	} u;
};

@@ -89,7 +89,7 @@ enum {
	ZFCP_REC_DBF_ID_TRIGGER,
};

struct zfcp_hba_dbf_record_response {
struct zfcp_dbf_hba_record_response {
	u32 fsf_command;
	u64 fsf_reqid;
	u32 fsf_seqno;
@@ -127,7 +127,7 @@ struct zfcp_hba_dbf_record_response {
	} u;
} __attribute__ ((packed));

struct zfcp_hba_dbf_record_status {
struct zfcp_dbf_hba_record_status {
	u8 failed;
	u32 status_type;
	u32 status_subtype;
@@ -141,24 +141,24 @@ struct zfcp_hba_dbf_record_status {
	u8 payload[ZFCP_DBF_UNSOL_PAYLOAD];
} __attribute__ ((packed));

struct zfcp_hba_dbf_record_qdio {
struct zfcp_dbf_hba_record_qdio {
	u32 qdio_error;
	u8 sbal_index;
	u8 sbal_count;
} __attribute__ ((packed));

struct zfcp_hba_dbf_record {
struct zfcp_dbf_hba_record {
	u8 tag[ZFCP_DBF_TAG_SIZE];
	u8 tag2[ZFCP_DBF_TAG_SIZE];
	union {
		struct zfcp_hba_dbf_record_response response;
		struct zfcp_hba_dbf_record_status status;
		struct zfcp_hba_dbf_record_qdio qdio;
		struct zfcp_dbf_hba_record_response response;
		struct zfcp_dbf_hba_record_status status;
		struct zfcp_dbf_hba_record_qdio qdio;
		struct fsf_bit_error_payload berr;
	} u;
} __attribute__ ((packed));

struct zfcp_san_dbf_record_ct_request {
struct zfcp_dbf_san_record_ct_request {
	u16 cmd_req_code;
	u8 revision;
	u8 gs_type;
@@ -168,7 +168,7 @@ struct zfcp_san_dbf_record_ct_request {
	u32 len;
} __attribute__ ((packed));

struct zfcp_san_dbf_record_ct_response {
struct zfcp_dbf_san_record_ct_response {
	u16 cmd_rsp_code;
	u8 revision;
	u8 reason_code;
@@ -178,27 +178,27 @@ struct zfcp_san_dbf_record_ct_response {
	u32 len;
} __attribute__ ((packed));

struct zfcp_san_dbf_record_els {
struct zfcp_dbf_san_record_els {
	u8 ls_code;
	u32 len;
} __attribute__ ((packed));

struct zfcp_san_dbf_record {
struct zfcp_dbf_san_record {
	u8 tag[ZFCP_DBF_TAG_SIZE];
	u64 fsf_reqid;
	u32 fsf_seqno;
	u32 s_id;
	u32 d_id;
	union {
		struct zfcp_san_dbf_record_ct_request ct_req;
		struct zfcp_san_dbf_record_ct_response ct_resp;
		struct zfcp_san_dbf_record_els els;
		struct zfcp_dbf_san_record_ct_request ct_req;
		struct zfcp_dbf_san_record_ct_response ct_resp;
		struct zfcp_dbf_san_record_els els;
	} u;
#define ZFCP_DBF_SAN_MAX_PAYLOAD 1024
	u8 payload[32];
} __attribute__ ((packed));

struct zfcp_scsi_dbf_record {
struct zfcp_dbf_scsi_record {
	u8 tag[ZFCP_DBF_TAG_SIZE];
	u8 tag2[ZFCP_DBF_TAG_SIZE];
	u32 scsi_id;
@@ -225,86 +225,84 @@ struct zfcp_scsi_dbf_record {
} __attribute__ ((packed));

struct zfcp_dbf {
	debug_info_t			*rec_dbf;
	debug_info_t			*hba_dbf;
	debug_info_t			*san_dbf;
	debug_info_t			*scsi_dbf;
	spinlock_t			rec_dbf_lock;
	spinlock_t			hba_dbf_lock;
	spinlock_t			san_dbf_lock;
	spinlock_t			scsi_dbf_lock;
	struct zfcp_rec_dbf_record	rec_dbf_buf;
	struct zfcp_hba_dbf_record	hba_dbf_buf;
	struct zfcp_san_dbf_record	san_dbf_buf;
	struct zfcp_scsi_dbf_record	scsi_dbf_buf;
	debug_info_t			*rec;
	debug_info_t			*hba;
	debug_info_t			*san;
	debug_info_t			*scsi;
	spinlock_t			rec_lock;
	spinlock_t			hba_lock;
	spinlock_t			san_lock;
	spinlock_t			scsi_lock;
	struct zfcp_dbf_rec_record	rec_buf;
	struct zfcp_dbf_hba_record	hba_buf;
	struct zfcp_dbf_san_record	san_buf;
	struct zfcp_dbf_scsi_record	scsi_buf;
	struct zfcp_adapter		*adapter;
};

static inline
void zfcp_hba_dbf_event_fsf_resp(const char *tag2, int level,
void zfcp_dbf_hba_fsf_resp(const char *tag2, int level,
			   struct zfcp_fsf_req *req, struct zfcp_dbf *dbf)
{
	if (level <= dbf->hba_dbf->level)
		_zfcp_hba_dbf_event_fsf_response(tag2, level, req, dbf);
	if (level <= dbf->hba->level)
		_zfcp_dbf_hba_fsf_response(tag2, level, req, dbf);
}

/**
 * zfcp_hba_dbf_event_fsf_response - trace event for request completion
 * zfcp_dbf_hba_fsf_response - trace event for request completion
 * @fsf_req: request that has been completed
 */
static inline void zfcp_hba_dbf_event_fsf_response(struct zfcp_fsf_req *req)
static inline void zfcp_dbf_hba_fsf_response(struct zfcp_fsf_req *req)
{
	struct zfcp_dbf *dbf = req->adapter->dbf;
	struct fsf_qtcb *qtcb = req->qtcb;

	if ((qtcb->prefix.prot_status != FSF_PROT_GOOD) &&
	    (qtcb->prefix.prot_status != FSF_PROT_FSF_STATUS_PRESENTED)) {
		zfcp_hba_dbf_event_fsf_resp("perr", 1, req, dbf);
		zfcp_dbf_hba_fsf_resp("perr", 1, req, dbf);

	} else if (qtcb->header.fsf_status != FSF_GOOD) {
		zfcp_hba_dbf_event_fsf_resp("ferr", 1, req, dbf);
		zfcp_dbf_hba_fsf_resp("ferr", 1, req, dbf);

	} else if ((req->fsf_command == FSF_QTCB_OPEN_PORT_WITH_DID) ||
		   (req->fsf_command == FSF_QTCB_OPEN_LUN)) {
		zfcp_hba_dbf_event_fsf_resp("open", 4, req, dbf);
		zfcp_dbf_hba_fsf_resp("open", 4, req, dbf);

	} else if (qtcb->header.log_length) {
		zfcp_hba_dbf_event_fsf_resp("qtcb", 5, req, dbf);
		zfcp_dbf_hba_fsf_resp("qtcb", 5, req, dbf);

	} else {
		zfcp_hba_dbf_event_fsf_resp("norm", 6, req, dbf);
		zfcp_dbf_hba_fsf_resp("norm", 6, req, dbf);
	}
 }

/**
 * zfcp_hba_dbf_event_fsf_unsol - trace event for an unsolicited status buffer
 * zfcp_dbf_hba_fsf_unsol - trace event for an unsolicited status buffer
 * @tag: tag indicating which kind of unsolicited status has been received
 * @adapter: adapter that has issued the unsolicited status buffer
 * @dbf: reference to dbf structure
 * @status_buffer: buffer containing payload of unsolicited status
 */
static inline
void zfcp_hba_dbf_event_fsf_unsol(const char *tag, struct zfcp_adapter *adapter,
void zfcp_dbf_hba_fsf_unsol(const char *tag, struct zfcp_dbf *dbf,
			    struct fsf_status_read_buffer *buf)
{
	struct zfcp_dbf *dbf = adapter->dbf;
	int level = 2;

	if (level <= dbf->hba_dbf->level)
		_zfcp_hba_dbf_event_fsf_unsol(tag, level, adapter, buf);
	if (level <= dbf->hba->level)
		_zfcp_dbf_hba_fsf_unsol(tag, level, dbf, buf);
}

static inline
void zfcp_scsi_dbf_event(const char *tag, const char *tag2, int level,
			 struct zfcp_adapter *adapter, struct scsi_cmnd *scmd,
void zfcp_dbf_scsi(const char *tag, const char *tag2, int level,
		   struct zfcp_dbf *dbf, struct scsi_cmnd *scmd,
		   struct zfcp_fsf_req *req, unsigned long old_id)
{
	struct zfcp_dbf *dbf = adapter->dbf;

	if (level <= dbf->scsi_dbf->level)
		_zfcp_scsi_dbf_event(tag, tag2, level, dbf, scmd, req, old_id);
	if (level <= dbf->scsi->level)
		_zfcp_dbf_scsi(tag, tag2, level, dbf, scmd, req, old_id);
}

/**
 * zfcp_scsi_dbf_event_result - trace event for SCSI command completion
 * zfcp_dbf_scsi_result - trace event for SCSI command completion
 * @tag: tag indicating success or failure of SCSI command
 * @level: trace level applicable for this event
 * @adapter: adapter that has been used to issue the SCSI command
@@ -312,16 +310,14 @@ void zfcp_scsi_dbf_event(const char *tag, const char *tag2, int level,
 * @fsf_req: request used to issue SCSI command (might be NULL)
 */
static inline
void zfcp_scsi_dbf_event_result(const char *tag, int level,
				struct zfcp_adapter *adapter,
				struct scsi_cmnd *scmd,
				struct zfcp_fsf_req *fsf_req)
void zfcp_dbf_scsi_result(const char *tag, int level, struct zfcp_dbf *dbf,
			  struct scsi_cmnd *scmd, struct zfcp_fsf_req *fsf_req)
{
	zfcp_scsi_dbf_event("rslt", tag, level, adapter, scmd, fsf_req, 0);
	zfcp_dbf_scsi("rslt", tag, level, dbf, scmd, fsf_req, 0);
}

/**
 * zfcp_scsi_dbf_event_abort - trace event for SCSI command abort
 * zfcp_dbf_scsi_abort - trace event for SCSI command abort
 * @tag: tag indicating success or failure of abort operation
 * @adapter: adapter thas has been used to issue SCSI command to be aborted
 * @scmd: SCSI command to be aborted
@@ -329,28 +325,26 @@ void zfcp_scsi_dbf_event_result(const char *tag, int level,
 * @old_id: identifier of request containg SCSI command to be aborted
 */
static inline
void zfcp_scsi_dbf_event_abort(const char *tag, struct zfcp_adapter *adapter,
			       struct scsi_cmnd *scmd,
			       struct zfcp_fsf_req *new_req,
void zfcp_dbf_scsi_abort(const char *tag, struct zfcp_dbf *dbf,
			 struct scsi_cmnd *scmd, struct zfcp_fsf_req *new_req,
			 unsigned long old_id)
{
	zfcp_scsi_dbf_event("abrt", tag, 1, adapter, scmd, new_req, old_id);
	zfcp_dbf_scsi("abrt", tag, 1, dbf, scmd, new_req, old_id);
}

/**
 * zfcp_scsi_dbf_event_devreset - trace event for Logical Unit or Target Reset
 * zfcp_dbf_scsi_devreset - trace event for Logical Unit or Target Reset
 * @tag: tag indicating success or failure of reset operation
 * @flag: indicates type of reset (Target Reset, Logical Unit Reset)
 * @unit: unit that needs reset
 * @scsi_cmnd: SCSI command which caused this error recovery
 */
static inline
void zfcp_scsi_dbf_event_devreset(const char *tag, u8 flag,
				  struct zfcp_unit *unit,
void zfcp_dbf_scsi_devreset(const char *tag, u8 flag, struct zfcp_unit *unit,
			    struct scsi_cmnd *scsi_cmnd)
{
	zfcp_scsi_dbf_event(flag == FCP_TARGET_RESET ? "trst" : "lrst", tag, 1,
			    unit->port->adapter, scsi_cmnd, NULL, 0);
	zfcp_dbf_scsi(flag == FCP_TARGET_RESET ? "trst" : "lrst", tag, 1,
			    unit->port->adapter->dbf, scsi_cmnd, NULL, 0);
}

#endif /* ZFCP_DBF_H */
+24 −25
Original line number Diff line number Diff line
@@ -74,9 +74,9 @@ static void zfcp_erp_action_ready(struct zfcp_erp_action *act)
	struct zfcp_adapter *adapter = act->adapter;

	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);
	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)
@@ -227,11 +227,10 @@ static int zfcp_erp_action_enqueue(int want, struct zfcp_adapter *adapter,
	++adapter->erp_total_count;
	list_add_tail(&act->list, &adapter->erp_ready_head);
	up(&adapter->erp_ready_sem);
	zfcp_rec_dbf_event_thread("eracte1", adapter);
	zfcp_dbf_rec_thread("eracte1", adapter->dbf);
	retval = 0;
 out:
	zfcp_rec_dbf_event_trigger(id, ref, want, need, act,
				   adapter, port, unit);
	zfcp_dbf_rec_trigger(id, ref, want, need, act, adapter, port, unit);
	return retval;
}

@@ -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)
{
	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);
}

static void zfcp_erp_port_unblock(struct zfcp_port *port)
{
	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);
}

static void zfcp_erp_unit_unblock(struct zfcp_unit *unit)
{
	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);
}

static void zfcp_erp_action_to_running(struct zfcp_erp_action *erp_action)
{
	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)
@@ -479,11 +478,11 @@ static void zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *act)
		if (act->status & (ZFCP_STATUS_ERP_DISMISSED |
				   ZFCP_STATUS_ERP_TIMEDOUT)) {
			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;
		}
		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)
			act->fsf_req = NULL;
	} else
@@ -641,9 +640,9 @@ static int zfcp_erp_adapter_strat_fsf_xconf(struct zfcp_erp_action *erp_action)
			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);
		zfcp_rec_dbf_event_thread_lock("erasfx2", adapter);
		zfcp_dbf_rec_thread_lock("erasfx2", adapter->dbf);
		if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT)
			break;

@@ -682,9 +681,9 @@ static int zfcp_erp_adapter_strategy_open_fsf_xport(struct zfcp_erp_action *act)
	if (ret)
		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);
	zfcp_rec_dbf_event_thread_lock("erasox2", adapter);
	zfcp_dbf_rec_thread_lock("erasox2", adapter->dbf);
	if (act->status & ZFCP_STATUS_ERP_TIMEDOUT)
		return ZFCP_ERP_FAILED;

@@ -1138,7 +1137,7 @@ static void zfcp_erp_action_dequeue(struct zfcp_erp_action *erp_action)
	}

	list_del(&erp_action->list);
	zfcp_rec_dbf_event_action("eractd1", erp_action);
	zfcp_dbf_rec_action("eractd1", erp_action);

	switch (erp_action->action) {
	case ZFCP_ERP_ACTION_REOPEN_UNIT:
@@ -1297,9 +1296,9 @@ static int zfcp_erp_thread(void *data)
	while (!(atomic_read(&adapter->status) &
		 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);
		zfcp_rec_dbf_event_thread_lock("erthrd2", adapter);
		zfcp_dbf_rec_thread_lock("erthrd2", adapter->dbf);

		write_lock_irqsave(&adapter->erp_lock, flags);
		next = adapter->erp_ready_head.next;
@@ -1356,7 +1355,7 @@ void zfcp_erp_thread_kill(struct zfcp_adapter *adapter)
{
	atomic_set_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_KILL, &adapter->status);
	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,
		   !(atomic_read(&adapter->status) &
@@ -1431,11 +1430,11 @@ void zfcp_erp_modify_adapter_status(struct zfcp_adapter *adapter, char *id,

	if (set_or_clear == ZFCP_SET) {
		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);
	} else {
		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);
		if (mask & ZFCP_STATUS_COMMON_ERP_FAILED)
			atomic_set(&adapter->erp_counter, 0);
@@ -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 (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);
	} else {
		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);
		if (mask & ZFCP_STATUS_COMMON_ERP_FAILED)
			atomic_set(&port->erp_counter, 0);
@@ -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 (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);
	} else {
		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);
		if (mask & ZFCP_STATUS_COMMON_ERP_FAILED) {
			atomic_set(&unit->erp_counter, 0);
+24 −28
Original line number Diff line number Diff line
@@ -34,35 +34,31 @@ extern struct zfcp_adapter *zfcp_get_adapter_by_busid(char *);
extern struct miscdevice zfcp_cfdc_misc;

/* zfcp_dbf.c */
extern int zfcp_adapter_debug_register(struct zfcp_adapter *);
extern void zfcp_adapter_debug_unregister(struct zfcp_adapter *);
extern void zfcp_rec_dbf_event_thread(char *, struct zfcp_adapter *);
extern void zfcp_rec_dbf_event_thread_lock(char *, struct zfcp_adapter *);
extern void zfcp_rec_dbf_event_adapter(char *, void *, struct zfcp_adapter *);
extern void zfcp_rec_dbf_event_port(char *, void *, struct zfcp_port *);
extern void zfcp_rec_dbf_event_unit(char *, void *, struct zfcp_unit *);
extern void zfcp_rec_dbf_event_trigger(char *, void *, u8, u8, void *,
				       struct zfcp_adapter *,
				       struct zfcp_port *, struct zfcp_unit *);
extern void zfcp_rec_dbf_event_action(char *, struct zfcp_erp_action *);
extern void _zfcp_hba_dbf_event_fsf_response(const char *, int level,
					     struct zfcp_fsf_req *,
					     struct zfcp_dbf *dbf);
extern void _zfcp_hba_dbf_event_fsf_unsol(const char *, int level,
					  struct zfcp_adapter *,
extern int zfcp_dbf_adapter_register(struct zfcp_adapter *);
extern void zfcp_dbf_adapter_unregister(struct zfcp_dbf *);
extern void zfcp_dbf_rec_thread(char *, struct zfcp_dbf *);
extern void zfcp_dbf_rec_thread_lock(char *, struct zfcp_dbf *);
extern void zfcp_dbf_rec_adapter(char *, void *, struct zfcp_dbf *);
extern void zfcp_dbf_rec_port(char *, void *, struct zfcp_port *);
extern void zfcp_dbf_rec_unit(char *, void *, struct zfcp_unit *);
extern void zfcp_dbf_rec_trigger(char *, void *, u8, u8, void *,
				 struct zfcp_adapter *, struct zfcp_port *,
				 struct zfcp_unit *);
extern void zfcp_dbf_rec_action(char *, struct zfcp_erp_action *);
extern void _zfcp_dbf_hba_fsf_response(const char *, int, struct zfcp_fsf_req *,
				       struct zfcp_dbf *);
extern void _zfcp_dbf_hba_fsf_unsol(const char *, int level, struct zfcp_dbf *,
					  struct fsf_status_read_buffer *);
extern void zfcp_hba_dbf_event_qdio(struct zfcp_qdio *, unsigned int, int,
				    int);
extern void zfcp_hba_dbf_event_berr(struct zfcp_adapter *,
				    struct zfcp_fsf_req *);
extern void zfcp_san_dbf_event_ct_request(struct zfcp_fsf_req *);
extern void zfcp_san_dbf_event_ct_response(struct zfcp_fsf_req *);
extern void zfcp_san_dbf_event_els_request(struct zfcp_fsf_req *);
extern void zfcp_san_dbf_event_els_response(struct zfcp_fsf_req *);
extern void zfcp_san_dbf_event_incoming_els(struct zfcp_fsf_req *);
extern void _zfcp_scsi_dbf_event(const char *, const char *, int,
				 struct zfcp_dbf *, struct scsi_cmnd *,
				 struct zfcp_fsf_req *, unsigned long);
extern void zfcp_dbf_hba_qdio(struct zfcp_dbf *, unsigned int, int, int);
extern void zfcp_dbf_hba_berr(struct zfcp_dbf *, struct zfcp_fsf_req *);
extern void zfcp_dbf_san_ct_request(struct zfcp_fsf_req *);
extern void zfcp_dbf_san_ct_response(struct zfcp_fsf_req *);
extern void zfcp_dbf_san_els_request(struct zfcp_fsf_req *);
extern void zfcp_dbf_san_els_response(struct zfcp_fsf_req *);
extern void zfcp_dbf_san_incoming_els(struct zfcp_fsf_req *);
extern void _zfcp_dbf_scsi(const char *, const char *, int, struct zfcp_dbf *,
			   struct scsi_cmnd *, struct zfcp_fsf_req *,
			   unsigned long);

/* zfcp_erp.c */
extern void zfcp_erp_modify_adapter_status(struct zfcp_adapter *, char *,
Loading