mirror of
https://github.com/armbian/linux-cix.git
synced 2026-01-06 12:30:45 -08:00
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI updates from James Bottomley: "This consists of a small set of driver updates (lpfc, ufs, mpt3sas mpi3mr, iscsi target). Apart from that this is mostly small fixes with very few core changes (the biggest one being VPD caching)" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (177 commits) scsi: target: tcmu: Avoid holding XArray lock when calling lock_page scsi: elx: efct: Remove NULL check after calling container_of() scsi: dpt_i2o: Drop redundant spinlock initialization scsi: qedf: Remove redundant variable op scsi: hisi_sas: Fix memory ordering in hisi_sas_task_deliver() scsi: fnic: Replace DMA mask of 64 bits with 47 bits scsi: mpi3mr: Add target device related sysfs attributes scsi: mpi3mr: Add shost related sysfs attributes scsi: elx: efct: Remove redundant memset() statement scsi: megaraid_sas: Remove redundant memset() statement scsi: mpi3mr: Return error if dma_alloc_coherent() fails scsi: hisi_sas: Fix rescan after deleting a disk scsi: hisi_sas: Use sas_ata_wait_after_reset() in IT nexus reset scsi: libsas: Refactor sas_ata_hard_reset() scsi: mpt3sas: Update driver version to 42.100.00.00 scsi: mpt3sas: Fix junk chars displayed while printing ChipName scsi: ipr: Use kobj_to_dev() scsi: mpi3mr: Fix a NULL vs IS_ERR() bug in mpi3mr_bsg_init() scsi: bnx2fc: Avoid using get_cpu() in bnx2fc_cmd_alloc() scsi: libfc: Remove get_cpu() semantics in fc_exch_em_alloc() ...
This commit is contained in:
@@ -1518,7 +1518,7 @@ Description: This entry shows the number of reads that cannot be changed to
|
||||
|
||||
The file is read only.
|
||||
|
||||
What: /sys/class/scsi_device/*/device/hpb_stats/rb_noti_cnt
|
||||
What: /sys/class/scsi_device/*/device/hpb_stats/rcmd_noti_cnt
|
||||
Date: June 2021
|
||||
Contact: Daejun Park <daejun7.park@samsung.com>
|
||||
Description: This entry shows the number of response UPIUs that has
|
||||
@@ -1526,19 +1526,23 @@ Description: This entry shows the number of response UPIUs that has
|
||||
|
||||
The file is read only.
|
||||
|
||||
What: /sys/class/scsi_device/*/device/hpb_stats/rb_active_cnt
|
||||
What: /sys/class/scsi_device/*/device/hpb_stats/rcmd_active_cnt
|
||||
Date: June 2021
|
||||
Contact: Daejun Park <daejun7.park@samsung.com>
|
||||
Description: This entry shows the number of active sub-regions recommended by
|
||||
response UPIUs.
|
||||
Description: For the HPB device control mode, this entry shows the number of
|
||||
active sub-regions recommended by response UPIUs. For the HPB host control
|
||||
mode, this entry shows the number of active sub-regions recommended by the
|
||||
HPB host control mode heuristic algorithm.
|
||||
|
||||
The file is read only.
|
||||
|
||||
What: /sys/class/scsi_device/*/device/hpb_stats/rb_inactive_cnt
|
||||
What: /sys/class/scsi_device/*/device/hpb_stats/rcmd_inactive_cnt
|
||||
Date: June 2021
|
||||
Contact: Daejun Park <daejun7.park@samsung.com>
|
||||
Description: This entry shows the number of inactive regions recommended by
|
||||
response UPIUs.
|
||||
Description: For the HPB device control mode, this entry shows the number of
|
||||
inactive regions recommended by response UPIUs. For the HPB host control
|
||||
mode, this entry shows the number of inactive regions recommended by the
|
||||
HPB host control mode heuristic algorithm.
|
||||
|
||||
The file is read only.
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ static struct workqueue_struct *isert_comp_wq;
|
||||
static struct workqueue_struct *isert_release_wq;
|
||||
|
||||
static int
|
||||
isert_put_response(struct iscsi_conn *conn, struct iscsi_cmd *cmd);
|
||||
isert_put_response(struct iscsit_conn *conn, struct iscsit_cmd *cmd);
|
||||
static int
|
||||
isert_login_post_recv(struct isert_conn *isert_conn);
|
||||
static int
|
||||
@@ -909,7 +909,7 @@ isert_login_post_recv(struct isert_conn *isert_conn)
|
||||
}
|
||||
|
||||
static int
|
||||
isert_put_login_tx(struct iscsi_conn *conn, struct iscsi_login *login,
|
||||
isert_put_login_tx(struct iscsit_conn *conn, struct iscsi_login *login,
|
||||
u32 length)
|
||||
{
|
||||
struct isert_conn *isert_conn = conn->context;
|
||||
@@ -976,7 +976,7 @@ isert_rx_login_req(struct isert_conn *isert_conn)
|
||||
{
|
||||
struct iser_rx_desc *rx_desc = isert_conn->login_desc;
|
||||
int rx_buflen = isert_conn->login_req_len;
|
||||
struct iscsi_conn *conn = isert_conn->conn;
|
||||
struct iscsit_conn *conn = isert_conn->conn;
|
||||
struct iscsi_login *login = conn->conn_login;
|
||||
int size;
|
||||
|
||||
@@ -1020,21 +1020,21 @@ isert_rx_login_req(struct isert_conn *isert_conn)
|
||||
schedule_delayed_work(&conn->login_work, 0);
|
||||
}
|
||||
|
||||
static struct iscsi_cmd
|
||||
*isert_allocate_cmd(struct iscsi_conn *conn, struct iser_rx_desc *rx_desc)
|
||||
static struct iscsit_cmd
|
||||
*isert_allocate_cmd(struct iscsit_conn *conn, struct iser_rx_desc *rx_desc)
|
||||
{
|
||||
struct isert_conn *isert_conn = conn->context;
|
||||
struct isert_cmd *isert_cmd;
|
||||
struct iscsi_cmd *cmd;
|
||||
struct iscsit_cmd *cmd;
|
||||
|
||||
cmd = iscsit_allocate_cmd(conn, TASK_INTERRUPTIBLE);
|
||||
if (!cmd) {
|
||||
isert_err("Unable to allocate iscsi_cmd + isert_cmd\n");
|
||||
isert_err("Unable to allocate iscsit_cmd + isert_cmd\n");
|
||||
return NULL;
|
||||
}
|
||||
isert_cmd = iscsit_priv_cmd(cmd);
|
||||
isert_cmd->conn = isert_conn;
|
||||
isert_cmd->iscsi_cmd = cmd;
|
||||
isert_cmd->iscsit_cmd = cmd;
|
||||
isert_cmd->rx_desc = rx_desc;
|
||||
|
||||
return cmd;
|
||||
@@ -1042,10 +1042,10 @@ static struct iscsi_cmd
|
||||
|
||||
static int
|
||||
isert_handle_scsi_cmd(struct isert_conn *isert_conn,
|
||||
struct isert_cmd *isert_cmd, struct iscsi_cmd *cmd,
|
||||
struct isert_cmd *isert_cmd, struct iscsit_cmd *cmd,
|
||||
struct iser_rx_desc *rx_desc, unsigned char *buf)
|
||||
{
|
||||
struct iscsi_conn *conn = isert_conn->conn;
|
||||
struct iscsit_conn *conn = isert_conn->conn;
|
||||
struct iscsi_scsi_req *hdr = (struct iscsi_scsi_req *)buf;
|
||||
int imm_data, imm_data_len, unsol_data, sg_nents, rc;
|
||||
bool dump_payload = false;
|
||||
@@ -1114,8 +1114,8 @@ isert_handle_iscsi_dataout(struct isert_conn *isert_conn,
|
||||
struct iser_rx_desc *rx_desc, unsigned char *buf)
|
||||
{
|
||||
struct scatterlist *sg_start;
|
||||
struct iscsi_conn *conn = isert_conn->conn;
|
||||
struct iscsi_cmd *cmd = NULL;
|
||||
struct iscsit_conn *conn = isert_conn->conn;
|
||||
struct iscsit_cmd *cmd = NULL;
|
||||
struct iscsi_data *hdr = (struct iscsi_data *)buf;
|
||||
u32 unsol_data_len = ntoh24(hdr->dlength);
|
||||
int rc, sg_nents, sg_off, page_off;
|
||||
@@ -1171,10 +1171,10 @@ isert_handle_iscsi_dataout(struct isert_conn *isert_conn,
|
||||
|
||||
static int
|
||||
isert_handle_nop_out(struct isert_conn *isert_conn, struct isert_cmd *isert_cmd,
|
||||
struct iscsi_cmd *cmd, struct iser_rx_desc *rx_desc,
|
||||
struct iscsit_cmd *cmd, struct iser_rx_desc *rx_desc,
|
||||
unsigned char *buf)
|
||||
{
|
||||
struct iscsi_conn *conn = isert_conn->conn;
|
||||
struct iscsit_conn *conn = isert_conn->conn;
|
||||
struct iscsi_nopout *hdr = (struct iscsi_nopout *)buf;
|
||||
int rc;
|
||||
|
||||
@@ -1190,10 +1190,10 @@ isert_handle_nop_out(struct isert_conn *isert_conn, struct isert_cmd *isert_cmd,
|
||||
|
||||
static int
|
||||
isert_handle_text_cmd(struct isert_conn *isert_conn, struct isert_cmd *isert_cmd,
|
||||
struct iscsi_cmd *cmd, struct iser_rx_desc *rx_desc,
|
||||
struct iscsit_cmd *cmd, struct iser_rx_desc *rx_desc,
|
||||
struct iscsi_text *hdr)
|
||||
{
|
||||
struct iscsi_conn *conn = isert_conn->conn;
|
||||
struct iscsit_conn *conn = isert_conn->conn;
|
||||
u32 payload_length = ntoh24(hdr->dlength);
|
||||
int rc;
|
||||
unsigned char *text_in = NULL;
|
||||
@@ -1220,8 +1220,8 @@ isert_rx_opcode(struct isert_conn *isert_conn, struct iser_rx_desc *rx_desc,
|
||||
uint32_t write_stag, uint64_t write_va)
|
||||
{
|
||||
struct iscsi_hdr *hdr = isert_get_iscsi_hdr(rx_desc);
|
||||
struct iscsi_conn *conn = isert_conn->conn;
|
||||
struct iscsi_cmd *cmd;
|
||||
struct iscsit_conn *conn = isert_conn->conn;
|
||||
struct iscsit_cmd *cmd;
|
||||
struct isert_cmd *isert_cmd;
|
||||
int ret = -EINVAL;
|
||||
u8 opcode = (hdr->opcode & ISCSI_OPCODE_MASK);
|
||||
@@ -1404,7 +1404,7 @@ isert_login_recv_done(struct ib_cq *cq, struct ib_wc *wc)
|
||||
static void
|
||||
isert_rdma_rw_ctx_destroy(struct isert_cmd *cmd, struct isert_conn *conn)
|
||||
{
|
||||
struct se_cmd *se_cmd = &cmd->iscsi_cmd->se_cmd;
|
||||
struct se_cmd *se_cmd = &cmd->iscsit_cmd->se_cmd;
|
||||
enum dma_data_direction dir = target_reverse_dma_direction(se_cmd);
|
||||
|
||||
if (!cmd->rw.nr_ops)
|
||||
@@ -1426,9 +1426,9 @@ isert_rdma_rw_ctx_destroy(struct isert_cmd *cmd, struct isert_conn *conn)
|
||||
static void
|
||||
isert_put_cmd(struct isert_cmd *isert_cmd, bool comp_err)
|
||||
{
|
||||
struct iscsi_cmd *cmd = isert_cmd->iscsi_cmd;
|
||||
struct iscsit_cmd *cmd = isert_cmd->iscsit_cmd;
|
||||
struct isert_conn *isert_conn = isert_cmd->conn;
|
||||
struct iscsi_conn *conn = isert_conn->conn;
|
||||
struct iscsit_conn *conn = isert_conn->conn;
|
||||
struct iscsi_text_rsp *hdr;
|
||||
|
||||
isert_dbg("Cmd %p\n", isert_cmd);
|
||||
@@ -1575,7 +1575,7 @@ isert_rdma_write_done(struct ib_cq *cq, struct ib_wc *wc)
|
||||
struct isert_device *device = isert_conn->device;
|
||||
struct iser_tx_desc *desc = cqe_to_tx_desc(wc->wr_cqe);
|
||||
struct isert_cmd *isert_cmd = tx_desc_to_cmd(desc);
|
||||
struct se_cmd *cmd = &isert_cmd->iscsi_cmd->se_cmd;
|
||||
struct se_cmd *cmd = &isert_cmd->iscsit_cmd->se_cmd;
|
||||
int ret = 0;
|
||||
|
||||
if (unlikely(wc->status != IB_WC_SUCCESS)) {
|
||||
@@ -1604,7 +1604,7 @@ isert_rdma_write_done(struct ib_cq *cq, struct ib_wc *wc)
|
||||
/*
|
||||
* XXX: isert_put_response() failure is not retried.
|
||||
*/
|
||||
ret = isert_put_response(isert_conn->conn, isert_cmd->iscsi_cmd);
|
||||
ret = isert_put_response(isert_conn->conn, isert_cmd->iscsit_cmd);
|
||||
if (ret)
|
||||
pr_warn_ratelimited("isert_put_response() ret: %d\n", ret);
|
||||
}
|
||||
@@ -1617,7 +1617,7 @@ isert_rdma_read_done(struct ib_cq *cq, struct ib_wc *wc)
|
||||
struct isert_device *device = isert_conn->device;
|
||||
struct iser_tx_desc *desc = cqe_to_tx_desc(wc->wr_cqe);
|
||||
struct isert_cmd *isert_cmd = tx_desc_to_cmd(desc);
|
||||
struct iscsi_cmd *cmd = isert_cmd->iscsi_cmd;
|
||||
struct iscsit_cmd *cmd = isert_cmd->iscsit_cmd;
|
||||
struct se_cmd *se_cmd = &cmd->se_cmd;
|
||||
int ret = 0;
|
||||
|
||||
@@ -1662,7 +1662,7 @@ isert_do_control_comp(struct work_struct *work)
|
||||
struct isert_cmd, comp_work);
|
||||
struct isert_conn *isert_conn = isert_cmd->conn;
|
||||
struct ib_device *ib_dev = isert_conn->cm_id->device;
|
||||
struct iscsi_cmd *cmd = isert_cmd->iscsi_cmd;
|
||||
struct iscsit_cmd *cmd = isert_cmd->iscsit_cmd;
|
||||
|
||||
isert_dbg("Cmd %p i_state %d\n", isert_cmd, cmd->i_state);
|
||||
|
||||
@@ -1720,7 +1720,7 @@ isert_send_done(struct ib_cq *cq, struct ib_wc *wc)
|
||||
|
||||
isert_dbg("Cmd %p\n", isert_cmd);
|
||||
|
||||
switch (isert_cmd->iscsi_cmd->i_state) {
|
||||
switch (isert_cmd->iscsit_cmd->i_state) {
|
||||
case ISTATE_SEND_TASKMGTRSP:
|
||||
case ISTATE_SEND_LOGOUTRSP:
|
||||
case ISTATE_SEND_REJECT:
|
||||
@@ -1731,7 +1731,7 @@ isert_send_done(struct ib_cq *cq, struct ib_wc *wc)
|
||||
queue_work(isert_comp_wq, &isert_cmd->comp_work);
|
||||
return;
|
||||
default:
|
||||
isert_cmd->iscsi_cmd->i_state = ISTATE_SENT_STATUS;
|
||||
isert_cmd->iscsit_cmd->i_state = ISTATE_SENT_STATUS;
|
||||
isert_completion_put(tx_desc, isert_cmd, ib_dev, false);
|
||||
break;
|
||||
}
|
||||
@@ -1755,7 +1755,7 @@ isert_post_response(struct isert_conn *isert_conn, struct isert_cmd *isert_cmd)
|
||||
}
|
||||
|
||||
static int
|
||||
isert_put_response(struct iscsi_conn *conn, struct iscsi_cmd *cmd)
|
||||
isert_put_response(struct iscsit_conn *conn, struct iscsit_cmd *cmd)
|
||||
{
|
||||
struct isert_cmd *isert_cmd = iscsit_priv_cmd(cmd);
|
||||
struct isert_conn *isert_conn = conn->context;
|
||||
@@ -1806,7 +1806,7 @@ isert_put_response(struct iscsi_conn *conn, struct iscsi_cmd *cmd)
|
||||
}
|
||||
|
||||
static void
|
||||
isert_aborted_task(struct iscsi_conn *conn, struct iscsi_cmd *cmd)
|
||||
isert_aborted_task(struct iscsit_conn *conn, struct iscsit_cmd *cmd)
|
||||
{
|
||||
struct isert_cmd *isert_cmd = iscsit_priv_cmd(cmd);
|
||||
struct isert_conn *isert_conn = conn->context;
|
||||
@@ -1822,7 +1822,7 @@ isert_aborted_task(struct iscsi_conn *conn, struct iscsi_cmd *cmd)
|
||||
}
|
||||
|
||||
static enum target_prot_op
|
||||
isert_get_sup_prot_ops(struct iscsi_conn *conn)
|
||||
isert_get_sup_prot_ops(struct iscsit_conn *conn)
|
||||
{
|
||||
struct isert_conn *isert_conn = conn->context;
|
||||
struct isert_device *device = isert_conn->device;
|
||||
@@ -1842,7 +1842,7 @@ isert_get_sup_prot_ops(struct iscsi_conn *conn)
|
||||
}
|
||||
|
||||
static int
|
||||
isert_put_nopin(struct iscsi_cmd *cmd, struct iscsi_conn *conn,
|
||||
isert_put_nopin(struct iscsit_cmd *cmd, struct iscsit_conn *conn,
|
||||
bool nopout_response)
|
||||
{
|
||||
struct isert_cmd *isert_cmd = iscsit_priv_cmd(cmd);
|
||||
@@ -1862,7 +1862,7 @@ isert_put_nopin(struct iscsi_cmd *cmd, struct iscsi_conn *conn,
|
||||
}
|
||||
|
||||
static int
|
||||
isert_put_logout_rsp(struct iscsi_cmd *cmd, struct iscsi_conn *conn)
|
||||
isert_put_logout_rsp(struct iscsit_cmd *cmd, struct iscsit_conn *conn)
|
||||
{
|
||||
struct isert_cmd *isert_cmd = iscsit_priv_cmd(cmd);
|
||||
struct isert_conn *isert_conn = conn->context;
|
||||
@@ -1880,7 +1880,7 @@ isert_put_logout_rsp(struct iscsi_cmd *cmd, struct iscsi_conn *conn)
|
||||
}
|
||||
|
||||
static int
|
||||
isert_put_tm_rsp(struct iscsi_cmd *cmd, struct iscsi_conn *conn)
|
||||
isert_put_tm_rsp(struct iscsit_cmd *cmd, struct iscsit_conn *conn)
|
||||
{
|
||||
struct isert_cmd *isert_cmd = iscsit_priv_cmd(cmd);
|
||||
struct isert_conn *isert_conn = conn->context;
|
||||
@@ -1898,7 +1898,7 @@ isert_put_tm_rsp(struct iscsi_cmd *cmd, struct iscsi_conn *conn)
|
||||
}
|
||||
|
||||
static int
|
||||
isert_put_reject(struct iscsi_cmd *cmd, struct iscsi_conn *conn)
|
||||
isert_put_reject(struct iscsit_cmd *cmd, struct iscsit_conn *conn)
|
||||
{
|
||||
struct isert_cmd *isert_cmd = iscsit_priv_cmd(cmd);
|
||||
struct isert_conn *isert_conn = conn->context;
|
||||
@@ -1933,7 +1933,7 @@ isert_put_reject(struct iscsi_cmd *cmd, struct iscsi_conn *conn)
|
||||
}
|
||||
|
||||
static int
|
||||
isert_put_text_rsp(struct iscsi_cmd *cmd, struct iscsi_conn *conn)
|
||||
isert_put_text_rsp(struct iscsit_cmd *cmd, struct iscsit_conn *conn)
|
||||
{
|
||||
struct isert_cmd *isert_cmd = iscsit_priv_cmd(cmd);
|
||||
struct isert_conn *isert_conn = conn->context;
|
||||
@@ -2035,7 +2035,7 @@ static int
|
||||
isert_rdma_rw_ctx_post(struct isert_cmd *cmd, struct isert_conn *conn,
|
||||
struct ib_cqe *cqe, struct ib_send_wr *chain_wr)
|
||||
{
|
||||
struct se_cmd *se_cmd = &cmd->iscsi_cmd->se_cmd;
|
||||
struct se_cmd *se_cmd = &cmd->iscsit_cmd->se_cmd;
|
||||
enum dma_data_direction dir = target_reverse_dma_direction(se_cmd);
|
||||
u8 port_num = conn->cm_id->port_num;
|
||||
u64 addr;
|
||||
@@ -2048,7 +2048,7 @@ isert_rdma_rw_ctx_post(struct isert_cmd *cmd, struct isert_conn *conn,
|
||||
if (dir == DMA_FROM_DEVICE) {
|
||||
addr = cmd->write_va;
|
||||
rkey = cmd->write_stag;
|
||||
offset = cmd->iscsi_cmd->write_data_done;
|
||||
offset = cmd->iscsit_cmd->write_data_done;
|
||||
} else {
|
||||
addr = cmd->read_va;
|
||||
rkey = cmd->read_stag;
|
||||
@@ -2088,7 +2088,7 @@ rdma_ctx_post:
|
||||
}
|
||||
|
||||
static int
|
||||
isert_put_datain(struct iscsi_conn *conn, struct iscsi_cmd *cmd)
|
||||
isert_put_datain(struct iscsit_conn *conn, struct iscsit_cmd *cmd)
|
||||
{
|
||||
struct se_cmd *se_cmd = &cmd->se_cmd;
|
||||
struct isert_cmd *isert_cmd = iscsit_priv_cmd(cmd);
|
||||
@@ -2129,7 +2129,7 @@ isert_put_datain(struct iscsi_conn *conn, struct iscsi_cmd *cmd)
|
||||
}
|
||||
|
||||
static int
|
||||
isert_get_dataout(struct iscsi_conn *conn, struct iscsi_cmd *cmd, bool recovery)
|
||||
isert_get_dataout(struct iscsit_conn *conn, struct iscsit_cmd *cmd, bool recovery)
|
||||
{
|
||||
struct isert_cmd *isert_cmd = iscsit_priv_cmd(cmd);
|
||||
int ret;
|
||||
@@ -2147,7 +2147,7 @@ isert_get_dataout(struct iscsi_conn *conn, struct iscsi_cmd *cmd, bool recovery)
|
||||
}
|
||||
|
||||
static int
|
||||
isert_immediate_queue(struct iscsi_conn *conn, struct iscsi_cmd *cmd, int state)
|
||||
isert_immediate_queue(struct iscsit_conn *conn, struct iscsit_cmd *cmd, int state)
|
||||
{
|
||||
struct isert_cmd *isert_cmd = iscsit_priv_cmd(cmd);
|
||||
int ret = 0;
|
||||
@@ -2172,7 +2172,7 @@ isert_immediate_queue(struct iscsi_conn *conn, struct iscsi_cmd *cmd, int state)
|
||||
}
|
||||
|
||||
static int
|
||||
isert_response_queue(struct iscsi_conn *conn, struct iscsi_cmd *cmd, int state)
|
||||
isert_response_queue(struct iscsit_conn *conn, struct iscsit_cmd *cmd, int state)
|
||||
{
|
||||
struct isert_conn *isert_conn = conn->context;
|
||||
int ret;
|
||||
@@ -2332,7 +2332,7 @@ isert_rdma_accept(struct isert_conn *isert_conn)
|
||||
}
|
||||
|
||||
static int
|
||||
isert_get_login_rx(struct iscsi_conn *conn, struct iscsi_login *login)
|
||||
isert_get_login_rx(struct iscsit_conn *conn, struct iscsi_login *login)
|
||||
{
|
||||
struct isert_conn *isert_conn = conn->context;
|
||||
int ret;
|
||||
@@ -2368,7 +2368,7 @@ isert_get_login_rx(struct iscsi_conn *conn, struct iscsi_login *login)
|
||||
}
|
||||
|
||||
static void
|
||||
isert_set_conn_info(struct iscsi_np *np, struct iscsi_conn *conn,
|
||||
isert_set_conn_info(struct iscsi_np *np, struct iscsit_conn *conn,
|
||||
struct isert_conn *isert_conn)
|
||||
{
|
||||
struct rdma_cm_id *cm_id = isert_conn->cm_id;
|
||||
@@ -2381,7 +2381,7 @@ isert_set_conn_info(struct iscsi_np *np, struct iscsi_conn *conn,
|
||||
}
|
||||
|
||||
static int
|
||||
isert_accept_np(struct iscsi_np *np, struct iscsi_conn *conn)
|
||||
isert_accept_np(struct iscsi_np *np, struct iscsit_conn *conn)
|
||||
{
|
||||
struct isert_np *isert_np = np->np_context;
|
||||
struct isert_conn *isert_conn;
|
||||
@@ -2489,7 +2489,7 @@ static void isert_release_work(struct work_struct *work)
|
||||
static void
|
||||
isert_wait4logout(struct isert_conn *isert_conn)
|
||||
{
|
||||
struct iscsi_conn *conn = isert_conn->conn;
|
||||
struct iscsit_conn *conn = isert_conn->conn;
|
||||
|
||||
isert_info("conn %p\n", isert_conn);
|
||||
|
||||
@@ -2501,9 +2501,9 @@ isert_wait4logout(struct isert_conn *isert_conn)
|
||||
}
|
||||
|
||||
static void
|
||||
isert_wait4cmds(struct iscsi_conn *conn)
|
||||
isert_wait4cmds(struct iscsit_conn *conn)
|
||||
{
|
||||
isert_info("iscsi_conn %p\n", conn);
|
||||
isert_info("iscsit_conn %p\n", conn);
|
||||
|
||||
if (conn->sess) {
|
||||
target_stop_session(conn->sess->se_sess);
|
||||
@@ -2521,9 +2521,9 @@ isert_wait4cmds(struct iscsi_conn *conn)
|
||||
* before blocking on the target_wait_for_session_cmds
|
||||
*/
|
||||
static void
|
||||
isert_put_unsol_pending_cmds(struct iscsi_conn *conn)
|
||||
isert_put_unsol_pending_cmds(struct iscsit_conn *conn)
|
||||
{
|
||||
struct iscsi_cmd *cmd, *tmp;
|
||||
struct iscsit_cmd *cmd, *tmp;
|
||||
static LIST_HEAD(drop_cmd_list);
|
||||
|
||||
spin_lock_bh(&conn->cmd_lock);
|
||||
@@ -2546,7 +2546,7 @@ isert_put_unsol_pending_cmds(struct iscsi_conn *conn)
|
||||
}
|
||||
}
|
||||
|
||||
static void isert_wait_conn(struct iscsi_conn *conn)
|
||||
static void isert_wait_conn(struct iscsit_conn *conn)
|
||||
{
|
||||
struct isert_conn *isert_conn = conn->context;
|
||||
|
||||
@@ -2564,7 +2564,7 @@ static void isert_wait_conn(struct iscsi_conn *conn)
|
||||
queue_work(isert_release_wq, &isert_conn->release_work);
|
||||
}
|
||||
|
||||
static void isert_free_conn(struct iscsi_conn *conn)
|
||||
static void isert_free_conn(struct iscsit_conn *conn)
|
||||
{
|
||||
struct isert_conn *isert_conn = conn->context;
|
||||
|
||||
@@ -2572,7 +2572,7 @@ static void isert_free_conn(struct iscsi_conn *conn)
|
||||
isert_put_conn(isert_conn);
|
||||
}
|
||||
|
||||
static void isert_get_rx_pdu(struct iscsi_conn *conn)
|
||||
static void isert_get_rx_pdu(struct iscsit_conn *conn)
|
||||
{
|
||||
struct completion comp;
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ struct isert_cmd {
|
||||
u64 pdu_buf_dma;
|
||||
u32 pdu_buf_len;
|
||||
struct isert_conn *conn;
|
||||
struct iscsi_cmd *iscsi_cmd;
|
||||
struct iscsit_cmd *iscsit_cmd;
|
||||
struct iser_tx_desc tx_desc;
|
||||
struct iser_rx_desc *rx_desc;
|
||||
struct rdma_rw_ctx rw;
|
||||
@@ -173,7 +173,7 @@ struct isert_conn {
|
||||
u64 login_rsp_dma;
|
||||
struct iser_rx_desc *rx_descs;
|
||||
struct ib_recv_wr rx_wr[ISERT_QP_MAX_RECV_DTOS];
|
||||
struct iscsi_conn *conn;
|
||||
struct iscsit_conn *conn;
|
||||
struct list_head node;
|
||||
struct completion login_comp;
|
||||
struct completion login_req_comp;
|
||||
|
||||
@@ -2334,7 +2334,6 @@ mptctl_hp_hostinfo(MPT_ADAPTER *ioc, unsigned long arg, unsigned int data_size)
|
||||
ToolboxIstwiReadWriteRequest_t *IstwiRWRequest;
|
||||
MPT_FRAME_HDR *mf = NULL;
|
||||
unsigned long timeleft;
|
||||
int retval;
|
||||
u32 msgcontext;
|
||||
|
||||
/* Reset long to int. Should affect IA64 and SPARC only
|
||||
@@ -2488,7 +2487,6 @@ mptctl_hp_hostinfo(MPT_ADAPTER *ioc, unsigned long arg, unsigned int data_size)
|
||||
ioc->add_sge((char *)&IstwiRWRequest->SGL,
|
||||
(MPT_SGE_FLAGS_SSIMPLE_READ|4), buf_dma);
|
||||
|
||||
retval = 0;
|
||||
SET_MGMT_MSG_CONTEXT(ioc->ioctl_cmds.msg_context,
|
||||
IstwiRWRequest->MsgContext);
|
||||
INITIALIZE_MGMT_STATUS(ioc->ioctl_cmds.status)
|
||||
@@ -2498,7 +2496,6 @@ retry_wait:
|
||||
timeleft = wait_for_completion_timeout(&ioc->ioctl_cmds.done,
|
||||
HZ*MPT_IOCTL_DEFAULT_TIMEOUT);
|
||||
if (!(ioc->ioctl_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
|
||||
retval = -ETIME;
|
||||
printk(MYIOC_s_WARN_FMT "%s: failed\n", ioc->name, __func__);
|
||||
if (ioc->ioctl_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET) {
|
||||
mpt_free_msg_frame(ioc, mf);
|
||||
|
||||
@@ -121,7 +121,7 @@ enum {
|
||||
#define SA_AIF_PDEV_CHANGE (1<<4)
|
||||
#define SA_AIF_LDEV_CHANGE (1<<5)
|
||||
#define SA_AIF_BPSTAT_CHANGE (1<<30)
|
||||
#define SA_AIF_BPCFG_CHANGE (1<<31)
|
||||
#define SA_AIF_BPCFG_CHANGE (1U<<31)
|
||||
|
||||
#define HBA_MAX_SG_EMBEDDED 28
|
||||
#define HBA_MAX_SG_SEPARATE 90
|
||||
|
||||
@@ -302,7 +302,7 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id)
|
||||
if (flag & SCRD)
|
||||
printk("SCRD ");
|
||||
printk("status %02x\n", inb(STATUS(sh->io_port)));
|
||||
};
|
||||
}
|
||||
#endif
|
||||
number_serviced = 0;
|
||||
|
||||
@@ -344,7 +344,7 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id)
|
||||
if (!number_serviced)
|
||||
shost_printk(KERN_WARNING, sh, "interrupt received, but no mail.\n");
|
||||
return IRQ_HANDLED;
|
||||
};
|
||||
}
|
||||
|
||||
mbo = (scsi2int(mb[mbi].ccbptr) - (unsigned long)aha1542->ccb_handle) / sizeof(struct ccb);
|
||||
mbistatus = mb[mbi].status;
|
||||
@@ -408,7 +408,7 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id)
|
||||
*/
|
||||
scsi_done(tmp_cmd);
|
||||
number_serviced++;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
static int aha1542_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *cmd)
|
||||
@@ -534,7 +534,7 @@ static void setup_mailboxes(struct Scsi_Host *sh)
|
||||
any2scsi(aha1542->mb[i].ccbptr,
|
||||
aha1542->ccb_handle + i * sizeof(struct ccb));
|
||||
aha1542->mb[AHA1542_MAILBOXES + i].status = 0;
|
||||
};
|
||||
}
|
||||
aha1542_intr_reset(sh->io_port); /* reset interrupts, so they don't block */
|
||||
any2scsi(mb_cmd + 2, aha1542->mb_handle);
|
||||
if (aha1542_out(sh->io_port, mb_cmd, 5))
|
||||
@@ -549,7 +549,7 @@ static int aha1542_getconfig(struct Scsi_Host *sh)
|
||||
i = inb(STATUS(sh->io_port));
|
||||
if (i & DF) {
|
||||
i = inb(DATA(sh->io_port));
|
||||
};
|
||||
}
|
||||
aha1542_outb(sh->io_port, CMD_RETCONF);
|
||||
aha1542_in(sh->io_port, inquiry_result, 3, 0);
|
||||
if (!wait_mask(INTRFLAGS(sh->io_port), INTRMASK, HACC, 0, 0))
|
||||
@@ -578,7 +578,7 @@ static int aha1542_getconfig(struct Scsi_Host *sh)
|
||||
default:
|
||||
shost_printk(KERN_ERR, sh, "Unable to determine DMA channel.\n");
|
||||
return -1;
|
||||
};
|
||||
}
|
||||
switch (inquiry_result[1]) {
|
||||
case 0x40:
|
||||
sh->irq = 15;
|
||||
@@ -601,7 +601,7 @@ static int aha1542_getconfig(struct Scsi_Host *sh)
|
||||
default:
|
||||
shost_printk(KERN_ERR, sh, "Unable to determine IRQ level.\n");
|
||||
return -1;
|
||||
};
|
||||
}
|
||||
sh->this_id = inquiry_result[2] & 7;
|
||||
return 0;
|
||||
}
|
||||
@@ -636,7 +636,7 @@ static int aha1542_mbenable(struct Scsi_Host *sh)
|
||||
|
||||
if (aha1542_out(sh->io_port, mbenable_cmd, 3))
|
||||
goto fail;
|
||||
};
|
||||
}
|
||||
while (0) {
|
||||
fail:
|
||||
shost_printk(KERN_ERR, sh, "Mailbox init failed\n");
|
||||
@@ -654,7 +654,7 @@ static int aha1542_query(struct Scsi_Host *sh)
|
||||
i = inb(STATUS(sh->io_port));
|
||||
if (i & DF) {
|
||||
i = inb(DATA(sh->io_port));
|
||||
};
|
||||
}
|
||||
aha1542_outb(sh->io_port, CMD_INQUIRY);
|
||||
aha1542_in(sh->io_port, inquiry_result, 4, 0);
|
||||
if (!wait_mask(INTRFLAGS(sh->io_port), INTRMASK, HACC, 0, 0))
|
||||
@@ -673,7 +673,7 @@ static int aha1542_query(struct Scsi_Host *sh)
|
||||
if (inquiry_result[0] == 0x43) {
|
||||
shost_printk(KERN_INFO, sh, "Emulation mode not supported for AHA-1740 hardware, use aha1740 driver instead.\n");
|
||||
return 1;
|
||||
};
|
||||
}
|
||||
|
||||
/*
|
||||
* Always call this - boards that do not support extended bios translation
|
||||
|
||||
@@ -371,8 +371,7 @@ bfad_debugfs_release_fwtrc(struct inode *inode, struct file *file)
|
||||
if (!fw_debug)
|
||||
return 0;
|
||||
|
||||
if (fw_debug->debug_buffer)
|
||||
vfree(fw_debug->debug_buffer);
|
||||
vfree(fw_debug->debug_buffer);
|
||||
|
||||
file->private_data = NULL;
|
||||
kfree(fw_debug);
|
||||
|
||||
@@ -755,7 +755,6 @@ void
|
||||
bfad_destroy_workq(struct bfad_im_s *im)
|
||||
{
|
||||
if (im && im->drv_workq) {
|
||||
flush_workqueue(im->drv_workq);
|
||||
destroy_workqueue(im->drv_workq);
|
||||
im->drv_workq = NULL;
|
||||
}
|
||||
|
||||
@@ -273,7 +273,6 @@ static int bnx2fc_xmit(struct fc_lport *lport, struct fc_frame *fp)
|
||||
struct fcoe_port *port;
|
||||
struct fcoe_hdr *hp;
|
||||
struct bnx2fc_rport *tgt;
|
||||
struct fc_stats *stats;
|
||||
u8 sof, eof;
|
||||
u32 crc;
|
||||
unsigned int hlen, tlen, elen;
|
||||
@@ -399,10 +398,8 @@ static int bnx2fc_xmit(struct fc_lport *lport, struct fc_frame *fp)
|
||||
}
|
||||
|
||||
/*update tx stats */
|
||||
stats = per_cpu_ptr(lport->stats, get_cpu());
|
||||
stats->TxFrames++;
|
||||
stats->TxWords += wlen;
|
||||
put_cpu();
|
||||
this_cpu_inc(lport->stats->TxFrames);
|
||||
this_cpu_add(lport->stats->TxWords, wlen);
|
||||
|
||||
/* send down to lld */
|
||||
fr_dev(fp) = lport;
|
||||
@@ -512,7 +509,6 @@ static void bnx2fc_recv_frame(struct sk_buff *skb)
|
||||
u32 fr_len, fr_crc;
|
||||
struct fc_lport *lport;
|
||||
struct fcoe_rcv_info *fr;
|
||||
struct fc_stats *stats;
|
||||
struct fc_frame_header *fh;
|
||||
struct fcoe_crc_eof crc_eof;
|
||||
struct fc_frame *fp;
|
||||
@@ -543,10 +539,8 @@ static void bnx2fc_recv_frame(struct sk_buff *skb)
|
||||
skb_pull(skb, sizeof(struct fcoe_hdr));
|
||||
fr_len = skb->len - sizeof(struct fcoe_crc_eof);
|
||||
|
||||
stats = per_cpu_ptr(lport->stats, get_cpu());
|
||||
stats->RxFrames++;
|
||||
stats->RxWords += fr_len / FCOE_WORD_TO_BYTE;
|
||||
put_cpu();
|
||||
this_cpu_inc(lport->stats->RxFrames);
|
||||
this_cpu_add(lport->stats->RxWords, fr_len / FCOE_WORD_TO_BYTE);
|
||||
|
||||
fp = (struct fc_frame *)skb;
|
||||
fc_frame_init(fp);
|
||||
@@ -633,9 +627,7 @@ static void bnx2fc_recv_frame(struct sk_buff *skb)
|
||||
fr_crc = le32_to_cpu(fr_crc(fp));
|
||||
|
||||
if (unlikely(fr_crc != ~crc32(~0, skb->data, fr_len))) {
|
||||
stats = per_cpu_ptr(lport->stats, get_cpu());
|
||||
crc_err = (stats->InvalidCRCCount++);
|
||||
put_cpu();
|
||||
crc_err = this_cpu_inc_return(lport->stats->InvalidCRCCount);
|
||||
if (crc_err < 5)
|
||||
printk(KERN_WARNING PFX "dropping frame with "
|
||||
"CRC error\n");
|
||||
@@ -964,9 +956,7 @@ static void bnx2fc_indicate_netevent(void *context, unsigned long event,
|
||||
mutex_unlock(&lport->lp_mutex);
|
||||
fc_host_port_type(lport->host) =
|
||||
FC_PORTTYPE_UNKNOWN;
|
||||
per_cpu_ptr(lport->stats,
|
||||
get_cpu())->LinkFailureCount++;
|
||||
put_cpu();
|
||||
this_cpu_inc(lport->stats->LinkFailureCount);
|
||||
fcoe_clean_pending_queue(lport);
|
||||
wait_for_upload = 1;
|
||||
}
|
||||
|
||||
@@ -472,7 +472,7 @@ struct bnx2fc_cmd *bnx2fc_cmd_alloc(struct bnx2fc_rport *tgt)
|
||||
u32 free_sqes;
|
||||
u32 max_sqes;
|
||||
u16 xid;
|
||||
int index = get_cpu();
|
||||
int index = raw_smp_processor_id();
|
||||
|
||||
max_sqes = BNX2FC_SCSI_MAX_SQES;
|
||||
/*
|
||||
@@ -485,7 +485,6 @@ struct bnx2fc_cmd *bnx2fc_cmd_alloc(struct bnx2fc_rport *tgt)
|
||||
(tgt->num_active_ios.counter >= max_sqes) ||
|
||||
(free_sqes + max_sqes <= BNX2FC_SQ_WQES_MAX)) {
|
||||
spin_unlock_bh(&cmd_mgr->free_list_lock[index]);
|
||||
put_cpu();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -498,7 +497,6 @@ struct bnx2fc_cmd *bnx2fc_cmd_alloc(struct bnx2fc_rport *tgt)
|
||||
atomic_inc(&tgt->num_active_ios);
|
||||
atomic_dec(&tgt->free_sqes);
|
||||
spin_unlock_bh(&cmd_mgr->free_list_lock[index]);
|
||||
put_cpu();
|
||||
|
||||
INIT_LIST_HEAD(&io_req->link);
|
||||
|
||||
@@ -2032,7 +2030,6 @@ int bnx2fc_post_io_req(struct bnx2fc_rport *tgt,
|
||||
struct bnx2fc_interface *interface = port->priv;
|
||||
struct bnx2fc_hba *hba = interface->hba;
|
||||
struct fc_lport *lport = port->lport;
|
||||
struct fc_stats *stats;
|
||||
int task_idx, index;
|
||||
u16 xid;
|
||||
|
||||
@@ -2045,20 +2042,18 @@ int bnx2fc_post_io_req(struct bnx2fc_rport *tgt,
|
||||
io_req->data_xfer_len = scsi_bufflen(sc_cmd);
|
||||
bnx2fc_priv(sc_cmd)->io_req = io_req;
|
||||
|
||||
stats = per_cpu_ptr(lport->stats, get_cpu());
|
||||
if (sc_cmd->sc_data_direction == DMA_FROM_DEVICE) {
|
||||
io_req->io_req_flags = BNX2FC_READ;
|
||||
stats->InputRequests++;
|
||||
stats->InputBytes += io_req->data_xfer_len;
|
||||
this_cpu_inc(lport->stats->InputRequests);
|
||||
this_cpu_add(lport->stats->InputBytes, io_req->data_xfer_len);
|
||||
} else if (sc_cmd->sc_data_direction == DMA_TO_DEVICE) {
|
||||
io_req->io_req_flags = BNX2FC_WRITE;
|
||||
stats->OutputRequests++;
|
||||
stats->OutputBytes += io_req->data_xfer_len;
|
||||
this_cpu_inc(lport->stats->OutputRequests);
|
||||
this_cpu_add(lport->stats->OutputBytes, io_req->data_xfer_len);
|
||||
} else {
|
||||
io_req->io_req_flags = 0;
|
||||
stats->ControlRequests++;
|
||||
this_cpu_inc(lport->stats->ControlRequests);
|
||||
}
|
||||
put_cpu();
|
||||
|
||||
xid = io_req->xid;
|
||||
|
||||
|
||||
@@ -3585,10 +3585,19 @@ static struct DeviceCtlBlk *device_alloc(struct AdapterCtlBlk *acb,
|
||||
#endif
|
||||
if (dcb->target_lun != 0) {
|
||||
/* Copy settings */
|
||||
struct DeviceCtlBlk *p;
|
||||
list_for_each_entry(p, &acb->dcb_list, list)
|
||||
if (p->target_id == dcb->target_id)
|
||||
struct DeviceCtlBlk *p = NULL, *iter;
|
||||
|
||||
list_for_each_entry(iter, &acb->dcb_list, list)
|
||||
if (iter->target_id == dcb->target_id) {
|
||||
p = iter;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!p) {
|
||||
kfree(dcb);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dprintkdbg(DBG_1,
|
||||
"device_alloc: <%02i-%i> copy from <%02i-%i>\n",
|
||||
dcb->target_id, dcb->target_lun,
|
||||
|
||||
@@ -1000,7 +1000,6 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev
|
||||
|
||||
// Initializing the spinlocks
|
||||
spin_lock_init(&pHba->state_lock);
|
||||
spin_lock_init(&adpt_post_wait_lock);
|
||||
|
||||
if(raptorFlag == 0){
|
||||
printk(KERN_INFO "Adaptec I2O RAID controller"
|
||||
|
||||
@@ -1402,7 +1402,6 @@ efct_hw_command(struct efct_hw *hw, u8 *cmd, u32 opts, void *cb, void *arg)
|
||||
mutex_lock(&hw->bmbx_lock);
|
||||
bmbx = hw->sli.bmbx.virt;
|
||||
|
||||
memset(bmbx, 0, SLI4_BMBX_SIZE);
|
||||
memcpy(bmbx, cmd, SLI4_BMBX_SIZE);
|
||||
|
||||
if (sli_bmbx_command(&hw->sli) == 0) {
|
||||
|
||||
@@ -62,7 +62,6 @@ efct_io_pool_create(struct efct *efct, u32 num_sgl)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memset(io->sgl, 0, sizeof(*io->sgl) * num_sgl);
|
||||
io->sgl_allocated = num_sgl;
|
||||
io->sgl_count = 0;
|
||||
|
||||
|
||||
@@ -370,9 +370,6 @@ static int efct_lio_get_cmd_state(struct se_cmd *cmd)
|
||||
container_of(cmd, struct efct_scsi_tgt_io, cmd);
|
||||
struct efct_io *io = container_of(ocp, struct efct_io, tgt_io);
|
||||
|
||||
if (!io)
|
||||
return 0;
|
||||
|
||||
return io->tgt_io.state;
|
||||
}
|
||||
|
||||
|
||||
@@ -1434,8 +1434,7 @@ static int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev,
|
||||
|
||||
return NET_RX_SUCCESS;
|
||||
err:
|
||||
per_cpu_ptr(lport->stats, get_cpu())->ErrorFrames++;
|
||||
put_cpu();
|
||||
this_cpu_inc(lport->stats->ErrorFrames);
|
||||
err2:
|
||||
kfree_skb(skb);
|
||||
return NET_RX_DROP;
|
||||
@@ -1453,9 +1452,10 @@ static int fcoe_alloc_paged_crc_eof(struct sk_buff *skb, int tlen)
|
||||
struct fcoe_percpu_s *fps;
|
||||
int rc;
|
||||
|
||||
fps = &get_cpu_var(fcoe_percpu);
|
||||
local_lock(&fcoe_percpu.lock);
|
||||
fps = this_cpu_ptr(&fcoe_percpu);
|
||||
rc = fcoe_get_paged_crc_eof(skb, tlen, fps);
|
||||
put_cpu_var(fcoe_percpu);
|
||||
local_unlock(&fcoe_percpu.lock);
|
||||
|
||||
return rc;
|
||||
}
|
||||
@@ -1474,7 +1474,6 @@ static int fcoe_xmit(struct fc_lport *lport, struct fc_frame *fp)
|
||||
struct ethhdr *eh;
|
||||
struct fcoe_crc_eof *cp;
|
||||
struct sk_buff *skb;
|
||||
struct fc_stats *stats;
|
||||
struct fc_frame_header *fh;
|
||||
unsigned int hlen; /* header length implies the version */
|
||||
unsigned int tlen; /* trailer length */
|
||||
@@ -1585,10 +1584,8 @@ static int fcoe_xmit(struct fc_lport *lport, struct fc_frame *fp)
|
||||
skb_shinfo(skb)->gso_size = 0;
|
||||
}
|
||||
/* update tx stats: regardless if LLD fails */
|
||||
stats = per_cpu_ptr(lport->stats, get_cpu());
|
||||
stats->TxFrames++;
|
||||
stats->TxWords += wlen;
|
||||
put_cpu();
|
||||
this_cpu_inc(lport->stats->TxFrames);
|
||||
this_cpu_add(lport->stats->TxWords, wlen);
|
||||
|
||||
/* send down to lld */
|
||||
fr_dev(fp) = lport;
|
||||
@@ -1610,7 +1607,6 @@ static inline int fcoe_filter_frames(struct fc_lport *lport,
|
||||
struct fcoe_interface *fcoe;
|
||||
struct fc_frame_header *fh;
|
||||
struct sk_buff *skb = (struct sk_buff *)fp;
|
||||
struct fc_stats *stats;
|
||||
|
||||
/*
|
||||
* We only check CRC if no offload is available and if it is
|
||||
@@ -1640,11 +1636,8 @@ static inline int fcoe_filter_frames(struct fc_lport *lport,
|
||||
return 0;
|
||||
}
|
||||
|
||||
stats = per_cpu_ptr(lport->stats, get_cpu());
|
||||
stats->InvalidCRCCount++;
|
||||
if (stats->InvalidCRCCount < 5)
|
||||
if (this_cpu_inc_return(lport->stats->InvalidCRCCount) < 5)
|
||||
printk(KERN_WARNING "fcoe: dropping frame with CRC error\n");
|
||||
put_cpu();
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -1657,7 +1650,6 @@ static void fcoe_recv_frame(struct sk_buff *skb)
|
||||
u32 fr_len;
|
||||
struct fc_lport *lport;
|
||||
struct fcoe_rcv_info *fr;
|
||||
struct fc_stats *stats;
|
||||
struct fcoe_crc_eof crc_eof;
|
||||
struct fc_frame *fp;
|
||||
struct fcoe_hdr *hp;
|
||||
@@ -1685,9 +1677,11 @@ static void fcoe_recv_frame(struct sk_buff *skb)
|
||||
*/
|
||||
hp = (struct fcoe_hdr *) skb_network_header(skb);
|
||||
|
||||
stats = per_cpu_ptr(lport->stats, get_cpu());
|
||||
if (unlikely(FC_FCOE_DECAPS_VER(hp) != FC_FCOE_VER)) {
|
||||
if (stats->ErrorFrames < 5)
|
||||
struct fc_stats *stats;
|
||||
|
||||
stats = per_cpu_ptr(lport->stats, raw_smp_processor_id());
|
||||
if (READ_ONCE(stats->ErrorFrames) < 5)
|
||||
printk(KERN_WARNING "fcoe: FCoE version "
|
||||
"mismatch: The frame has "
|
||||
"version %x, but the "
|
||||
@@ -1700,8 +1694,8 @@ static void fcoe_recv_frame(struct sk_buff *skb)
|
||||
skb_pull(skb, sizeof(struct fcoe_hdr));
|
||||
fr_len = skb->len - sizeof(struct fcoe_crc_eof);
|
||||
|
||||
stats->RxFrames++;
|
||||
stats->RxWords += fr_len / FCOE_WORD_TO_BYTE;
|
||||
this_cpu_inc(lport->stats->RxFrames);
|
||||
this_cpu_add(lport->stats->RxWords, fr_len / FCOE_WORD_TO_BYTE);
|
||||
|
||||
fp = (struct fc_frame *)skb;
|
||||
fc_frame_init(fp);
|
||||
@@ -1717,13 +1711,11 @@ static void fcoe_recv_frame(struct sk_buff *skb)
|
||||
goto drop;
|
||||
|
||||
if (!fcoe_filter_frames(lport, fp)) {
|
||||
put_cpu();
|
||||
fc_exch_recv(lport, fp);
|
||||
return;
|
||||
}
|
||||
drop:
|
||||
stats->ErrorFrames++;
|
||||
put_cpu();
|
||||
this_cpu_inc(lport->stats->ErrorFrames);
|
||||
kfree_skb(skb);
|
||||
}
|
||||
|
||||
@@ -1847,7 +1839,6 @@ static int fcoe_device_notification(struct notifier_block *notifier,
|
||||
struct net_device *netdev = netdev_notifier_info_to_dev(ptr);
|
||||
struct fcoe_ctlr *ctlr;
|
||||
struct fcoe_interface *fcoe;
|
||||
struct fc_stats *stats;
|
||||
u32 link_possible = 1;
|
||||
u32 mfs;
|
||||
int rc = NOTIFY_OK;
|
||||
@@ -1921,9 +1912,7 @@ static int fcoe_device_notification(struct notifier_block *notifier,
|
||||
break;
|
||||
case FCOE_CTLR_ENABLED:
|
||||
case FCOE_CTLR_UNUSED:
|
||||
stats = per_cpu_ptr(lport->stats, get_cpu());
|
||||
stats->LinkFailureCount++;
|
||||
put_cpu();
|
||||
this_cpu_inc(lport->stats->LinkFailureCount);
|
||||
fcoe_clean_pending_queue(lport);
|
||||
}
|
||||
}
|
||||
@@ -2488,6 +2477,7 @@ static int __init fcoe_init(void)
|
||||
p = per_cpu_ptr(&fcoe_percpu, cpu);
|
||||
INIT_WORK(&p->work, fcoe_receive_work);
|
||||
skb_queue_head_init(&p->fcoe_rx_list);
|
||||
local_lock_init(&p->lock);
|
||||
}
|
||||
|
||||
/* Setup link change notification */
|
||||
@@ -2580,7 +2570,7 @@ static void fcoe_flogi_resp(struct fc_seq *seq, struct fc_frame *fp, void *arg)
|
||||
/* pre-FIP */
|
||||
if (is_zero_ether_addr(mac))
|
||||
fcoe_ctlr_recv_flogi(fip, lport, fp);
|
||||
if (!is_zero_ether_addr(mac))
|
||||
else
|
||||
fcoe_update_src_mac(lport, mac);
|
||||
done:
|
||||
fc_lport_flogi_resp(seq, fp, lport);
|
||||
|
||||
@@ -824,22 +824,21 @@ static unsigned long fcoe_ctlr_age_fcfs(struct fcoe_ctlr *fip)
|
||||
unsigned long deadline;
|
||||
unsigned long sel_time = 0;
|
||||
struct list_head del_list;
|
||||
struct fc_stats *stats;
|
||||
|
||||
INIT_LIST_HEAD(&del_list);
|
||||
|
||||
stats = per_cpu_ptr(fip->lp->stats, get_cpu());
|
||||
|
||||
list_for_each_entry_safe(fcf, next, &fip->fcfs, list) {
|
||||
deadline = fcf->time + fcf->fka_period + fcf->fka_period / 2;
|
||||
if (fip->sel_fcf == fcf) {
|
||||
if (time_after(jiffies, deadline)) {
|
||||
stats->MissDiscAdvCount++;
|
||||
u64 miss_cnt;
|
||||
|
||||
miss_cnt = this_cpu_inc_return(fip->lp->stats->MissDiscAdvCount);
|
||||
printk(KERN_INFO "libfcoe: host%d: "
|
||||
"Missing Discovery Advertisement "
|
||||
"for fab %16.16llx count %lld\n",
|
||||
fip->lp->host->host_no, fcf->fabric_name,
|
||||
stats->MissDiscAdvCount);
|
||||
miss_cnt);
|
||||
} else if (time_after(next_timer, deadline))
|
||||
next_timer = deadline;
|
||||
}
|
||||
@@ -855,7 +854,7 @@ static unsigned long fcoe_ctlr_age_fcfs(struct fcoe_ctlr *fip)
|
||||
*/
|
||||
list_del(&fcf->list);
|
||||
list_add(&fcf->list, &del_list);
|
||||
stats->VLinkFailureCount++;
|
||||
this_cpu_inc(fip->lp->stats->VLinkFailureCount);
|
||||
} else {
|
||||
if (time_after(next_timer, deadline))
|
||||
next_timer = deadline;
|
||||
@@ -864,7 +863,6 @@ static unsigned long fcoe_ctlr_age_fcfs(struct fcoe_ctlr *fip)
|
||||
sel_time = fcf->time;
|
||||
}
|
||||
}
|
||||
put_cpu();
|
||||
|
||||
list_for_each_entry_safe(fcf, next, &del_list, list) {
|
||||
/* Removes fcf from current list */
|
||||
@@ -1142,7 +1140,6 @@ static void fcoe_ctlr_recv_els(struct fcoe_ctlr *fip, struct sk_buff *skb)
|
||||
struct fip_desc *desc;
|
||||
struct fip_encaps *els;
|
||||
struct fcoe_fcf *sel;
|
||||
struct fc_stats *stats;
|
||||
enum fip_desc_type els_dtype = 0;
|
||||
u8 els_op;
|
||||
u8 sub;
|
||||
@@ -1286,10 +1283,8 @@ static void fcoe_ctlr_recv_els(struct fcoe_ctlr *fip, struct sk_buff *skb)
|
||||
fr_dev(fp) = lport;
|
||||
fr_encaps(fp) = els_dtype;
|
||||
|
||||
stats = per_cpu_ptr(lport->stats, get_cpu());
|
||||
stats->RxFrames++;
|
||||
stats->RxWords += skb->len / FIP_BPW;
|
||||
put_cpu();
|
||||
this_cpu_inc(lport->stats->RxFrames);
|
||||
this_cpu_add(lport->stats->RxWords, skb->len / FIP_BPW);
|
||||
|
||||
fc_exch_recv(lport, fp);
|
||||
return;
|
||||
@@ -1427,9 +1422,7 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip,
|
||||
ntoh24(vp->fd_fc_id));
|
||||
if (vn_port && (vn_port == lport)) {
|
||||
mutex_lock(&fip->ctlr_mutex);
|
||||
per_cpu_ptr(lport->stats,
|
||||
get_cpu())->VLinkFailureCount++;
|
||||
put_cpu();
|
||||
this_cpu_inc(lport->stats->VLinkFailureCount);
|
||||
fcoe_ctlr_reset(fip);
|
||||
mutex_unlock(&fip->ctlr_mutex);
|
||||
}
|
||||
@@ -1457,8 +1450,7 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip,
|
||||
* followed by physical port
|
||||
*/
|
||||
mutex_lock(&fip->ctlr_mutex);
|
||||
per_cpu_ptr(lport->stats, get_cpu())->VLinkFailureCount++;
|
||||
put_cpu();
|
||||
this_cpu_inc(lport->stats->VLinkFailureCount);
|
||||
fcoe_ctlr_reset(fip);
|
||||
mutex_unlock(&fip->ctlr_mutex);
|
||||
|
||||
|
||||
@@ -183,9 +183,9 @@ void __fcoe_get_lesb(struct fc_lport *lport,
|
||||
memset(lesb, 0, sizeof(*lesb));
|
||||
for_each_possible_cpu(cpu) {
|
||||
stats = per_cpu_ptr(lport->stats, cpu);
|
||||
lfc += stats->LinkFailureCount;
|
||||
vlfc += stats->VLinkFailureCount;
|
||||
mdac += stats->MissDiscAdvCount;
|
||||
lfc += READ_ONCE(stats->LinkFailureCount);
|
||||
vlfc += READ_ONCE(stats->VLinkFailureCount);
|
||||
mdac += READ_ONCE(stats->MissDiscAdvCount);
|
||||
}
|
||||
lesb->lesb_link_fail = htonl(lfc);
|
||||
lesb->lesb_vlink_fail = htonl(vlfc);
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
#define DRV_NAME "fnic"
|
||||
#define DRV_DESCRIPTION "Cisco FCoE HBA Driver"
|
||||
#define DRV_VERSION "1.6.0.53"
|
||||
#define DRV_VERSION "1.6.0.54"
|
||||
#define PFX DRV_NAME ": "
|
||||
#define DFX DRV_NAME "%d: "
|
||||
|
||||
|
||||
@@ -86,8 +86,7 @@ void fnic_debugfs_terminate(void)
|
||||
debugfs_remove(fnic_trace_debugfs_root);
|
||||
fnic_trace_debugfs_root = NULL;
|
||||
|
||||
if (fc_trc_flag)
|
||||
vfree(fc_trc_flag);
|
||||
vfree(fc_trc_flag);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user