All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zheyu Ma <zheyuma97@gmail.com>
To: Sathya Prakash Veerichetty <sathya.prakash@broadcom.com>
Cc: Kashyap Desai <kashyap.desai@broadcom.com>,
	Sumit Saxena <sumit.saxena@broadcom.com>,
	Sreekanth Reddy <sreekanth.reddy@broadcom.com>,
	jejb@linux.ibm.com,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	mpi3mr-drvr-developers <mpi3mr-linuxdrv.pdl@broadcom.com>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] scsi: mpi3mr: Fix an error code when probing the driver
Date: Wed, 13 Apr 2022 17:27:04 +0800	[thread overview]
Message-ID: <CAMhUBj=EG8UrFoLp34F2aSTAoM8jY+Agg_PQypn6zjZ_dkUyoA@mail.gmail.com> (raw)
In-Reply-To: <CAFdVvOzx7t99Btf4Jv5+5=6es0i8AKx_1Bwj5gQd-Oqnqi+tPA@mail.gmail.com>

On Wed, Apr 13, 2022 at 1:58 AM Sathya Prakash Veerichetty
<sathya.prakash@broadcom.com> wrote:
>
> On Sat, Apr 9, 2022 at 7:49 AM Zheyu Ma <zheyuma97@gmail.com> 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 <zheyuma97@gmail.com>
> > ---
> >  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.

Thanks for your explanation, I will drop this patch.

Zheyu Ma

      reply	other threads:[~2022-04-13  9:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-09 13:49 [PATCH] scsi: mpi3mr: Fix an error code when probing the driver Zheyu Ma
2022-04-12 17:58 ` Sathya Prakash Veerichetty
2022-04-13  9:27   ` Zheyu Ma [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMhUBj=EG8UrFoLp34F2aSTAoM8jY+Agg_PQypn6zjZ_dkUyoA@mail.gmail.com' \
    --to=zheyuma97@gmail.com \
    --cc=jejb@linux.ibm.com \
    --cc=kashyap.desai@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mpi3mr-linuxdrv.pdl@broadcom.com \
    --cc=sathya.prakash@broadcom.com \
    --cc=sreekanth.reddy@broadcom.com \
    --cc=sumit.saxena@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.