mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
Merge r7471 from trunk
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7724 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -162,6 +162,18 @@ clean:
|
||||
extraclean: clean
|
||||
rm -f *.orig *.rej
|
||||
|
||||
conftest/bad_wr_mod/result-$(KVER).txt: \
|
||||
conftest/bad_wr_mod/bad_wr_mod.c \
|
||||
conftest/bad_wr_mod/Makefile
|
||||
echo "$(call run_conftest,bad_wr_mod, \
|
||||
-DBAD_WR_MODIFIER=const,-DBAD_WR_MODIFIER=)" >"$@"
|
||||
|
||||
conftest/cm_event_mod/result-$(KVER).txt: \
|
||||
conftest/cm_event_mod/cm_event_mod.c \
|
||||
conftest/cm_event_mod/Makefile
|
||||
echo "$(call run_conftest,cm_event_mod, \
|
||||
-DCM_HANDLER_EVENT_MODIFIER=const,-DCM_HANDLER_EVENT_MODIFIER=)" >"$@"
|
||||
|
||||
conftest/cm_listen/result-$(KVER).txt: \
|
||||
conftest/cm_listen/cm_listen.c \
|
||||
conftest/cm_listen/Makefile
|
||||
|
||||
3
srpt/conftest/bad_wr_mod/Makefile
Normal file
3
srpt/conftest/bad_wr_mod/Makefile
Normal file
@@ -0,0 +1,3 @@
|
||||
LINUXINCLUDE := $(PRE_CFLAGS) $(LINUXINCLUDE)
|
||||
|
||||
obj-m += bad_wr_mod.o
|
||||
13
srpt/conftest/bad_wr_mod/bad_wr_mod.c
Normal file
13
srpt/conftest/bad_wr_mod/bad_wr_mod.c
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <linux/module.h>
|
||||
#include <rdma/ib_cm.h>
|
||||
|
||||
static int modinit(void)
|
||||
{
|
||||
struct ib_qp *qp = NULL;
|
||||
const struct ib_recv_wr *recv_wr = NULL;
|
||||
const struct ib_recv_wr **bad_recv_wr = NULL;
|
||||
|
||||
return ib_post_recv(qp, recv_wr, bad_recv_wr);
|
||||
}
|
||||
|
||||
module_init(modinit);
|
||||
3
srpt/conftest/cm_event_mod/Makefile
Normal file
3
srpt/conftest/cm_event_mod/Makefile
Normal file
@@ -0,0 +1,3 @@
|
||||
LINUXINCLUDE := $(PRE_CFLAGS) $(LINUXINCLUDE)
|
||||
|
||||
obj-m += cm_event_mod.o
|
||||
14
srpt/conftest/cm_event_mod/cm_event_mod.c
Normal file
14
srpt/conftest/cm_event_mod/cm_event_mod.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <linux/module.h>
|
||||
#include <rdma/ib_cm.h>
|
||||
|
||||
static int h(struct ib_cm_id *cm_id, const struct ib_cm_event *event)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int modinit(void)
|
||||
{
|
||||
return ib_create_cm_id(NULL, h, NULL) != NULL;
|
||||
}
|
||||
|
||||
module_init(modinit);
|
||||
@@ -945,7 +945,7 @@ static int srpt_post_recv(struct srpt_device *sdev, struct srpt_rdma_ch *ch,
|
||||
{
|
||||
struct ib_sge list;
|
||||
struct ib_recv_wr wr;
|
||||
struct ib_recv_wr *bad_wr;
|
||||
BAD_WR_MODIFIER struct ib_recv_wr *bad_wr;
|
||||
|
||||
BUG_ON(!sdev);
|
||||
wr.wr_id = encode_wr_id(SRPT_RECV, ioctx->ioctx.index);
|
||||
@@ -979,7 +979,7 @@ static int srpt_post_send(struct srpt_rdma_ch *ch,
|
||||
{
|
||||
struct ib_sge list;
|
||||
struct ib_send_wr wr;
|
||||
struct ib_send_wr *bad_wr;
|
||||
BAD_WR_MODIFIER struct ib_send_wr *bad_wr;
|
||||
struct srpt_device *sdev = ch->sport->sdev;
|
||||
int ret;
|
||||
|
||||
@@ -1023,7 +1023,7 @@ out:
|
||||
static int srpt_zerolength_write(struct srpt_rdma_ch *ch)
|
||||
{
|
||||
struct ib_send_wr wr;
|
||||
struct ib_send_wr *bad_wr;
|
||||
BAD_WR_MODIFIER struct ib_send_wr *bad_wr;
|
||||
|
||||
memset(&wr, 0, sizeof(wr));
|
||||
wr.opcode = IB_WR_RDMA_WRITE;
|
||||
@@ -2851,7 +2851,7 @@ out:
|
||||
}
|
||||
|
||||
static int srpt_ib_cm_req_recv(struct ib_cm_id *cm_id,
|
||||
struct ib_cm_req_event_param *param,
|
||||
const struct ib_cm_req_event_param *param,
|
||||
void *private_data)
|
||||
{
|
||||
char sgid[40];
|
||||
@@ -2882,7 +2882,7 @@ static const char *inet_ntop(const void *sa, char *dst, unsigned int size)
|
||||
}
|
||||
|
||||
static int srpt_rdma_cm_req_recv(struct rdma_cm_id *cm_id,
|
||||
struct rdma_cm_event *event)
|
||||
const struct rdma_cm_event *event)
|
||||
{
|
||||
struct srpt_device *sdev;
|
||||
struct srp_login_req req;
|
||||
@@ -3006,7 +3006,8 @@ static void srpt_cm_rtu_recv(struct srpt_rdma_ch *ch)
|
||||
* a non-zero value in any other case will trigger a race with the
|
||||
* ib_destroy_cm_id() call in srpt_compl_thread().
|
||||
*/
|
||||
static int srpt_cm_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event)
|
||||
static int srpt_cm_handler(struct ib_cm_id *cm_id,
|
||||
CM_HANDLER_EVENT_MODIFIER struct ib_cm_event *event)
|
||||
{
|
||||
struct srpt_rdma_ch *ch = cm_id->context;
|
||||
int ret;
|
||||
@@ -3340,7 +3341,7 @@ static int srpt_perform_rdmas(struct srpt_rdma_ch *ch,
|
||||
#else
|
||||
struct ib_rdma_wr wr;
|
||||
#endif
|
||||
struct ib_send_wr *bad_wr;
|
||||
BAD_WR_MODIFIER struct ib_send_wr *bad_wr;
|
||||
struct rdma_iu *riu;
|
||||
int i;
|
||||
int ret = -ENOMEM;
|
||||
|
||||
Reference in New Issue
Block a user