From patchwork Mon Nov 16 23:57:19 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hefty, Sean" X-Patchwork-Id: 60543 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAGNuqRm014425 for ; Mon, 16 Nov 2009 23:57:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754347AbZKPX5O (ORCPT ); Mon, 16 Nov 2009 18:57:14 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754602AbZKPX5O (ORCPT ); Mon, 16 Nov 2009 18:57:14 -0500 Received: from mga09.intel.com ([134.134.136.24]:19675 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754347AbZKPX5O (ORCPT ); Mon, 16 Nov 2009 18:57:14 -0500 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 16 Nov 2009 15:42:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.44,754,1249282800"; d="scan'208";a="467871223" Received: from mshefty-mobl2.amr.corp.intel.com (HELO msheftyMOBL2) ([10.24.90.109]) by orsmga002.jf.intel.com with ESMTP; 16 Nov 2009 16:14:27 -0800 From: "Sean Hefty" To: Subject: [PATCH 2/9] RDMA CM: Correct detection of SA Created MGID Date: Mon, 16 Nov 2009 15:57:19 -0800 Message-ID: <0666293A38644E8BB2AF359DFBDF5300@amr.corp.intel.com> MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcpnGIhXHIf52KjiSDi2JKmXlw2h3w== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 0753178..8bb2cf4 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -2687,7 +2687,7 @@ static void cma_set_mgid(struct rdma_id_private *id_priv, if (cma_any_addr(addr)) { memset(mgid, 0, sizeof *mgid); } else if ((addr->sa_family == AF_INET6) && - ((be32_to_cpu(sin6->sin6_addr.s6_addr32[0]) & 0xFF10A01B) == + ((be32_to_cpu(sin6->sin6_addr.s6_addr32[0]) & 0xFFF0FFFF) == 0xFF10A01B)) { /* IPv6 address is an SA assigned MGID. */ memcpy(mgid, &sin6->sin6_addr, sizeof *mgid);