Skip to content

Commit 2045b06

Browse files
committed
Merge: iSCSI driver updates
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/6780 JIRA: https://issues.redhat.com/browse/RHEL-90552 Goal Update iSCSI drivers to the latest upstream, where compatible As a developer, I want to keep these driver in sync with upstream development as much as possible, to provide the latest bug fixes and enhancements to our customers. Acceptance criteria A list of verification conditions, successful functional tests, or expected outcomes in order to declare this story/task successfully completed. iSCSI regression testing passes Signed-off-by: Chris Leech <cleech@redhat.com> Approved-by: John Meneghini <jmeneghi@redhat.com> Approved-by: bgurney <bgurney@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Augusto Caringi <acaringi@redhat.com>
2 parents 08158ad + 5b4fb1d commit 2045b06

File tree

4 files changed

+13
-43
lines changed

4 files changed

+13
-43
lines changed

drivers/scsi/bnx2i/bnx2i_init.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -415,14 +415,11 @@ static int bnx2i_cpu_online(unsigned int cpu)
415415

416416
p = &per_cpu(bnx2i_percpu, cpu);
417417

418-
thread = kthread_create_on_node(bnx2i_percpu_io_thread, (void *)p,
419-
cpu_to_node(cpu),
420-
"bnx2i_thread/%d", cpu);
418+
thread = kthread_create_on_cpu(bnx2i_percpu_io_thread, (void *)p,
419+
cpu, "bnx2i_thread/%d");
421420
if (IS_ERR(thread))
422421
return PTR_ERR(thread);
423422

424-
/* bind thread to the cpu */
425-
kthread_bind(thread, cpu);
426423
p->iothread = thread;
427424
wake_up_process(thread);
428425
return 0;

drivers/scsi/qedi/qedi_main.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ static int qedi_alloc_and_init_sb(struct qedi_ctx *qedi,
369369
ret = qedi_ops->common->sb_init(qedi->cdev, sb_info, sb_virt, sb_phys,
370370
sb_id, QED_SB_TYPE_STORAGE);
371371
if (ret) {
372+
dma_free_coherent(&qedi->pdev->dev, sizeof(*sb_virt), sb_virt, sb_phys);
372373
QEDI_ERR(&qedi->dbg_ctx,
373374
"Status block initialization failed for id = %d.\n",
374375
sb_id);
@@ -1960,13 +1961,11 @@ static int qedi_cpu_online(unsigned int cpu)
19601961
struct qedi_percpu_s *p = this_cpu_ptr(&qedi_percpu);
19611962
struct task_struct *thread;
19621963

1963-
thread = kthread_create_on_node(qedi_percpu_io_thread, (void *)p,
1964-
cpu_to_node(cpu),
1965-
"qedi_thread/%d", cpu);
1964+
thread = kthread_create_on_cpu(qedi_percpu_io_thread, (void *)p,
1965+
cpu, "qedi_thread/%d");
19661966
if (IS_ERR(thread))
19671967
return PTR_ERR(thread);
19681968

1969-
kthread_bind(thread, cpu);
19701969
p->iothread = thread;
19711970
wake_up_process(thread);
19721971
return 0;

drivers/scsi/scsi_transport_iscsi.c

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2122,33 +2122,6 @@ int iscsi_add_session(struct iscsi_cls_session *session, unsigned int target_id)
21222122
}
21232123
EXPORT_SYMBOL_GPL(iscsi_add_session);
21242124

2125-
/**
2126-
* iscsi_create_session - create iscsi class session
2127-
* @shost: scsi host
2128-
* @transport: iscsi transport
2129-
* @dd_size: private driver data size
2130-
* @target_id: which target
2131-
*
2132-
* This can be called from a LLD or iscsi_transport.
2133-
*/
2134-
struct iscsi_cls_session *
2135-
iscsi_create_session(struct Scsi_Host *shost, struct iscsi_transport *transport,
2136-
int dd_size, unsigned int target_id)
2137-
{
2138-
struct iscsi_cls_session *session;
2139-
2140-
session = iscsi_alloc_session(shost, transport, dd_size);
2141-
if (!session)
2142-
return NULL;
2143-
2144-
if (iscsi_add_session(session, target_id)) {
2145-
iscsi_free_session(session);
2146-
return NULL;
2147-
}
2148-
return session;
2149-
}
2150-
EXPORT_SYMBOL_GPL(iscsi_create_session);
2151-
21522125
static void iscsi_conn_release(struct device *dev)
21532126
{
21542127
struct iscsi_cls_conn *conn = iscsi_dev_to_conn(dev);
@@ -3209,11 +3182,14 @@ iscsi_set_host_param(struct iscsi_transport *transport,
32093182
}
32103183

32113184
/* see similar check in iscsi_if_set_param() */
3212-
if (strlen(data) > ev->u.set_host_param.len)
3213-
return -EINVAL;
3185+
if (strlen(data) > ev->u.set_host_param.len) {
3186+
err = -EINVAL;
3187+
goto out;
3188+
}
32143189

32153190
err = transport->set_host_param(shost, ev->u.set_host_param.param,
32163191
data, ev->u.set_host_param.len);
3192+
out:
32173193
scsi_host_put(shost);
32183194
return err;
32193195
}
@@ -4104,7 +4080,7 @@ iscsi_if_rx(struct sk_buff *skb)
41044080
}
41054081
do {
41064082
/*
4107-
* special case for GET_STATS:
4083+
* special case for GET_STATS, GET_CHAP and GET_HOST_STATS:
41084084
* on success - sending reply and stats from
41094085
* inside of if_recv_msg(),
41104086
* on error - fall through.
@@ -4113,6 +4089,8 @@ iscsi_if_rx(struct sk_buff *skb)
41134089
break;
41144090
if (ev->type == ISCSI_UEVENT_GET_CHAP && !err)
41154091
break;
4092+
if (ev->type == ISCSI_UEVENT_GET_HOST_STATS && !err)
4093+
break;
41164094
err = iscsi_if_send_reply(portid, nlh->nlmsg_type,
41174095
ev, sizeof(*ev));
41184096
if (err == -EAGAIN && --retries < 0) {

include/scsi/scsi_transport_iscsi.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -447,10 +447,6 @@ extern int iscsi_add_session(struct iscsi_cls_session *session,
447447
unsigned int target_id);
448448
extern int iscsi_session_event(struct iscsi_cls_session *session,
449449
enum iscsi_uevent_e event);
450-
extern struct iscsi_cls_session *iscsi_create_session(struct Scsi_Host *shost,
451-
struct iscsi_transport *t,
452-
int dd_size,
453-
unsigned int target_id);
454450
extern void iscsi_force_destroy_session(struct iscsi_cls_session *session);
455451
extern void iscsi_remove_session(struct iscsi_cls_session *session);
456452
extern void iscsi_free_session(struct iscsi_cls_session *session);

0 commit comments

Comments
 (0)