From patchwork Tue May 25 19:51:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Heinz X-Patchwork-Id: 102283 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4PJqEx4001721 for ; Tue, 25 May 2010 19:52:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758778Ab0EYTwF (ORCPT ); Tue, 25 May 2010 15:52:05 -0400 Received: from avexcashub1.qlogic.com ([198.70.193.61]:35835 "EHLO avexcashub1.qlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758746Ab0EYTvz convert rfc822-to-8bit (ORCPT ); Tue, 25 May 2010 15:51:55 -0400 Received: from avexcashub2.qlogic.org (10.1.4.116) by avexcashub1.qlogic.org (10.1.4.161) with Microsoft SMTP Server (TLS) id 8.1.375.2; Tue, 25 May 2010 12:51:55 -0700 Received: from MNEXCASHUB2.qlogic.org (10.33.2.104) by avexcashub2.qlogic.org (10.1.4.162) with Microsoft SMTP Server (TLS) id 8.1.375.2; Tue, 25 May 2010 12:51:54 -0700 Received: from MNEXMB1.qlogic.org ([fe80::c6b:fda:afec:79a1]) by MNEXCASHUB2.qlogic.org ([::1]) with mapi; Tue, 25 May 2010 14:51:52 -0500 From: Mike Heinz To: "linux-rdma@vger.kernel.org" Date: Tue, 25 May 2010 14:51:50 -0500 Subject: [PATCH] ofa_kernel madeye.c Thread-Topic: [PATCH] ofa_kernel madeye.c Thread-Index: Acr8Q7dkVwQGviZPRX26JhzZKO7AhA== Message-ID: <4C2744E8AD2982428C5BFE523DF8CDCB49A488D3FF@MNEXMB1.qlogic.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 25 May 2010 19:52:15 +0000 (UTC) diff --git a/drivers/infiniband/util/madeye.c b/drivers/infiniband/util/madeye.c index 0cda06c..2c650a3 100644 --- a/drivers/infiniband/util/madeye.c +++ b/drivers/infiniband/util/madeye.c @@ -401,7 +401,7 @@ static void snoop_smi_handler(struct ib_mad_agent *mad_agent, if (!smp && hdr->mgmt_class != mgmt_class) return; - if (attr_id && hdr->attr_id != attr_id) + if (attr_id && be16_to_cpu(hdr->attr_id) != attr_id) return; printk("Madeye:sent SMP\n"); @@ -413,7 +413,7 @@ static void recv_smi_handler(struct ib_mad_agent *mad_agent, { if (!smp && mad_recv_wc->recv_buf.mad->mad_hdr.mgmt_class != mgmt_class) return; - if (attr_id && mad_recv_wc->recv_buf.mad->mad_hdr.attr_id != attr_id) + if (attr_id && be16_to_cpu(mad_recv_wc->recv_buf.mad->mad_hdr.attr_id) != attr_id) return; printk("Madeye:recv SMP\n"); @@ -446,7 +446,7 @@ static void snoop_gsi_handler(struct ib_mad_agent *mad_agent, if (!gmp && hdr->mgmt_class != mgmt_class) return; - if (attr_id && hdr->attr_id != attr_id) + if (attr_id && be16_to_cpu(hdr->attr_id) != attr_id) return; printk("Madeye:sent GMP\n"); @@ -468,7 +468,7 @@ static void recv_gsi_handler(struct ib_mad_agent *mad_agent, if (!gmp && hdr->mgmt_class != mgmt_class) return; - if (attr_id && mad_recv_wc->recv_buf.mad->mad_hdr.attr_id != attr_id) + if (attr_id && be16_to_cpu(mad_recv_wc->recv_buf.mad->mad_hdr.attr_id) != attr_id) return; printk("Madeye:recv GMP\n");