Skip to content

Commit 38961c2

Browse files
author
CKI KWF Bot
committed
Merge: iSCSI driver minor updates
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7572 ## Approved Development Ticket(s) JIRA: https://issues.redhat.com/browse/RHEL-121669 Signed-off-by: Chris Leech <cleech@redhat.com> Approved-by: John Meneghini <jmeneghi@redhat.com> Approved-by: Tomas Henzl <thenzl@redhat.com> Approved-by: Ewan D. Milne <emilne@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 489f6b2 + 9ead012 commit 38961c2

File tree

8 files changed

+17
-59
lines changed

8 files changed

+17
-59
lines changed

drivers/scsi/libiscsi.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3185,7 +3185,8 @@ iscsi_conn_setup(struct iscsi_cls_session *cls_session, int dd_size,
31853185
return NULL;
31863186
conn = cls_conn->dd_data;
31873187

3188-
conn->dd_data = cls_conn->dd_data + sizeof(*conn);
3188+
if (dd_size)
3189+
conn->dd_data = cls_conn->dd_data + sizeof(*conn);
31893190
conn->session = session;
31903191
conn->cls_conn = cls_conn;
31913192
conn->c_stage = ISCSI_CONN_INITIAL_STAGE;

drivers/scsi/qedi/qedi_dbg.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -103,25 +103,3 @@ qedi_dbg_info(struct qedi_dbg_ctx *qedi, const char *func, u32 line,
103103
ret:
104104
va_end(va);
105105
}
106-
107-
int
108-
qedi_create_sysfs_attr(struct Scsi_Host *shost, struct sysfs_bin_attrs *iter)
109-
{
110-
int ret = 0;
111-
112-
for (; iter->name; iter++) {
113-
ret = sysfs_create_bin_file(&shost->shost_gendev.kobj,
114-
iter->attr);
115-
if (ret)
116-
pr_err("Unable to create sysfs %s attr, err(%d).\n",
117-
iter->name, ret);
118-
}
119-
return ret;
120-
}
121-
122-
void
123-
qedi_remove_sysfs_attr(struct Scsi_Host *shost, struct sysfs_bin_attrs *iter)
124-
{
125-
for (; iter->name; iter++)
126-
sysfs_remove_bin_file(&shost->shost_gendev.kobj, iter->attr);
127-
}

drivers/scsi/qedi/qedi_dbg.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -87,18 +87,6 @@ void qedi_dbg_notice(struct qedi_dbg_ctx *qedi, const char *func, u32 line,
8787
void qedi_dbg_info(struct qedi_dbg_ctx *qedi, const char *func, u32 line,
8888
u32 info, const char *fmt, ...);
8989

90-
struct Scsi_Host;
91-
92-
struct sysfs_bin_attrs {
93-
char *name;
94-
struct bin_attribute *attr;
95-
};
96-
97-
int qedi_create_sysfs_attr(struct Scsi_Host *shost,
98-
struct sysfs_bin_attrs *iter);
99-
void qedi_remove_sysfs_attr(struct Scsi_Host *shost,
100-
struct sysfs_bin_attrs *iter);
101-
10290
/* DebugFS related code */
10391
struct qedi_list_of_funcs {
10492
char *oper_str;

drivers/scsi/qedi/qedi_gbl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ int qedi_iscsi_cleanup_task(struct iscsi_task *task,
4545
void qedi_iscsi_unmap_sg_list(struct qedi_cmd *cmd);
4646
void qedi_update_itt_map(struct qedi_ctx *qedi, u32 tid, u32 proto_itt,
4747
struct qedi_cmd *qedi_cmd);
48-
void qedi_get_proto_itt(struct qedi_ctx *qedi, u32 tid, u32 *proto_itt);
4948
void qedi_get_task_tid(struct qedi_ctx *qedi, u32 itt, int16_t *tid);
5049
void qedi_process_iscsi_error(struct qedi_endpoint *ep,
5150
struct iscsi_eqe_data *data);

drivers/scsi/qedi/qedi_main.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1877,14 +1877,6 @@ void qedi_get_task_tid(struct qedi_ctx *qedi, u32 itt, s16 *tid)
18771877
WARN_ON(1);
18781878
}
18791879

1880-
void qedi_get_proto_itt(struct qedi_ctx *qedi, u32 tid, u32 *proto_itt)
1881-
{
1882-
*proto_itt = qedi->itt_map[tid].itt;
1883-
QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_CONN,
1884-
"Get itt map tid [0x%x with proto itt[0x%x]",
1885-
tid, *proto_itt);
1886-
}
1887-
18881880
struct qedi_cmd *qedi_get_cmd_from_tid(struct qedi_ctx *qedi, u32 tid)
18891881
{
18901882
struct qedi_cmd *cmd = NULL;

drivers/scsi/qla4xxx/ql4_nx.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -973,11 +973,6 @@ qla4_82xx_pinit_from_rom(struct scsi_qla_host *ha, int verbose)
973973
unsigned long off;
974974
unsigned offset, n;
975975

976-
struct crb_addr_pair {
977-
long addr;
978-
long data;
979-
};
980-
981976
/* Halt all the indiviual PEGs and other blocks of the ISP */
982977
qla4_82xx_rom_lock(ha);
983978

drivers/scsi/qla4xxx/ql4_os.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3420,6 +3420,8 @@ static int qla4xxx_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
34203420
task_data->data_dma = dma_map_single(&ha->pdev->dev, task->data,
34213421
task->data_count,
34223422
DMA_TO_DEVICE);
3423+
if (dma_mapping_error(&ha->pdev->dev, task_data->data_dma))
3424+
return -ENOMEM;
34233425
}
34243426

34253427
DEBUG2(ql4_printk(KERN_INFO, ha, "%s: MaxRecvLen %u, iscsi hrd %d\n",
@@ -4102,7 +4104,7 @@ void qla4xxx_srb_compl(struct kref *ref)
41024104
* The mid-level driver tries to ensure that queuecommand never gets
41034105
* invoked concurrently with itself or the interrupt handler (although
41044106
* the interrupt handler may call this routine as part of request-
4105-
* completion handling). Unfortunely, it sometimes calls the scheduler
4107+
* completion handling). Unfortunately, it sometimes calls the scheduler
41064108
* in interrupt context which is a big NO! NO!.
41074109
**/
41084110
static int qla4xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
@@ -4645,7 +4647,7 @@ static int qla4xxx_cmd_wait(struct scsi_qla_host *ha)
46454647
cmd = scsi_host_find_tag(ha->host, index);
46464648
/*
46474649
* We cannot just check if the index is valid,
4648-
* becase if we are run from the scsi eh, then
4650+
* because if we are run from the scsi eh, then
46494651
* the scsi/block layer is going to prevent
46504652
* the tag from being released.
46514653
*/
@@ -4950,7 +4952,7 @@ static int qla4xxx_recover_adapter(struct scsi_qla_host *ha)
49504952
/* Upon successful firmware/chip reset, re-initialize the adapter */
49514953
if (status == QLA_SUCCESS) {
49524954
/* For ISP-4xxx, force function 1 to always initialize
4953-
* before function 3 to prevent both funcions from
4955+
* before function 3 to prevent both functions from
49544956
* stepping on top of the other */
49554957
if (is_qla40XX(ha) && (ha->mac_index == 3))
49564958
ssleep(6);
@@ -6604,6 +6606,8 @@ static struct iscsi_endpoint *qla4xxx_get_ep_fwdb(struct scsi_qla_host *ha,
66046606

66056607
ep = qla4xxx_ep_connect(ha->host, (struct sockaddr *)dst_addr, 0);
66066608
vfree(dst_addr);
6609+
if (IS_ERR(ep))
6610+
return NULL;
66076611
return ep;
66086612
}
66096613

@@ -6910,7 +6914,7 @@ static int qla4xxx_sess_conn_setup(struct scsi_qla_host *ha,
69106914
struct ddb_entry *ddb_entry = NULL;
69116915

69126916
/* Create session object, with INVALID_ENTRY,
6913-
* the targer_id would get set when we issue the login
6917+
* the target_id would get set when we issue the login
69146918
*/
69156919
cls_sess = iscsi_session_setup(&qla4xxx_iscsi_transport, ha->host,
69166920
cmds_max, sizeof(struct ddb_entry),

drivers/scsi/scsi_transport_iscsi.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2143,6 +2143,8 @@ static int iscsi_iter_destroy_conn_fn(struct device *dev, void *data)
21432143
return 0;
21442144

21452145
iscsi_remove_conn(iscsi_dev_to_conn(dev));
2146+
iscsi_put_conn(iscsi_dev_to_conn(dev));
2147+
21462148
return 0;
21472149
}
21482150

@@ -3499,7 +3501,7 @@ static int iscsi_new_flashnode(struct iscsi_transport *transport,
34993501
pr_err("%s could not find host no %u\n",
35003502
__func__, ev->u.new_flashnode.host_no);
35013503
err = -ENODEV;
3502-
goto put_host;
3504+
goto exit_new_fnode;
35033505
}
35043506

35053507
index = transport->new_flashnode(shost, data, len);
@@ -3509,7 +3511,6 @@ static int iscsi_new_flashnode(struct iscsi_transport *transport,
35093511
else
35103512
err = -EIO;
35113513

3512-
put_host:
35133514
scsi_host_put(shost);
35143515

35153516
exit_new_fnode:
@@ -3534,7 +3535,7 @@ static int iscsi_del_flashnode(struct iscsi_transport *transport,
35343535
pr_err("%s could not find host no %u\n",
35353536
__func__, ev->u.del_flashnode.host_no);
35363537
err = -ENODEV;
3537-
goto put_host;
3538+
goto exit_del_fnode;
35383539
}
35393540

35403541
idx = ev->u.del_flashnode.flashnode_idx;
@@ -3576,7 +3577,7 @@ static int iscsi_login_flashnode(struct iscsi_transport *transport,
35763577
pr_err("%s could not find host no %u\n",
35773578
__func__, ev->u.login_flashnode.host_no);
35783579
err = -ENODEV;
3579-
goto put_host;
3580+
goto exit_login_fnode;
35803581
}
35813582

35823583
idx = ev->u.login_flashnode.flashnode_idx;
@@ -3628,7 +3629,7 @@ static int iscsi_logout_flashnode(struct iscsi_transport *transport,
36283629
pr_err("%s could not find host no %u\n",
36293630
__func__, ev->u.logout_flashnode.host_no);
36303631
err = -ENODEV;
3631-
goto put_host;
3632+
goto exit_logout_fnode;
36323633
}
36333634

36343635
idx = ev->u.logout_flashnode.flashnode_idx;
@@ -3678,7 +3679,7 @@ static int iscsi_logout_flashnode_sid(struct iscsi_transport *transport,
36783679
pr_err("%s could not find host no %u\n",
36793680
__func__, ev->u.logout_flashnode.host_no);
36803681
err = -ENODEV;
3681-
goto put_host;
3682+
goto exit_logout_sid;
36823683
}
36833684

36843685
session = iscsi_session_lookup(ev->u.logout_flashnode_sid.sid);

0 commit comments

Comments
 (0)