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 ) );
default:
DBGC ( conn, "CM %p unexpected response (attribute %04x)\n",
conn, ntohs ( mad->hdr.attr_id ) );
- rc = -EIO;
+ rc = -ENOTSUP;
break;
}
unsigned long qkey;
/* Report failures */
+ if ( ( rc == 0 ) && ( mad->hdr.status != htons ( IB_MGMT_STATUS_OK ) ))
+ rc = -ENOTCONN;
if ( rc != 0 ) {
DBGC ( ibdev, "IBDEV %p QPN %lx join failed: %s\n",
ibdev, qp->qpn, strerror ( rc ) );
struct ib_mad_hdr *hdr = &mad->hdr;
struct ib_mad_transaction *madx;
struct ib_mad_agent *agent;
- int rc;
/* Look for a matching transaction by TID */
list_for_each_entry ( madx, &mi->madx, list ) {
if ( memcmp ( &hdr->tid, &madx->mad.hdr.tid,
sizeof ( hdr->tid ) ) != 0 )
continue;
- /* Get transaction result status */
- rc = ( ( hdr->status == htons ( IB_MGMT_STATUS_OK ) ) ?
- 0 : -EIO );
/* Found a matching transaction */
- madx->op->complete ( ibdev, mi, madx, rc, mad, av );
+ madx->op->complete ( ibdev, mi, madx, 0, mad, av );
return 0;
}
struct ib_path_record *pathrec = &mad->sa.sa_data.path_record;
/* Report failures */
+ if ( ( rc == 0 ) && ( mad->hdr.status != htons ( IB_MGMT_STATUS_OK ) ))
+ rc = -ENETUNREACH;
if ( rc != 0 ) {
DBGC ( ibdev, "IBDEV %p path lookup for %08x:%08x:%08x:%08x "
"failed: %s\n", ibdev, htonl ( dgid->u.dwords[0] ),