From patchwork Wed May 26 12:42:15 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Heinz X-Patchwork-Id: 102391 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 o4QCgVIY031942 for ; Wed, 26 May 2010 12:42:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755022Ab0EZMmU (ORCPT ); Wed, 26 May 2010 08:42:20 -0400 Received: from avexcashub1.qlogic.com ([198.70.193.61]:30361 "EHLO avexcashub1.qlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755007Ab0EZMmT convert rfc822-to-8bit (ORCPT ); Wed, 26 May 2010 08:42:19 -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; Wed, 26 May 2010 05:42:18 -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; Wed, 26 May 2010 05:42:18 -0700 Received: from MNEXMB1.qlogic.org ([fe80::c6b:fda:afec:79a1]) by MNEXCASHUB2.qlogic.org ([::1]) with mapi; Wed, 26 May 2010 07:42:17 -0500 From: Mike Heinz To: "linux-rdma@vger.kernel.org" CC: Roland Dreier Date: Wed, 26 May 2010 07:42:15 -0500 Subject: [PATCH] ofa_kernel/util madeye.c Thread-Topic: [PATCH] ofa_kernel/util madeye.c Thread-Index: Acr80N6QmLirqBNvSyKgwrcoHmByAw== Message-ID: <4C2744E8AD2982428C5BFE523DF8CDCB49A488D454@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]); Wed, 26 May 2010 12:42:31 +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,