From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D2C7C07E95 for ; Wed, 14 Jul 2021 00:19:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 670706128C for ; Wed, 14 Jul 2021 00:19:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 670706128C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=acm.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0LqIWiKGxL4KxuzZjpC1/XIJgnDqCYu2wMnyqQzXUWI=; b=APaMi4Mb95xXv1 KAl8hvbg0E8mOX1fIjt8cAFsFmCP7WtkqA5UnaxKKfAPnULCS6rLpX8Oh9GPcaazJSzJCnxdkVNqx zn1pFBjTRpFD/3U0+3OIi7Dd3i4Sk4JAA36z/qXDhfTz3/qoNhpYgSsbLJG9SLP2ITqq64IwICVIN cEY1r2q8DHvxm38Oad5aTXisNJkTWU8mpmKjR7uMBsLnRsorrdpjGiBphqFoexBuV/atZgUrt5yWG ZhwXgpvj5l5N/twG9Z7+TeAbDMBwah6R9wPu/q19Unpaw0ueIbdGOXjtmPPVdRnsMUhI1g2/0XCNc LGNcxFSg+OsKJ6zHt+Ww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3Sau-00BjyF-Qm; Wed, 14 Jul 2021 00:17:45 +0000 Received: from mail-ot1-x334.google.com ([2607:f8b0:4864:20::334]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3Saq-00BjxB-ID for linux-arm-kernel@lists.infradead.org; Wed, 14 Jul 2021 00:17:42 +0000 Received: by mail-ot1-x334.google.com with SMTP id 75-20020a9d08510000b02904acfe6bcccaso680809oty.12 for ; Tue, 13 Jul 2021 17:17:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:reply-to:references :mime-version:content-disposition:in-reply-to; bh=ANBre7e/SeOgwL/kzxB4MEQhrNdFwAa+nXG5MhaUU/0=; b=twt0VPxbYbALN1uhWFP6Q0BG5HRHqjR3t2ca4CF8GG5CU/m30bRD3WkEtSJ6tHEG+4 vSUWF4kkATG9F+c81vIvEas4+9lQu/S+LbMIfpCP8KLwlTrErq3QPIK5szgJRP1d0hs0 FLVE13Y4IPT9W4WJOSUToCNSMqSONZyqJOG2bTnAvcdD5VsM+6gbsxHqQs9kzXws7O3z L+MgSqzTp4W3V70D+WkwXZjsC9/QbLQzBVZcuSAzmi1sMbS/IMqYByrFyGlwsMGgA+l4 J/C7HFkvfe0f59+oc5TxXzip62eZYk6netAVqjPfRWWkAhiIExvfejPDKMgzceiOelHB pUHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :reply-to:references:mime-version:content-disposition:in-reply-to; bh=ANBre7e/SeOgwL/kzxB4MEQhrNdFwAa+nXG5MhaUU/0=; b=FtklGoj5xygMPSr8WeKdNvGoPsGJiVyGSrqzU0dJdgQ7O+mzL55zIwNwvUnqlQDsuI u4c2uxt4jvmRrV8JBpU9PpHy1Us0CO/VewxGwu9udGoMxu7myk2QsP2CowxViPdoONe9 repqOjBfCuK0usObVqV742EvKcTTIo4y/ZgG9TwDvqiM0iT+4eKxsXbfRoMOYW7NqnoN e48dHStwbdLpuFQXYeAAgNkSzElAVXq0CrmaNmBUuWUurJ6W4alfAxK4qVgPH1cUwRl8 20/GgX/sbehs9Lfru0U6SUJM0TIPFTiH1VQLJN5PZP1KQENxMdVyGzkp9NmcZqKqbgHk IN+A== X-Gm-Message-State: AOAM530T0bzFA1tnaR5wFAwPNbwQVytk8lfX3nysSoLQMSmXtHsWx7CM FGFcIrDsWxKO+Crruiq42Q== X-Google-Smtp-Source: ABdhPJwl33HIb5+qvgtynzyVDjT324T1pKdLQUnPLKYfWQHVqv5GYScqiZwm0JmSDRuTot9Y/rHQKA== X-Received: by 2002:a9d:2c61:: with SMTP id f88mr5834409otb.62.1626221858570; Tue, 13 Jul 2021 17:17:38 -0700 (PDT) Received: from serve.minyard.net ([47.184.156.158]) by smtp.gmail.com with ESMTPSA id s29sm170136oiw.54.2021.07.13.17.17.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jul 2021 17:17:38 -0700 (PDT) Received: from minyard.net (unknown [IPv6:2001:470:b8f6:1b:6938:a190:9608:2d5d]) by serve.minyard.net (Postfix) with ESMTPSA id 3ADD518005A; Wed, 14 Jul 2021 00:17:37 +0000 (UTC) Date: Tue, 13 Jul 2021 19:17:36 -0500 From: Corey Minyard To: Quan Nguyen Cc: Rob Herring , Joel Stanley , Andrew Jeffery , Brendan Higgins , Benjamin Herrenschmidt , Wolfram Sang , openipmi-developer@lists.sourceforge.net, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, Open Source Submission , Phong Vo , "Thang Q . Nguyen" Subject: Re: [PATCH v4 0/3] Add SSIF BMC driver Message-ID: <20210714001736.GD3406@minyard.net> References: <20210713055425.30636-1-quan@os.amperecomputing.com> <20210713154405.GB3406@minyard.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_171740_657549_BE377AA3 X-CRM114-Status: GOOD ( 31.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: minyard@acm.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jul 14, 2021 at 06:29:27AM +0700, Quan Nguyen wrote: > On 13/07/2021 22:44, Corey Minyard wrote: > > On Tue, Jul 13, 2021 at 12:54:22PM +0700, Quan Nguyen wrote: > > > This series add support the SSIF BMC driver which is to perform in-band > > > IPMI communication with their host in management (BMC) side. > > > > Per the kernel build robot, looks like patch 3 introduces slave_enable() > > but patch 1 uses it. > > > > -corey > > > Thanks Corey, > > The order is not correct and kernel build robot found this hurts > bisectibility. > The patch 3 should be the first patch. Ok, can you re-submit in the right order? Thanks, -corey > > - Quan > > > > > > > SSIF BMC driver in this series is tested with Aspeed AST2500. > > > > > > v4: > > > + Fix recursive spinlock [Graeme] > > > + Send response with Completion code 0xFF when aborting [Quan] > > > + Fix warning with dt_binding_check [Rob] > > > + Change aspeed-ssif-bmc.yaml to ssif-bmc.yaml [Quan] > > > + Added bounding check on SMBus writes and the whole request [Dan] > > > + Moved buffer to end of struct ssif_bmc_ctx to avoid context > > > corruption if somehow buffer is written past the end [Dan] > > > + Return -EINVAL if userspace buffer too small, dont > > > silence truncate [Corey, Joel] > > > + Not necessary to check NONBLOCK in lock [Corey] > > > + Enforce one user at a time [Joel] > > > + Reject write with invalid response length from userspace [Corey] > > > + Add state machines for better ssif bmc state handling [Quan] > > > + Drop ssif_bmc_aspeed.c and make ssif_bmc.c is generic > > > SSIF BMC driver [Quan] > > > + Change compatible string "aspeed,ast2500-ssif-bmc" to > > > "ampere,ssif-bmc" [Quan] > > > + Toggle Slave enable in i2c-aspeed to turn on/off slave mode [Ryan] > > > + Added slave_enable() to struct i2c_algorithm to control > > > slave mode and to address the recursive spinlock [Graeme, Ryan] > > > + Abort current request with invalid SMBus write or > > > invalid command [Quan] > > > + Abort all request if there is pending response [Quan] > > > + Changed validate_pec() to validate_request() [Quan] > > > + Add unsupported_smbus_cmd() to handle unknown SMBus command [Quan] > > > + Print internal state string for ease investigating issue [Quan] > > > + Move to READY state on SLAVE_STOP event [Quan] > > > + Change initilize_transfer() to process_smbus_cmd() [Quan] > > > + Introduce functions for each slave event [Quan] > > > > > > v3: > > > + Switched binding doc to use DT schema format [Rob] > > > + Splited into generic ssif_bmc and aspeed-specific [Corey, Joel] > > > + Removed redundant license info [Joel] > > > + Switched to use traditional if-else [Joel] > > > + Removed unused ssif_bmc_ioctl() [Joel] > > > + Made handle_request()/complete_response() to return void [Joel] > > > + Refactored send_ssif_bmc_response()/receive_ssif_bmc_request() > > > [Corey] > > > + Remove mutex [Corey] > > > + Use spin_lock/unlock_irqsave/restore in callback [Corey] > > > + Removed the unnecessary memset [Corey] > > > + Switch to use dev_err() [Corey] > > > + Combine mask/unmask two interrupts together [Corey] > > > + Fixed unhandled Tx done with NAK [Quan] > > > + Late ack'ed Tx done w/wo Ack irq [Quan] > > > + Use aspeed-specific exported aspeed_set_slave_busy() when slave busy > > > to fix the deadlock [Graeme, Philipp, Quan] > > > + Clean buffer for last multipart read [Quan] > > > + Handle unknown incoming command [Quan] > > > > > > v2: > > > + Fixed compiling error with COMPILE_TEST for arc > > > > > > Quan Nguyen (3): > > > ipmi: ssif_bmc: Add SSIF BMC driver > > > bindings: ipmi: Add binding for SSIF BMC driver > > > i2c: aspeed: Add slave_enable() to toggle slave mode > > > > > > .../devicetree/bindings/ipmi/ssif-bmc.yaml | 38 + > > > drivers/char/ipmi/Kconfig | 11 + > > > drivers/char/ipmi/Makefile | 1 + > > > drivers/char/ipmi/ssif_bmc.c | 781 ++++++++++++++++++ > > > drivers/char/ipmi/ssif_bmc.h | 106 +++ > > > drivers/i2c/busses/i2c-aspeed.c | 20 + > > > include/linux/i2c.h | 2 + > > > 7 files changed, 959 insertions(+) > > > create mode 100644 Documentation/devicetree/bindings/ipmi/ssif-bmc.yaml > > > create mode 100644 drivers/char/ipmi/ssif_bmc.c > > > create mode 100644 drivers/char/ipmi/ssif_bmc.h > > > > > > -- > > > 2.28.0 > > > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel