public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: John Garry <john.g.garry@oracle.com>, linux-scsi@vger.kernel.org
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Bart Van Assche <bvanassche@acm.org>,
	Damien Le Moal <dlemoal@kernel.org>,
	Jason Yan <yanaijie@huawei.com>
Subject: Re: [PATCH v2] scsi: mvsas: Try to enable MSI
Date: Mon, 6 Nov 2023 13:59:35 +0100	[thread overview]
Message-ID: <9565b53d-68b4-464d-bbd6-290ec1fe66eb@denx.de> (raw)
In-Reply-To: <6f36e52c-e77c-0695-ff33-c4f737430c13@oracle.com>

On 11/6/23 12:08, John Garry wrote:

Hi,

>>   drivers/scsi/mvsas/mv_init.c | 17 +++++++++++++++++
>>   1 file changed, 17 insertions(+)
>>
>> diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
>> index 43ebb331e2167..d3b1cee6b3252 100644
>> --- a/drivers/scsi/mvsas/mv_init.c
>> +++ b/drivers/scsi/mvsas/mv_init.c
>> @@ -571,6 +571,17 @@ static int mvs_pci_init(struct pci_dev *pdev, 
>> const struct pci_device_id *ent)
>>       rc = sas_register_ha(SHOST_TO_SAS_HA(shost));
>>       if (rc)
>>           goto err_out_shost;
>> +
>> +    /* Try to enable MSI, this is needed at least on OCZ RevoDrive 3 
>> X2 */
>> +    if (pdev->vendor == PCI_VENDOR_ID_OCZ) {
> 
> PCI_VENDOR_ID_OCZ means 9485.

It does not, see:

$ git grep PCI_VENDOR_ID_OCZ include/
include/linux/pci_ids.h:#define PCI_VENDOR_ID_OCZ               0x1b85

> So how about enable MSI for all PCI device 
> IDs which use that, which is all OCZ and MARVELL_EXT? I could not get my 
> hands on a datasheet for that SoC (could you?), but since all previous 
> generations supported MSI, I think that it's a safe bet.

Nope. I only have the one device here.

> Then, if we do that, instead of repeating this same vendor check, how 
> about add a new member to mvs_chip_info to flag whether we need to try 
> MSI? For example, it could be mvs_chip_info.use_msi .
> 
>> +        rc = pci_enable_msi(mvi->pdev);
>> +        if (rc) {
>> +            dev_err(&mvi->pdev->dev,
>> +                "mvsas: Failed to enable MSI for OCZ device, attached 
>> drives may not be detected. rc=%d\n",
>> +                rc);
> 
> We should fail to load the driver in this case.

Wouldn't it be better to give the legacy IRQ a chance in any case, maybe 
those do work on some of the other OCZ devices (or other versions of 
firmware) ?

  reply	other threads:[~2023-11-06 13:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-05 18:36 [PATCH v2] scsi: mvsas: Try to enable MSI Marek Vasut
2023-11-06 11:08 ` John Garry
2023-11-06 12:59   ` Marek Vasut [this message]
2023-11-06 14:12     ` John Garry
2023-11-06 22:13       ` Damien Le Moal

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=9565b53d-68b4-464d-bbd6-290ec1fe66eb@denx.de \
    --to=marex@denx.de \
    --cc=bvanassche@acm.org \
    --cc=dlemoal@kernel.org \
    --cc=jejb@linux.ibm.com \
    --cc=john.g.garry@oracle.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=yanaijie@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox