mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-24 02:18:18 +07:00
bd571195c9
Without CONFIG_DEBUG_FS, we run into a link error:
drivers/scsi/qedi/qedi_iscsi.o: In function `qedi_ep_poll':
qedi_iscsi.c:(.text.qedi_ep_poll+0x134): undefined reference to `do_not_recover'
drivers/scsi/qedi/qedi_iscsi.o: In function `qedi_ep_disconnect':
qedi_iscsi.c:(.text.qedi_ep_disconnect+0x36c): undefined reference to `do_not_recover'
drivers/scsi/qedi/qedi_iscsi.o: In function `qedi_ep_connect':
qedi_iscsi.c:(.text.qedi_ep_connect+0x350): undefined reference to `do_not_recover'
drivers/scsi/qedi/qedi_fw.o: In function `qedi_tmf_work':
qedi_fw.c:(.text.qedi_tmf_work+0x3b4): undefined reference to `do_not_recover'
This defines the symbol as a constant in this case, as there is no way to
set it to anything other than zero without DEBUG_FS. In addition, I'm renaming
it to qedi_do_not_recover in order to put it into a driver specific namespace,
as "do_not_recover" is a really bad name for a kernel-wide global identifier
when it is used only in one driver.
Fixes: ace7f46ba5
("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.")
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Manish Rangankar <Manish.Rangankar@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
80 lines
3.1 KiB
C
80 lines
3.1 KiB
C
/*
|
|
* QLogic iSCSI Offload Driver
|
|
* Copyright (c) 2016 Cavium Inc.
|
|
*
|
|
* This software is available under the terms of the GNU General Public License
|
|
* (GPL) Version 2, available from the file COPYING in the main directory of
|
|
* this source tree.
|
|
*/
|
|
|
|
#ifndef _QEDI_GBL_H_
|
|
#define _QEDI_GBL_H_
|
|
|
|
#include "qedi_iscsi.h"
|
|
|
|
#ifdef CONFIG_DEBUG_FS
|
|
extern int qedi_do_not_recover;
|
|
#else
|
|
#define qedi_do_not_recover (0)
|
|
#endif
|
|
|
|
extern uint qedi_io_tracing;
|
|
|
|
extern struct scsi_host_template qedi_host_template;
|
|
extern struct iscsi_transport qedi_iscsi_transport;
|
|
extern const struct qed_iscsi_ops *qedi_ops;
|
|
extern struct qedi_debugfs_ops qedi_debugfs_ops;
|
|
extern const struct file_operations qedi_dbg_fops;
|
|
extern struct device_attribute *qedi_shost_attrs[];
|
|
|
|
int qedi_alloc_sq(struct qedi_ctx *qedi, struct qedi_endpoint *ep);
|
|
void qedi_free_sq(struct qedi_ctx *qedi, struct qedi_endpoint *ep);
|
|
|
|
int qedi_send_iscsi_login(struct qedi_conn *qedi_conn,
|
|
struct iscsi_task *task);
|
|
int qedi_send_iscsi_logout(struct qedi_conn *qedi_conn,
|
|
struct iscsi_task *task);
|
|
int qedi_iscsi_abort_work(struct qedi_conn *qedi_conn,
|
|
struct iscsi_task *mtask);
|
|
int qedi_send_iscsi_text(struct qedi_conn *qedi_conn,
|
|
struct iscsi_task *task);
|
|
int qedi_send_iscsi_nopout(struct qedi_conn *qedi_conn,
|
|
struct iscsi_task *task,
|
|
char *datap, int data_len, int unsol);
|
|
int qedi_iscsi_send_ioreq(struct iscsi_task *task);
|
|
int qedi_get_task_idx(struct qedi_ctx *qedi);
|
|
void qedi_clear_task_idx(struct qedi_ctx *qedi, int idx);
|
|
int qedi_iscsi_cleanup_task(struct iscsi_task *task,
|
|
bool mark_cmd_node_deleted);
|
|
void qedi_iscsi_unmap_sg_list(struct qedi_cmd *cmd);
|
|
void qedi_update_itt_map(struct qedi_ctx *qedi, u32 tid, u32 proto_itt,
|
|
struct qedi_cmd *qedi_cmd);
|
|
void qedi_get_proto_itt(struct qedi_ctx *qedi, u32 tid, u32 *proto_itt);
|
|
void qedi_get_task_tid(struct qedi_ctx *qedi, u32 itt, int16_t *tid);
|
|
void qedi_process_iscsi_error(struct qedi_endpoint *ep,
|
|
struct async_data *data);
|
|
void qedi_start_conn_recovery(struct qedi_ctx *qedi,
|
|
struct qedi_conn *qedi_conn);
|
|
struct qedi_conn *qedi_get_conn_from_id(struct qedi_ctx *qedi, u32 iscsi_cid);
|
|
void qedi_process_tcp_error(struct qedi_endpoint *ep, struct async_data *data);
|
|
void qedi_mark_device_missing(struct iscsi_cls_session *cls_session);
|
|
void qedi_mark_device_available(struct iscsi_cls_session *cls_session);
|
|
void qedi_reset_host_mtu(struct qedi_ctx *qedi, u16 mtu);
|
|
int qedi_recover_all_conns(struct qedi_ctx *qedi);
|
|
void qedi_fp_process_cqes(struct qedi_work *work);
|
|
int qedi_cleanup_all_io(struct qedi_ctx *qedi,
|
|
struct qedi_conn *qedi_conn,
|
|
struct iscsi_task *task, bool in_recovery);
|
|
void qedi_trace_io(struct qedi_ctx *qedi, struct iscsi_task *task,
|
|
u16 tid, int8_t direction);
|
|
int qedi_alloc_id(struct qedi_portid_tbl *id_tbl, u16 id);
|
|
u16 qedi_alloc_new_id(struct qedi_portid_tbl *id_tbl);
|
|
void qedi_free_id(struct qedi_portid_tbl *id_tbl, u16 id);
|
|
int qedi_create_sysfs_ctx_attr(struct qedi_ctx *qedi);
|
|
void qedi_remove_sysfs_ctx_attr(struct qedi_ctx *qedi);
|
|
void qedi_clearsq(struct qedi_ctx *qedi,
|
|
struct qedi_conn *qedi_conn,
|
|
struct iscsi_task *task);
|
|
|
|
#endif
|