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

Commit 6a5464f2 authored by Mitko Haralanov's avatar Mitko Haralanov Committed by Greg Kroah-Hartman
Browse files

staging/rdma/hfi1: Detect SDMA transmission error early



It is possible for an SDMA transmission error to happen
during the processing of an user SDMA transfer. In that
case it is better to detect it early and abort any further
attempts to send more packets.

Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
Signed-off-by: default avatarMitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent faa98b86
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -774,6 +774,12 @@ static int user_sdma_send_pkts(struct user_sdma_request *req, unsigned maxpkts)

	pq = req->pq;

	/* If tx completion has reported an error, we are done. */
	if (test_bit(SDMA_REQ_HAS_ERROR, &req->flags)) {
		set_bit(SDMA_REQ_DONE_ERROR, &req->flags);
		return -EFAULT;
	}

	/*
	 * Check if we might have sent the entire request already
	 */