mirror of
https://github.com/ipxe/ipxe
synced 2025-12-24 06:22:59 +03:00
[infiniband] Generate more specific errors in response to failure MADs
Generate errors within individual MAD transaction consumers such as ib_pathrec.c and ib_mcast.c, rather than within ib_mi.c. This allows for more meaningful error messages to eventually be displayed to the user.
This commit is contained in:
@@ -148,6 +148,8 @@ static void ib_cm_req_complete ( struct ib_device *ibdev,
|
||||
size_t private_data_len = 0;
|
||||
|
||||
/* Report failures */
|
||||
if ( ( rc == 0 ) && ( mad->hdr.status != htons ( IB_MGMT_STATUS_OK ) ))
|
||||
rc = -EIO;
|
||||
if ( rc != 0 ) {
|
||||
DBGC ( conn, "CM %p connection request failed: %s\n",
|
||||
conn, strerror ( rc ) );
|
||||
@@ -195,7 +197,7 @@ static void ib_cm_req_complete ( struct ib_device *ibdev,
|
||||
default:
|
||||
DBGC ( conn, "CM %p unexpected response (attribute %04x)\n",
|
||||
conn, ntohs ( mad->hdr.attr_id ) );
|
||||
rc = -EIO;
|
||||
rc = -ENOTSUP;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user