[infiniband] Remove the return status code from MAD handlers

MAD handlers have to set the status fields within the MAD itself
anyway, in order to provide a meaningful response MAD; the additional
gPXE return status code is just noise.

Note that we probably don't need to ever explicitly set the status to
IB_MGMT_STATUS_OK, since it should already have this value from the
request.  (By not explicitly setting the status in this way, we can
safely have ib_sma_set_xxx() call ib_sma_get_xxx() in order to
generate the GetResponse MAD without worrying that ib_sma_get_xxx()
will clear any error status set by ib_sma_set_xxx().)
This commit is contained in:
Michael Brown
2009-07-10 21:29:25 +01:00
parent f1d92fa886
commit 94876f4bb6
4 changed files with 37 additions and 69 deletions

View File

@@ -170,10 +170,9 @@ int ib_resolve_path ( struct ib_device *ibdev,
*
* @v gma General management agent
* @v mad MAD
* @ret rc Return status code
*/
static int ib_handle_path_record ( struct ib_gma *gma,
union ib_mad *mad ) {
static void ib_handle_path_record ( struct ib_gma *gma,
union ib_mad *mad ) {
struct ib_device *ibdev = gma->ibdev;
struct ib_path_record *path_record = &mad->sa.sa_data.path_record;
struct ib_gid *dgid = &path_record->dgid;
@@ -186,7 +185,7 @@ static int ib_handle_path_record ( struct ib_gma *gma,
if ( mad->hdr.status != htons ( IB_MGMT_STATUS_OK ) ) {
DBGC ( gma, "GMA %p path record lookup failed with status "
"%04x\n", gma, ntohs ( mad->hdr.status ) );
return -EINVAL;
return;
}
/* Extract values from MAD */
@@ -209,8 +208,6 @@ static int ib_handle_path_record ( struct ib_gma *gma,
cached->rate = rate;
cached->sl = sl;
}
return 0;
}
/** Path record response handler */