Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp832845pxb; Tue, 12 Apr 2022 14:44:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwF2ZPpcGhBexQS74TNJg0/UXYmv+45eIe73Fgq8vL4SEnFQDH8FGWqRMdSjVfsfeC6PNse X-Received: by 2002:a17:903:2149:b0:158:9d1f:ce6c with SMTP id s9-20020a170903214900b001589d1fce6cmr1158202ple.30.1649799869774; Tue, 12 Apr 2022 14:44:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649799869; cv=none; d=google.com; s=arc-20160816; b=YTnLSUDOiIwV65dfGXkhI50snQOgFnVgf5lU7i6yTlu0/9isB7YRBcTcU2rqzbqS61 xy75f+9duTlU/pJdvwg46WZ+di82Xxibqsws36bK1y6ynbyeT2eHgE/CYCwH+9LT8yUh IOT89wXkJz62SF84wsWwqvbfa1vrldoKZpbeYEVCroRg0bZpXvrlSdD14/320sXqNEop yED5LxtqVhneSnZdM3Iu7w+X+GmKk0bmBu0+XiFV5PF1v6Uh985hF+jLd1Q8ZyZJ8oU5 XwLhnwZbwJzWjGVk6w+yVIHEnvQQcI6J1mqcG6uyL720zNoJy+4RBDu5a1d2GGg4pOGi U1+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=J9OXqLFIOmY45YdEhCkrYsT/5m2M2Fid8gfnSIyZnec=; b=1GYizyEYPHjBr5f58QqSoB83E++fDPT2NCgfBjsk6r9+cJneJZv2VGjiQ5fS50VRJI uaOTCWei4y9j13xq6rxiZRfFUHPpsS7yOVAEOnyWaLk+qz3YtJYP22AOJ1Tnlf+e5sy9 aITTcAZNVb07fj/7dsbIBqRcQ7kPfH+giz80J4Jy+YrnQWEhbPpC34+VsKmHXj8wmvGa wvHS2Wd2ODznF6vqoo6NOCcPMS/W/I1xq1NWWOrXkRqTmX2Yxvqm3yjEcZpVX7rsGEvA lgxqXHnSuhmnJUi5L6DMziYT4L+Ftrm5bc1U6fHcIT2TxicS+qBS+WRC/8pMXybtOxg1 2eng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b="aWE/FOQf"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id c17-20020a63d511000000b003821d42cbe2si3024927pgg.588.2022.04.12.14.44.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 14:44:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b="aWE/FOQf"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9E532136C33; Tue, 12 Apr 2022 13:44:59 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244075AbiDLSAx (ORCPT + 99 others); Tue, 12 Apr 2022 14:00:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241440AbiDLSAu (ORCPT ); Tue, 12 Apr 2022 14:00:50 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96BF85A159 for ; Tue, 12 Apr 2022 10:58:31 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id r13so38900551ejd.5 for ; Tue, 12 Apr 2022 10:58:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=J9OXqLFIOmY45YdEhCkrYsT/5m2M2Fid8gfnSIyZnec=; b=aWE/FOQfmSIdDS/9fp2gU6EzziIgyF8OK61PyvmQFGdlCkFpCNEFKSAgiUtGSYqHLB XXbM/3lVa68BPNFRFgxy8qSkFuPbbcL/nKFfhQWD1NPo+JBOvWgQf275+QMO0AI8b+n+ 3RVFd5+ZpOHLTX0AvoZIyohExmi9Dxog5TAw0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=J9OXqLFIOmY45YdEhCkrYsT/5m2M2Fid8gfnSIyZnec=; b=SVxvGeCqTsIYgvtzTSXX1NYtGABr/Aqk7GioWIU8V91CGR4hlFHAlFWiZ9U9sCfIhf WUfapgITxR3L4JywoHtFy5sfSCVEzwokzabxbbALylTiNOkHWmnGYP1uGSDexcL0SHw4 rNsIRHtVPaoksPgQRK9TcmfO5MzXQEID+/UMTvl71J9+/gZEwmcz3+2NMCYBRv0XFTJd HjljLKitHVzt8oumkx0X22KJ1x9ylvWdKZJA9QgyrMjqDiEQ3nvy5YYy/Yh5+MpaIscu vtqywD+/jLrbH7pnM8siketEpuc1lGttESoB9FHTgM+JVZm0qGr+ZDnYB+7A2GE40vF7 splw== X-Gm-Message-State: AOAM532zYuVMo3/E+DVE8OItJ776aCjh3F9tklBbHSWkOZrclw8fkDLl CZrv+FQ8alcC0JfWN/6QbpXaVe+3yFqdNh6gKDV75pbU33+3KViZtmoA+tobekpvULeNb72CRGW oScn5ez3sLGmFTJcEs6Kz6dJQqG7UxA== X-Received: by 2002:a17:906:eb42:b0:6e8:9197:f0e0 with SMTP id mc2-20020a170906eb4200b006e89197f0e0mr10583318ejb.550.1649786310059; Tue, 12 Apr 2022 10:58:30 -0700 (PDT) MIME-Version: 1.0 References: <20220409134926.331728-1-zheyuma97@gmail.com> In-Reply-To: <20220409134926.331728-1-zheyuma97@gmail.com> From: Sathya Prakash Veerichetty Date: Tue, 12 Apr 2022 11:58:12 -0600 Message-ID: Subject: Re: [PATCH] scsi: mpi3mr: Fix an error code when probing the driver To: Zheyu Ma Cc: Kashyap Desai , Sumit Saxena , Sreekanth Reddy , jejb@linux.ibm.com, "Martin K. Petersen" , mpi3mr-drvr-developers , linux-scsi , linux-kernel Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000fbc41f05dc78ce89" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 --000000000000fbc41f05dc78ce89 Content-Type: text/plain; charset="UTF-8" On Sat, Apr 9, 2022 at 7:49 AM Zheyu Ma wrote: > > During the process of driver probing, probe function should return < 0 > for failure, otherwise kernel will treat value >= 0 as success. > > Signed-off-by: Zheyu Ma > --- > drivers/scsi/mpi3mr/mpi3mr_os.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c > index f7cd70a15ea6..240bfdf9788b 100644 > --- a/drivers/scsi/mpi3mr/mpi3mr_os.c > +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c > @@ -4222,9 +4222,10 @@ mpi3mr_probe(struct pci_dev *pdev, const struct pci_device_id *id) > struct Scsi_Host *shost = NULL; > int retval = 0, i; > > - if (osintfc_mrioc_security_status(pdev)) { > + retval = osintfc_mrioc_security_status(pdev); > + if (retval) { > warn_non_secure_ctlr = 1; > - return 1; /* For Invalid and Tampered device */ > + return retval; /* For Invalid and Tampered device */ > } NAK. The driver has to return 1 when invalid/tampered controllers are detected just to say the controller is held by the mpi3mr driver without any actual operation. > > shost = scsi_host_alloc(&mpi3mr_driver_template, > -- > 2.25.1 > -- This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it. --000000000000fbc41f05dc78ce89 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQfwYJKoZIhvcNAQcCoIIQcDCCEGwCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg3WMIIFDTCCA/WgAwIBAgIQeEqpED+lv77edQixNJMdADANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA5MTYwMDAwMDBaFw0yODA5MTYwMDAwMDBaMFsxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXN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