From patchwork Tue Feb 16 08:59:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Schmidt X-Patchwork-Id: 79561 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 o1G8xveU014950 for ; Tue, 16 Feb 2010 08:59:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755497Ab0BPI7z (ORCPT ); Tue, 16 Feb 2010 03:59:55 -0500 Received: from mtagate3.uk.ibm.com ([194.196.100.163]:41629 "EHLO mtagate3.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754921Ab0BPI7z (ORCPT ); Tue, 16 Feb 2010 03:59:55 -0500 Received: from d06nrmr1806.portsmouth.uk.ibm.com (d06nrmr1806.portsmouth.uk.ibm.com [9.149.39.193]) by mtagate3.uk.ibm.com (8.13.1/8.13.1) with ESMTP id o1G8xs91002229; Tue, 16 Feb 2010 08:59:54 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o1G8xsLF1433824; Tue, 16 Feb 2010 08:59:54 GMT Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id o1G8xrPA007242; Tue, 16 Feb 2010 08:59:53 GMT Received: from alex-laptop (dyn-9-152-241-49.boeblingen.de.ibm.com [9.152.241.49]) by d06av02.portsmouth.uk.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id o1G8xqPq007236; Tue, 16 Feb 2010 08:59:53 GMT Date: Tue, 16 Feb 2010 09:59:50 +0100 From: Alexander Schmidt To: Roland Dreier , Linux RDMA Cc: lkml , Christoph Raisch , Stefan Roscher , Hoang-Nam Nguyen , Joachim Fenkes , of-ewg Subject: [PATCH] ib/ehca: fix in_wc handling in process_mad() Message-ID: <20100216095950.15c6eb9d@alex-laptop> X-Mailer: Claws Mail 3.6.1 (GTK+ 2.16.1; i486-pc-linux-gnu) 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, 16 Feb 2010 08:59:57 +0000 (UTC) --- linux-2.6.orig/drivers/infiniband/hw/ehca/ehca_sqp.c +++ linux-2.6/drivers/infiniband/hw/ehca/ehca_sqp.c @@ -222,7 +222,7 @@ int ehca_process_mad(struct ib_device *i { int ret; - if (!port_num || port_num > ibdev->phys_port_cnt) + if (!port_num || port_num > ibdev->phys_port_cnt || !in_wc) return IB_MAD_RESULT_FAILURE; /* accept only pma request */