diff mbox series

[1/2] mpi3mr: Enable shared host tagset

Message ID 20220628074848.5036-2-sreekanth.reddy@broadcom.com (mailing list archive)
State Accepted
Headers show
Series mpi3mr: Use shared host tagset | expand

Commit Message

Sreekanth Reddy June 28, 2022, 7:48 a.m. UTC
Enable shared host tagset to make sure that total outstanding
IOs count won't cross controller's can_queue.

Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
---
 drivers/scsi/mpi3mr/mpi3mr_os.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

John Garry June 28, 2022, 3:02 p.m. UTC | #1
On 28/06/2022 08:48, Sreekanth Reddy wrote:
> Enable shared host tagset to make sure that total outstanding
> IOs count won't cross controller's can_queue.
> 
> Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
> ---
>   drivers/scsi/mpi3mr/mpi3mr_os.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
> index d8c195b..da85eda 100644
> --- a/drivers/scsi/mpi3mr/mpi3mr_os.c
> +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
> @@ -4321,6 +4321,8 @@ mpi3mr_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>   	shost->max_channel = 0;
>   	shost->max_id = 0xFFFFFFFF;
>   
> +	shost->host_tagset = 1;
> +

nit: any reason not to set the flag in the scsi_host_template instead?

>   	if (prot_mask >= 0)
>   		scsi_host_set_prot(shost, prot_mask);
>   	else {
Sreekanth Reddy June 28, 2022, 5:41 p.m. UTC | #2
On Tue, Jun 28, 2022 at 8:32 PM John Garry <john.garry@huawei.com> wrote:
>
> On 28/06/2022 08:48, Sreekanth Reddy wrote:
> > Enable shared host tagset to make sure that total outstanding
> > IOs count won't cross controller's can_queue.
> >
> > Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
> > ---
> >   drivers/scsi/mpi3mr/mpi3mr_os.c | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
> > index d8c195b..da85eda 100644
> > --- a/drivers/scsi/mpi3mr/mpi3mr_os.c
> > +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
> > @@ -4321,6 +4321,8 @@ mpi3mr_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> >       shost->max_channel = 0;
> >       shost->max_id = 0xFFFFFFFF;
> >
> > +     shost->host_tagset = 1;
> > +
>
> nit: any reason not to set the flag in the scsi_host_template instead?

There is no specific reason. Please let me know if I need to repost
the patch with the host_tagset flag set in the scsi_host_template.

>
> >       if (prot_mask >= 0)
> >               scsi_host_set_prot(shost, prot_mask);
> >       else {
>
John Garry June 28, 2022, 5:49 p.m. UTC | #3
On 28/06/2022 18:41, Sreekanth Reddy wrote:
> On Tue, Jun 28, 2022 at 8:32 PM John Garry <john.garry@huawei.com> wrote:
>>
>> On 28/06/2022 08:48, Sreekanth Reddy wrote:
>>> Enable shared host tagset to make sure that total outstanding
>>> IOs count won't cross controller's can_queue.
>>>
>>> Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
>>> ---
>>>    drivers/scsi/mpi3mr/mpi3mr_os.c | 2 ++
>>>    1 file changed, 2 insertions(+)
>>>
>>> diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
>>> index d8c195b..da85eda 100644
>>> --- a/drivers/scsi/mpi3mr/mpi3mr_os.c
>>> +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
>>> @@ -4321,6 +4321,8 @@ mpi3mr_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>>>        shost->max_channel = 0;
>>>        shost->max_id = 0xFFFFFFFF;
>>>
>>> +     shost->host_tagset = 1;
>>> +
>>
>> nit: any reason not to set the flag in the scsi_host_template instead?
> 
> There is no specific reason. Please let me know if I need to repost
> the patch with the host_tagset flag set in the scsi_host_template.
> 

You don't need to repost just for me. I was just hinting that this can 
be set in the scsi_host_template, which is a bit neater.

Thanks,
John

>>
>>>        if (prot_mask >= 0)
>>>                scsi_host_set_prot(shost, prot_mask);
>>>        else {
>>
diff mbox series

Patch

diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
index d8c195b..da85eda 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_os.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
@@ -4321,6 +4321,8 @@  mpi3mr_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	shost->max_channel = 0;
 	shost->max_id = 0xFFFFFFFF;
 
+	shost->host_tagset = 1;
+
 	if (prot_mask >= 0)
 		scsi_host_set_prot(shost, prot_mask);
 	else {