From: Andrew Morton <akpm@linux-foundation.org>
To: Marc St-Jean <stjeanma@pmc-sierra.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH] serial driver PMC MSP71xx, kernel linux-mips.git master
Date: Mon, 12 Feb 2007 23:36:56 -0800 [thread overview]
Message-ID: <20070212233656.3b4550dd.akpm@linux-foundation.org> (raw)
In-Reply-To: <200702121804.l1CI488t024555@pasqua.pmc-sierra.bc.ca>
On Mon, 12 Feb 2007 12:04:08 -0600 Marc St-Jean <stjeanma@pmc-sierra.com> wrote:
> Sixth attempt at the serial driver patch for the PMC-Sierra MSP71xx device.
> Identical to last patch but respun for 8 character tabs.
>
> There are three different fixes:
> 1. Fix for DesignWare THRE errata
> - Dropped our fix since the "8250-uart-backup-timer.patch" in the "mm"
> tree also fixes it. This patch needs to be applied on top of "mm" patch.
>
> 2. Fix for Busy Detect on LCR write
> - No changes since last patch.
>
> 3. Workaround for interrupt/data concurrency issue
> - No changes since last patch.
A couple of things.
- When preparing a changelog, please just tell us what the patch does.
The information about how this patch differes from a previous version of
the patch is irrelevant when the patch hits the mainline repository hence
I must edit it all.
It's OK to add the what-i-changed-since-last-time details, but please make
that separate and remember that it will be removed for when the patch goes
upstream.
- When fixing a bug, please tell us in detail what that bug *is*. None
of the above three items tell us any of this, which is essential
information for those who are to review the change.
>
> + case UPIO_DWAPB:
> + /* Save the LCR value so it can be re-written when a
> + * Busy Detect interrupt occurs. */
> + if (save_offset == UART_LCR)
> + up->lcr = value;
> + writeb(value, up->port.membase + offset);
> + /* Read the IER to ensure any interrupt is cleared before
> + * returning from ISR. */
> + if ((save_offset == UART_TX || save_offset == UART_IER) && in_irq())
The in_irq() is a worry. If the serial driver is used as the system
console, then it can be called from _any_ interrupt handler. eg a printk()
in the sata code.
What happens then?
> @@ -1383,6 +1399,19 @@ static irqreturn_t serial8250_interrupt(
> handled = 1;
>
> end = NULL;
> + } else if (up->port.iotype == UPIO_DWAPB &&
> + (iir & UART_IIR_BUSY) == UART_IIR_BUSY) {
> + /* The DesignWare APB UART has an Busy Detect (0x07)
> + * interrupt meaning an LCR write attempt occured while the
> + * UART was busy. The interrupt must be cleared by reading
> + * the UART status register (USR) and the LCR re-written. */
> + unsigned int status;
> + status = *(volatile u32 *)up->port.private_data;
Are you sure this is right? The use of volatile is generally discouraged
and is a sign that something is wrong. What is the driver attempting to
read here? Should it be using readl()?
Also, the newly-added private_data field is not being initialised to
anything anywhere in this patch.
next prev parent reply other threads:[~2007-02-13 7:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-12 18:04 [PATCH] serial driver PMC MSP71xx, kernel linux-mips.git master Marc St-Jean
2007-02-13 7:36 ` Andrew Morton [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-02-16 17:39 Marc St-Jean
2007-02-15 19:26 Marc St-Jean
2007-02-15 20:31 ` Sergei Shtylyov
2007-02-16 1:10 ` Andrew Morton
2007-02-16 13:47 ` Sergei Shtylyov
2007-02-09 21:50 Marc St-Jean
2007-02-07 22:35 Marc St-Jean
2007-02-08 12:13 ` Sergei Shtylyov
2007-02-05 18:45 Marc St-Jean
2007-02-05 21:59 ` Alan
2007-02-07 17:54 ` Sergei Shtylyov
2007-01-25 0:00 Marc St-Jean
2007-01-25 14:50 ` Sergei Shtylyov
2007-01-19 0:23 Marc St-Jean
2007-01-19 14:18 ` Ralf Baechle
2007-01-19 15:05 ` Sergei Shtylyov
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=20070212233656.3b4550dd.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-serial@vger.kernel.org \
--cc=stjeanma@pmc-sierra.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).