linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: <Ajish.Koshy@microchip.com>, <jinpu.wang@cloud.ionos.com>,
	<jejb@linux.ibm.com>, <martin.petersen@oracle.com>
Cc: <Viswas.G@microchip.com>, <linux-scsi@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<Vasanthalakshmi.Tharmarajan@microchip.com>
Subject: Re: [PATCH] scsi: pm8001: Fix phys_to_virt() usage on dma_addr_t
Date: Fri, 10 Dec 2021 10:44:15 +0000	[thread overview]
Message-ID: <eb82b0ab-912a-4879-f1b2-d5cbef5bfc41@huawei.com> (raw)
In-Reply-To: <PH0PR11MB51122D76F40E164C31AFEE54EC719@PH0PR11MB5112.namprd11.prod.outlook.com>

On 10/12/2021 10:23, Ajish.Koshy@microchip.com wrote:
> Hi John,

Please config your editor to wrap at ~72 characters and don't top-post.

> 
> In my humble opinion what we observed very earlier was with respect smp_request()/response() crash and this patch resolved it. Given that the issue was not only specific to ARM, issue was observed on x86 too with IOMMU enabled. Device discovery went fine post application of this patch on x86.
> 
> What we are observing right now on error handling/timeouts for commands on drives will be altogether different issue that needs separate debugging on ARM platform with separate patch since this is a very initial execution of pm80xx driver on ARM platform.
> 
> This patch is acceptable. Let me know your further views.
> 

As I mentioned earlier about this patch, a v2 is needed as we need 
kmap_atomic() in both cases. But I would rather resolve all issues 
before getting that merged - it has been broken this way for a long time.

So I mentioned a new issue in my response to Damien - maxcpus=1 on the 
command line crashes on boot. I can imagine that x86 also has that issue.

As for the timeouts, why would the FW not respond in the way I 
described? I would always expect a completion, even for erroneous 
commands. Maybe it is an interrupt issue in the driver. Is there some 
diagnostics I can check - there seems to be a lot of "stuff" in the 
sysfs scsi_host folder.

Thanks,
John

> Thanks,
> Ajish
> 
> On 26/11/2021 15:35, John Garry wrote:
>>        /*
>> @@ -4280,8 +4283,9 @@ static int pm80xx_chip_smp_req(struct pm8001_hba_info *pm8001_ha,
>>                pm8001_ha->smp_exp_mode = SMP_INDIRECT;
>>
>>
>> -     tmp_addr = cpu_to_le64((u64)sg_dma_address(&task->smp_task.smp_req));
>> -     preq_dma_addr = (char *)phys_to_virt(tmp_addr);
>> +     smp_req = &task->smp_task.smp_req;
>> +     to = kmap(sg_page(smp_req));
> This should be a kmap_atomic() as well, as I see the following for when
> CONFIG_DEBUG_ATOMIC_SLEEP is enabled:


      reply	other threads:[~2021-12-10 10:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-26 15:35 [PATCH] scsi: pm8001: Fix phys_to_virt() usage on dma_addr_t John Garry
2021-11-29 10:46 ` Ajish.Koshy
2021-12-06  9:42   ` John Garry
2021-12-06 13:24     ` Niklas Cassel
2021-12-07 10:36       ` Ajish.Koshy
2021-12-07 13:54         ` John Garry
2021-12-09 12:04           ` Ajish.Koshy
2021-12-09 12:19             ` John Garry
2021-12-09 22:38               ` Damien Le Moal
2021-12-09 23:09                 ` John Garry
2021-12-09 23:55                   ` Damien Le Moal
2021-12-10 10:35                     ` John Garry
2021-12-11  0:19                       ` Damien Le Moal
2021-12-09 22:26             ` Damien Le Moal
2021-12-09 13:46 ` John Garry
2021-12-10 10:23   ` Ajish.Koshy
2021-12-10 10:44     ` John Garry [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=eb82b0ab-912a-4879-f1b2-d5cbef5bfc41@huawei.com \
    --to=john.garry@huawei.com \
    --cc=Ajish.Koshy@microchip.com \
    --cc=Vasanthalakshmi.Tharmarajan@microchip.com \
    --cc=Viswas.G@microchip.com \
    --cc=jejb@linux.ibm.com \
    --cc=jinpu.wang@cloud.ionos.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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;
as well as URLs for NNTP newsgroup(s).