Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3233358rwb; Fri, 9 Dec 2022 11:39:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf4C49V9HiQIbUsJ+x9vwAro4zQo6zerWs3a38dp3EZnn8RwnimQ6mV0rkWu4RURdhWUY7LZ X-Received: by 2002:a17:907:1627:b0:7c1:413d:5b0 with SMTP id hb39-20020a170907162700b007c1413d05b0mr4278395ejc.47.1670614776477; Fri, 09 Dec 2022 11:39:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670614776; cv=none; d=google.com; s=arc-20160816; b=sbHbxTFlh24bNEkEsAIFcIQ3D4YPS+yZITbUdZcLtXxY4fgoP5eNfUBJOo5DzHFeRG P/WpkhLBkrGd5LWiiPzEVTVpZ4L7HyiVviHzVXlltTL8JJYX/n6RH8zPFF1lX47ddpcS kSOH1l3iA+dXNqbGwKwvJdeWZ6JaQ97D8huSol2rDw6NPGjMxq7PxqivlHq9/V5w8l5V hPTMilvaKf3CpxpIJVDuidtTWXZ8cFR7QX350eqaI98FA1MUe0w56dV9XOokkZkd8meA 4QBzESTnGGJT3sVgeBJKUUo80twVOC/igp9U1rLcqF0to/uO0ChCeeDrt2iC+eHD2rYd rXQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=6UB0YOGyychK/2QqsDbt3+Ytc2kYn0bzS2eLbN1tkGw=; b=idkdloVBSvB/bB1HFEaqHmWpJecXoWk7E4CyFWVhViABYg6bi0w8BIpDdixS/bzwbO 97+aewbiolDnwugQrELwyeJcZHJiWGyhzCS9zswJOoLpQKvJNB4mm90vnGDZbyKxNTmZ dnqLq1I1GUyPo6QUpHR5v6ShPGIzW37gp+G1iQrb4IlTrp55Yj5peIQtEGaoBquUSUj7 f5/tbmACFC9oMQeRDHXHlHfv0h9bjj/ZAsP7JC9WYo++D7ElYAFf+qoLXbTKnWugvKBz H7bwUVqyoPtT1+M+OywPmhnuvxmTTxe10BF9mAtFn3jHFilA3H9LFi3jiQJY05QTGrZo GnFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20210112.gappssmtp.com header.s=20210112 header.b=k9OnBKq1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb6-20020a1709071c8600b0073d8ccd37c2si548513ejc.107.2022.12.09.11.39.19; Fri, 09 Dec 2022 11:39:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@dabbelt-com.20210112.gappssmtp.com header.s=20210112 header.b=k9OnBKq1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229637AbiLITOq (ORCPT + 74 others); Fri, 9 Dec 2022 14:14:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbiLITOl (ORCPT ); Fri, 9 Dec 2022 14:14:41 -0500 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 135F9186CF for ; Fri, 9 Dec 2022 11:14:40 -0800 (PST) Received: by mail-pj1-x102c.google.com with SMTP id t11-20020a17090a024b00b0021932afece4so9107336pje.5 for ; Fri, 09 Dec 2022 11:14:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date:message-id :reply-to; bh=6UB0YOGyychK/2QqsDbt3+Ytc2kYn0bzS2eLbN1tkGw=; b=k9OnBKq1FrKRkzxdBmOluPdfXgUk+ZttA1oRPSB0k7hL/PgYajzWyOCKC3omah3Hpz wsPxlKZhgtVvn0Mxg4lLheqOQHILrvkbyToqsRtttAQzMDQIpYQs8G4XqXE6hKf+l7Dj 0MBwTjeK5FPHjDp7HX3wszEuJ9fRCCoQ9Pi8EZ6NZEjpMCVh681h2jPwTPdzS5By61Hq bOxhGMf4F1eNvvfv9zzWbzv9xjqLhxmirSjqOiOBbxPr47QV+X0rA38OF1+wntPtLRd+ ISyXkgxMufrh60ATQzHo+7zflriYtrs+vUf/oGb9BuaCQtYQJ05nVdHF5FQUFi4pjlaX 1nDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=6UB0YOGyychK/2QqsDbt3+Ytc2kYn0bzS2eLbN1tkGw=; b=Nk5bRSdK9egDKkzmYFv0f8P/1GRO6xWwPEk4KQRZuE2rIg1YMINHMH/CMBS9PZWz3Z 1ezo8cixxnWkuQXpjQh51Ok/Qbdd2ghbsy+l2W1gqnWy2kGQlYUNAMKFtCU0RwT/xMzp cZoPjvAdmYLG/jhCtR5coV5nVeK3D59v6sog/hVBCkcsNt1XlwWuHWewGB13+zjqSnnF +zXs/cjfrz7Y4RmFgaGPksHnup9BzOhhZs3RpPGISyf/XlJGVmqP8+agOpJWOkZHPY9d cnxiReuoNVfd7+eLTpZaZ5T5XovfBc3Fs7gvt+yFvhTH0F7GD6KDy/nLcniuUQVUvEjP NZwA== X-Gm-Message-State: ANoB5pmeLWy84MuYY7lteEFA+qIII+IeQIq7ASrQ92R5WJuLmSx78a/K lDq6l6IrtGd5nBYju8tAAIzevA== X-Received: by 2002:a17:902:a70e:b0:185:4421:7300 with SMTP id w14-20020a170902a70e00b0018544217300mr6830199plq.69.1670613279485; Fri, 09 Dec 2022 11:14:39 -0800 (PST) Received: from localhost ([135.180.226.51]) by smtp.gmail.com with ESMTPSA id t17-20020a170902e85100b001871acf245csm1681062plg.37.2022.12.09.11.14.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 11:14:39 -0800 (PST) Date: Fri, 09 Dec 2022 11:14:39 -0800 (PST) X-Google-Original-Date: Fri, 09 Dec 2022 11:04:46 PST (-0800) Subject: Re: [PATCH v3 1/2] soc: microchip: mpfs: handle failed system service requests In-Reply-To: <20221123175652.327859-2-conor@kernel.org> CC: Conor Dooley , jassisinghbrar@gmail.com, daire.mcnamara@microchip.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org From: Palmer Dabbelt To: Conor Dooley Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 23 Nov 2022 09:56:51 PST (-0800), Conor Dooley wrote: > From: Conor Dooley > > If a service request fails, a non-zero, per-service error code will be > set. Since the individual service drivers may wish to handle things > differently, there's little point trying to do anything intelligent in > the system controller driver. Let the caller know that things went wrong > & leave the details of handling the error to it. > > Fixes: d0054a470c33 ("soc: add microchip polarfire soc system controller") > Signed-off-by: Conor Dooley > --- > drivers/soc/microchip/mpfs-sys-controller.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/soc/microchip/mpfs-sys-controller.c b/drivers/soc/microchip/mpfs-sys-controller.c > index 6e20207b5756..539fc24b397d 100644 > --- a/drivers/soc/microchip/mpfs-sys-controller.c > +++ b/drivers/soc/microchip/mpfs-sys-controller.c > @@ -52,6 +52,12 @@ int mpfs_blocking_transaction(struct mpfs_sys_controller *sys_controller, struct > > mutex_unlock(&transaction_lock); > > + if (ret) > + return ret; > + > + if (msg->response->resp_status) > + ret = -EIO; > + > return ret; > } > EXPORT_SYMBOL(mpfs_blocking_transaction); Reviewed-by: Palmer Dabbelt