Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd8c8ade authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by Eric Van Hensbergen
Browse files
parent 936bb2d7
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -468,7 +468,8 @@ p9pdu_vwritef(struct p9_fcall *pdu, int proto_version, const char *fmt,
		case 'E':{
		case 'E':{
				 int32_t cnt = va_arg(ap, int32_t);
				 int32_t cnt = va_arg(ap, int32_t);
				 const char *k = va_arg(ap, const void *);
				 const char *k = va_arg(ap, const void *);
				 const char *u = va_arg(ap, const void *);
				 const char __user *u = va_arg(ap,
							const void __user *);
				 errcode = p9pdu_writef(pdu, proto_version, "d",
				 errcode = p9pdu_writef(pdu, proto_version, "d",
						 cnt);
						 cnt);
				 if (!errcode && pdu_write_urw(pdu, k, u, cnt))
				 if (!errcode && pdu_write_urw(pdu, k, u, cnt))
+1 −1
Original line number Original line Diff line number Diff line
@@ -66,7 +66,7 @@ p9_payload_gup(struct p9_req_t *req, size_t *pdata_off, int *pdata_len,
	uint32_t pdata_mapped_pages;
	uint32_t pdata_mapped_pages;
	struct trans_rpage_info  *rpinfo;
	struct trans_rpage_info  *rpinfo;


	*pdata_off = (size_t)req->tc->pubuf & (PAGE_SIZE-1);
	*pdata_off = (__force size_t)req->tc->pubuf & (PAGE_SIZE-1);


	if (*pdata_off)
	if (*pdata_off)
		first_page_bytes = min(((size_t)PAGE_SIZE - *pdata_off),
		first_page_bytes = min(((size_t)PAGE_SIZE - *pdata_off),
+11 −4
Original line number Original line Diff line number Diff line
@@ -326,8 +326,11 @@ req_retry_pinned:
			outp = pack_sg_list_p(chan->sg, out, VIRTQUEUE_NUM,
			outp = pack_sg_list_p(chan->sg, out, VIRTQUEUE_NUM,
					pdata_off, rpinfo->rp_data, pdata_len);
					pdata_off, rpinfo->rp_data, pdata_len);
		} else {
		} else {
			char *pbuf = req->tc->pubuf ? req->tc->pubuf :
			char *pbuf;
								req->tc->pkbuf;
			if (req->tc->pubuf)
				pbuf = (__force char *) req->tc->pubuf;
			else
				pbuf = req->tc->pkbuf;
			outp = pack_sg_list(chan->sg, out, VIRTQUEUE_NUM, pbuf,
			outp = pack_sg_list(chan->sg, out, VIRTQUEUE_NUM, pbuf,
					req->tc->pbuf_size);
					req->tc->pbuf_size);
		}
		}
@@ -352,8 +355,12 @@ req_retry_pinned:
			in = pack_sg_list_p(chan->sg, out+inp, VIRTQUEUE_NUM,
			in = pack_sg_list_p(chan->sg, out+inp, VIRTQUEUE_NUM,
					pdata_off, rpinfo->rp_data, pdata_len);
					pdata_off, rpinfo->rp_data, pdata_len);
		} else {
		} else {
			char *pbuf = req->tc->pubuf ? req->tc->pubuf :
			char *pbuf;
								req->tc->pkbuf;
			if (req->tc->pubuf)
				pbuf = (__force char *) req->tc->pubuf;
			else
				pbuf = req->tc->pkbuf;

			in = pack_sg_list(chan->sg, out+inp, VIRTQUEUE_NUM,
			in = pack_sg_list(chan->sg, out+inp, VIRTQUEUE_NUM,
					pbuf, req->tc->pbuf_size);
					pbuf, req->tc->pbuf_size);
		}
		}