From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Subramanian Ananthanarayanan <quic_skananth@quicinc.com>
Cc: helgaas@kernel.org, linux-pci@vger.kernel.org,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
quic_vbadigan@quicinc.com, quic_nitegupt@quicinc.com,
quic_ramkri@quicinc.com, quic_parass@quicinc.com,
krzysztof.kozlowski@linaro.org,
Manivannan Sadhasivam <mani@kernel.org>,
Jeffrey Hugo <quic_jhugo@quicinc.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Dan Carpenter <error27@gmail.com>,
"open list:MHI BUS" <mhi@lists.linux.dev>
Subject: Re: [PATCH v1] bus: mhi: ep: Clear channel interrupts that are unmasked
Date: Mon, 14 Aug 2023 13:44:35 +0530 [thread overview]
Message-ID: <20230814081435.GA9011@thinkpad> (raw)
In-Reply-To: <1691747849-15385-1-git-send-email-quic_skananth@quicinc.com>
On Fri, Aug 11, 2023 at 02:57:08AM -0700, Subramanian Ananthanarayanan wrote:
> Change is to avoid clearing of interrupts that could have been masked.
>
> Signed-off-by: Subramanian Ananthanarayanan <quic_skananth@quicinc.com>
Is this scenario possible in real life? We unmask all the interrupts during
power_up and later mask the interrupts specific to channels when they are
started. So I do not see a possibility where the CHDB status would be set for an
unmasked channel.
Looking at the code now, I think we can get rid of the mask check, even the
local copy of mask if there is a guarantee that doorbell interrupts won't be
enabled behind the back of the MHI stack.
IIRC, I added the mask check as the HW channel interrupts were enabled behind
the back. But that was fixed with all unmask during power_up and mask only
started channels strategy.
PS: The term "mask" is horribly used in an inverted manner in MHI.
- Mani
> ---
> drivers/bus/mhi/ep/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/bus/mhi/ep/main.c b/drivers/bus/mhi/ep/main.c
> index 6008818..a818781 100644
> --- a/drivers/bus/mhi/ep/main.c
> +++ b/drivers/bus/mhi/ep/main.c
> @@ -867,7 +867,7 @@ static void mhi_ep_check_channel_interrupt(struct mhi_ep_cntrl *mhi_cntrl)
> if (ch_int) {
> mhi_ep_queue_channel_db(mhi_cntrl, ch_int, ch_idx);
> mhi_ep_mmio_write(mhi_cntrl, MHI_CHDB_INT_CLEAR_n(i),
> - mhi_cntrl->chdb[i].status);
> + ch_int);
> }
> }
> }
> --
> 2.7.4
>
--
மணிவண்ணன் சதாசிவம்
prev parent reply other threads:[~2023-08-14 8:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 9:57 [PATCH v1] bus: mhi: ep: Clear channel interrupts that are unmasked Subramanian Ananthanarayanan
2023-08-14 8:14 ` Manivannan Sadhasivam [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=20230814081435.GA9011@thinkpad \
--to=manivannan.sadhasivam@linaro.org \
--cc=error27@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=helgaas@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mani@kernel.org \
--cc=mhi@lists.linux.dev \
--cc=quic_jhugo@quicinc.com \
--cc=quic_nitegupt@quicinc.com \
--cc=quic_parass@quicinc.com \
--cc=quic_ramkri@quicinc.com \
--cc=quic_skananth@quicinc.com \
--cc=quic_vbadigan@quicinc.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).