All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: chenxiang <chenxiang66@hisilicon.com>, <martin.petersen@oracle.com>
Cc: <linuxarm@huawei.com>, <linux-scsi@vger.kernel.org>,
	<kashyap.desai@broadcom.com>, <sumit.saxena@broadcom.com>,
	<shivasharan.srikanteshwara@broadcom.com>
Subject: Re: [RESEND PATCH] scsi: megaraid: disable device when probe failed after enabled device
Date: Tue, 10 Sep 2019 09:29:46 +0100	[thread overview]
Message-ID: <1a96bb50-3d6a-6280-c6a8-1dbf61c1b4b0@huawei.com> (raw)
In-Reply-To: <1567818450-173315-1-git-send-email-chenxiang66@hisilicon.com>

On 07/09/2019 02:07, chenxiang wrote:
> From: Xiang Chen <chenxiang66@hisilicon.com>
>
> For pci device, need to disable device when probe failed after enabled
> device.
>
> Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>

Reviewed-by: John Garry <john.garry@huawei.com>

> ---
>  drivers/scsi/megaraid.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
> index 45a6604..ff6d4aa 100644
> --- a/drivers/scsi/megaraid.c
> +++ b/drivers/scsi/megaraid.c
> @@ -4183,11 +4183,11 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
>  		 */
>  		if (pdev->subsystem_vendor == PCI_VENDOR_ID_COMPAQ &&
>  		    pdev->subsystem_device == 0xC000)
> -		   	return -ENODEV;
> +			goto out_disable_device;
>  		/* Now check the magic signature byte */
>  		pci_read_config_word(pdev, PCI_CONF_AMISIG, &magic);
>  		if (magic != HBA_SIGNATURE_471 && magic != HBA_SIGNATURE)
> -			return -ENODEV;
> +			goto out_disable_device;

It would be nicer if the driver didn't init the return code to -ENODEV 
and we set it explicitly here, but that's a different change.

>  		/* Ok it is probably a megaraid */
>  	}
>
>



  reply	other threads:[~2019-09-10  8:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-07  1:07 [RESEND PATCH] scsi: megaraid: disable device when probe failed after enabled device chenxiang
2019-09-10  8:29 ` John Garry [this message]
2019-09-24  2:55 ` Martin K. Petersen

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=1a96bb50-3d6a-6280-c6a8-1dbf61c1b4b0@huawei.com \
    --to=john.garry@huawei.com \
    --cc=chenxiang66@hisilicon.com \
    --cc=kashyap.desai@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=martin.petersen@oracle.com \
    --cc=shivasharan.srikanteshwara@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.