From patchwork Fri Nov 16 04:51:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Mendoza-Jonas X-Patchwork-Id: 998760 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mendozajonas.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=mendozajonas.com header.i=@mendozajonas.com header.b="kBkspV3a"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="AL2BJ1YK"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42x5Th503Mz9sCQ for ; Fri, 16 Nov 2018 15:53:28 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727564AbeKPPD1 (ORCPT ); Fri, 16 Nov 2018 10:03:27 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:58775 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727124AbeKPPD1 (ORCPT ); Fri, 16 Nov 2018 10:03:27 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 42F8721F05; Thu, 15 Nov 2018 23:52:37 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 15 Nov 2018 23:52:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= mendozajonas.com; h=from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; s=fm1; bh=mveNE3CjL8D4y OGGytaEu2P54t4pKyfCVAdEUX80/mA=; b=kBkspV3aJK5tXSjWB2Da1WmFuIbzt RQRLMf18SVWVXSVnLv9/OQiKJAn6NZ/QJWDq4Ad6v7amS75yC8n8sFApeefsMBQM cTdjH51uQk6rRNbAjR1LAFoqqNyr5+xVvDtYc9CCpz+3aM91t6iREe1l5JAZziJH 5G67aVUS4fc3kRxBF4t4k1U1PpSh66dbr+ileC4vtFvd66SMYkc/RMHKOe6+sJgL NKZ6fGbOxRBzg5cCJe0PjSKDxmh4nu3nxVqsVq2t+Fza4s9ED/rgeVF0M7qMl+VP IucldwB++1HLr0DJ+wpbuYaE9g3Dwfxbqb/r8G/S9P4lSFbJE6Nkq2jpQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=mveNE3CjL8D4yOGGy taEu2P54t4pKyfCVAdEUX80/mA=; b=AL2BJ1YKEodzbRwPdy+iAxTeD+DYWt6ql Z8GpqfrVC5M5NTmvsJ5HDkhtpzzkD5BiKiAk2DSKx14e4Lg2qfwH8jUs9RgHmAPm nLUkX1PGK6jtKKoFEmAVh9DX+o3OxX54dzRH4YKuYTihyJNxOkwkE+ou60hbfKf7 b0GkVwpnvroTOC5dbMApvNoSR08m56Il1uwD/EfAZUM96PqFDpFdDgYCAtcyQThO HJa8JICuElpUvgn1ACbF8Rt7oqZjLwuuJHW7vuY5jv4F+RUkpRk9/S1LHVUD7JXT dOFAiRcyisCj8Sh45D0ZAygl53/cyb+bNmofJqKXMGVjJLG9nS0WQ== X-ME-Sender: X-ME-Proxy: Received: from v4.ibm.com (unknown [1.144.189.168]) by mail.messagingengine.com (Postfix) with ESMTPA id 3BF21E405B; Thu, 15 Nov 2018 23:52:31 -0500 (EST) From: Samuel Mendoza-Jonas To: netdev@vger.kernel.org Cc: Samuel Mendoza-Jonas , "David S . Miller" , Justin.Lee1@Dell.com, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org Subject: [PATCH net-next v4 0/6] net/ncsi: Allow enabling multiple packages & channels Date: Fri, 16 Nov 2018 15:51:53 +1100 Message-Id: <20181116045159.4980-1-sam@mendozajonas.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This series extends the NCSI driver to configure multiple packages and/or channels simultaneously. Since the RFC series this includes a few extra changes to fix areas in the driver that either made this harder or were roadblocks due to deviations from the NCSI specification. Patches 1 & 2 fix two issues where the driver made assumptions about the capabilities of the NCSI topology. Patches 3 & 4 change some internal semantics slightly to make multi-mode easier. Patch 5 introduces a cleaner way of reconfiguring the NCSI configuration and keeping track of channel states. Patch 6 implements the main multi-package/multi-channel configuration, configured via the Netlink interface. Readers who have an interesting NCSI setup - especially multi-package with HWA - please test! I think I've covered all permutations but I don't have infinite hardware to test on. Changes in v2: - Updated use of the channel lock in ncsi_reset_dev(), making the channel invisible and leaving the monitor check to ncsi_stop_channel_monitor(). - Fixed ncsi_channel_is_tx() to consider the state of channels in other packages. Changes in v3: - Fixed bisectability bug in patch 1 - Consider channels on all packages in a few places when multi-package is enabled. - Avoid doubling up reset operations, and check the current driver state before reset to let any running operations complete. - Reorganise the LSC handler slightly to avoid enabling Tx twice. Changes in v4: - Fix failover in the single-channel case - Better handle ncsi_reset_dev() entry during a current config/suspend operation. Samuel Mendoza-Jonas (6): net/ncsi: Don't enable all channels when HWA available net/ncsi: Probe single packages to avoid conflict net/ncsi: Don't deselect package in suspend if active net/ncsi: Don't mark configured channels inactive net/ncsi: Reset channel state in ncsi_start_dev() net/ncsi: Configure multi-package, multi-channel modes with failover include/uapi/linux/ncsi.h | 15 ++ net/ncsi/internal.h | 19 +- net/ncsi/ncsi-aen.c | 75 ++++-- net/ncsi/ncsi-manage.c | 522 +++++++++++++++++++++++++++----------- net/ncsi/ncsi-netlink.c | 233 ++++++++++++++--- net/ncsi/ncsi-rsp.c | 2 +- 6 files changed, 660 insertions(+), 206 deletions(-) Reviewed-by: Justin Lee Tested-by: Justin Lee