IB/mad: Don't send response for failed MADs
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Tue, 24 Apr 2012 23:08:57 +0000 (16:08 -0700)
committerRoland Dreier <roland@purestorage.com>
Tue, 24 Apr 2012 23:08:57 +0000 (16:08 -0700)
commita9e7432319eb26ad90f18a7d215e50341d28ecb2
treea6086093a69e4f3f4339085af76e323c44ef38d6
parent840777de530ae96ee9a3022f7ec1d6c65abb26ac
IB/mad: Don't send response for failed MADs

Commit 0b307043049f ("IB/mad: Return error response for unsupported
MADs") does not failed MADs (eg those that return
IB_MAD_RESULT_FAILURE) properly -- these MADs should be silently
discarded. (We should not force the lower-layer drivers to return
SUCCESS | CONSUMED in this case, since the MAD is NOT successful).
Unsupported MADs are not failures -- they return SUCCESS, but with an
"unsupported error" status value inside the response MAD.

Reviewed-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/core/mad.c