From patchwork Thu Sep 27 17:47:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland Dreier X-Patchwork-Id: 1515321 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 020D13FE1C for ; Thu, 27 Sep 2012 17:47:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751676Ab2I0RrZ (ORCPT ); Thu, 27 Sep 2012 13:47:25 -0400 Received: from na3sys010aog111.obsmtp.com ([74.125.245.90]:53406 "HELO na3sys010aog111.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752578Ab2I0RrY (ORCPT ); Thu, 27 Sep 2012 13:47:24 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]) (using TLSv1) by na3sys010aob111.postini.com ([74.125.244.12]) with SMTP ID DSNKUGSRLLhIJpE4s+6i49ydCRGkz6RCFqWq@postini.com; Thu, 27 Sep 2012 10:47:24 PDT Received: by padhz1 with SMTP id hz1so1544987pad.19 for ; Thu, 27 Sep 2012 10:47:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; bh=uXfGJxRD45sAJWvy7/MB++xdSRqhavQ9sGYVJGuTIMw=; b=LgBVdazRO36GTe9Nj3hH72scixRcdThU9R9qSgmpGX0+pco3wWaO4NVYSoiFLSjE17 DOZM9VwXPiA2VqOqDXu1kzrqkxpVtA3Ma4+JcSBEadG2njo+l9Q4ZM+NBSH26U42j4Lt bnsb3loxDvU7KsqrnpP1GXhjzWi8zHh9KkSHo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=uXfGJxRD45sAJWvy7/MB++xdSRqhavQ9sGYVJGuTIMw=; b=YVATZt4/675lAOIJyl6vkYL0pZakQYdoQ2yHq7AMlZTgQJ4JeMPq3BWGhBTs8bQHhf FPYv5QF7H6WpI0vvFHwJWgm2XSrZCGfI2B2X8FE2WfczwSVG/BxOScGxz+EAfNje0ZMe WJScmF7ZwWwImOdJRpntwfPg3NYUr/7NNpXyV4GuaJB+CQabORkL5Wfp5xQZSIhu1E7f 1dBJgut3CtbaGYdlzeVU1EE2t1sQ6AK0zi4NWPWAlu4E8hvUE2nXLP20wDEKVbkoJtfe fRVvrxLMt33fArZC4boK42b9KCTJYkjaweU53aJhV1uJ05WrRqn5jp2SMpHsKp5JqMIz f++g== Received: by 10.68.189.69 with SMTP id gg5mr13532093pbc.36.1348768043427; Thu, 27 Sep 2012 10:47:23 -0700 (PDT) Received: from roland-t410s.purestorage.com ([216.200.155.2]) by mx.google.com with ESMTPS id e9sm4034289pay.34.2012.09.27.10.47.22 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 27 Sep 2012 10:47:22 -0700 (PDT) From: Roland Dreier To: linux-rdma@vger.kernel.org Subject: [PATCH 3/3] mlx4_core: Disable SENSE_PORT for multifunction devices Date: Thu, 27 Sep 2012 10:47:17 -0700 Message-Id: <1348768037-3660-3-git-send-email-roland@kernel.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1348768037-3660-1-git-send-email-roland@kernel.org> References: <1348768037-3660-1-git-send-email-roland@kernel.org> X-Gm-Message-State: ALoCoQlL79KU5QnIKGiAyPk4xttl1KjRGX13CkySnUIFB9zi2izatkpOKd5WIMQHOFFakedf5AGd Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Roland Dreier In the current driver, the SENSE_PORT firmware command is issued as a "wrapped" command, but the command handling code doesn't have a wrapper, so it will never do anything other than log an error message. The latest ConnectX-3 2.11.500 firmware reports the SENSE_PORT capability even in multi-function (SR-IOV) mode, so the driver will try to issue the command. At least until the driver has a proper wrapper for SENSE_PORT, make sure we disable the command for multi-function devices. Signed-off-by: Roland Dreier Acked-by: Or Gerlitz for patches 1-3 Acked-by: Jack Morgenstein for patches 1-3 --- drivers/net/ethernet/mellanox/mlx4/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index 4d40b21..1fcf0e1 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c @@ -300,6 +300,9 @@ static int mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) /* Sense port always allowed on supported devices for ConnectX-1 and -2 */ if (mlx4_priv(dev)->pci_dev_data & MLX4_PCI_DEV_FORCE_SENSE_PORT) dev->caps.flags |= MLX4_DEV_CAP_FLAG_SENSE_SUPPORT; + /* Don't do sense port on multifunction devices (for now at least) */ + if (mlx4_is_mfunc(dev)) + dev->caps.flags &= ~MLX4_DEV_CAP_FLAG_SENSE_SUPPORT; dev->caps.log_num_macs = log_num_mac; dev->caps.log_num_vlans = MLX4_LOG_NUM_VLANS;