From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: Zheyu Ma <zheyuma97@gmail.com>
Cc: Sergey Shtylyov <s.shtylyov@omp.ru>,
linux-ide@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [BUG] ata: pata_marvell: Warning when probing the module
Date: Wed, 13 Apr 2022 12:42:20 +0900 [thread overview]
Message-ID: <3045fde1-2d5b-e731-ef18-6cf3f0987259@opensource.wdc.com> (raw)
In-Reply-To: <CAMhUBj=JsiHnnQzrqPKzA=Z2+589Ju_HE0cFKyon58Fk0waeAQ@mail.gmail.com>
On 4/12/22 15:34, Zheyu Ma wrote:
> On Mon, Apr 11, 2022 at 7:53 AM Damien Le Moal
> <damien.lemoal@opensource.wdc.com> wrote:
>>
>> On 4/10/22 15:30, Zheyu Ma wrote:
>>> Hello,
>>>
>>> I found a bug in the pata_marvell module.
>>> When probing the driver, it seems to trigger the error path and
>>> executes the function marvell_cable_detect(), but the
>>> 'ap->ioaddr.bmdma_addr' is not initialized, which causes a warning.
>>
>> I do not have this hardware so I cannot debug this. Please debug it and
>> send a patch. bmdma_addr is normally set in ata_pci_bmdma_init(), but some
>> drivers set it manually in their probe functions. No idea about the
>> marvell driver, I have not checked it.
>
> To be honest I don't have a good solution to this problem, because
> other drivers don't have similar behavior. The marvell driver doesn't
> even initialize 'bmdma_addr' before calling 'cable_detect'.
Then this is the bug that needs to be fixed, no ?
> So a simple idea I have is to check if 'bmdma_addr' is 0 before
> reading it and if so return the error code ATA_CBL_NONE.
And if indeed, even after it is initialized it is still 0, then yes, this
change seems sensible.
>
> Zheyu Ma
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2022-04-13 3:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-10 6:30 Zheyu Ma
2022-04-10 23:53 ` Damien Le Moal
[not found] ` <556511649635338@mail.yandex.com>
2022-04-12 6:28 ` Zheyu Ma
2022-04-12 6:34 ` Zheyu Ma
2022-04-13 3:42 ` Damien Le Moal [this message]
2022-04-20 2:21 ` Zheyu Ma
2022-04-20 3:04 ` Damien Le Moal
2022-04-20 12:15 ` Zheyu Ma
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=3045fde1-2d5b-e731-ef18-6cf3f0987259@opensource.wdc.com \
--to=damien.lemoal@opensource.wdc.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=s.shtylyov@omp.ru \
--cc=zheyuma97@gmail.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
all inboxes | Powered by JetHome®