All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Subject: Re: [PATCH 1/7] serial: exar: Fix mapping of port I/O resources
Date: Wed, 8 Feb 2017 00:40:21 +0200	[thread overview]
Message-ID: <CAHp75VfGpk_+m=yJAqGNWxVg01UvsFnw5HHOOSCbgXLMLeDUdg@mail.gmail.com> (raw)
In-Reply-To: <52dc04249d65a55fbf1e58c262ca23c4fcc20777.1486483803.git.jan.kiszka@siemens.com>

On Tue, Feb 7, 2017 at 6:09 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> pcim_iomap_table only returns the table of mapping, it does not perform
> them. For that, we need to call pcim_iomap, but only if that mapping was
> not done before.

Basically by this change you answered to one of my question during review.

FWIW:
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

> Fixes: d0aeaa83f0b0 ("serial: exar: split out the exar code from 8250_pci")
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  drivers/tty/serial/8250/8250_exar.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c
> index e6b44a7..58469d9 100644
> --- a/drivers/tty/serial/8250/8250_exar.c
> +++ b/drivers/tty/serial/8250/8250_exar.c
> @@ -72,6 +72,9 @@ static int default_setup(struct exar8250 *priv, struct pci_dev *pcidev,
>         const struct exar8250_board *board = priv->board;
>         unsigned int bar = 0;
>
> +       if (!pcim_iomap_table(pcidev)[bar] && !pcim_iomap(pcidev, bar, 0))
> +               return -ENOMEM;
> +
>         port->port.iotype = UPIO_MEM;
>         port->port.mapbase = pci_resource_start(pcidev, bar) + offset;
>         port->port.membase = pcim_iomap_table(pcidev)[bar] + offset;
> --
> 2.1.4
>



-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2017-02-07 22:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07 16:09 [PATCH 0/7] serial: exar: Fixes and cleanups Jan Kiszka
2017-02-07 16:09 ` [PATCH 1/7] serial: exar: Fix mapping of port I/O resources Jan Kiszka
2017-02-07 22:40   ` Andy Shevchenko [this message]
2017-02-07 16:09 ` [PATCH 2/7] serial: exar: Fix initialization of EXAR registers for ports > 0 Jan Kiszka
2017-02-07 22:43   ` Andy Shevchenko
2017-02-07 16:10 ` [PATCH 3/7] serial: exar: Fix feature control register constants Jan Kiszka
2017-02-07 22:44   ` Andy Shevchenko
2017-02-07 16:10 ` [PATCH 4/7] serial: exar: Move Commtech adapters to 8250_exar as well Jan Kiszka
2017-02-07 23:23   ` Andy Shevchenko
2017-02-08  6:32     ` Jan Kiszka
2017-02-07 16:10 ` [PATCH 5/7] serial: pci: Remove unused pci_boards entries Jan Kiszka
2017-02-07 16:10 ` [PATCH 6/7] serial: exar: Move register defines from uapi header to consumer site Jan Kiszka
2017-02-07 16:10 ` [PATCH 7/7] serial: exar: Enable MSI support Jan Kiszka
2017-02-07 23:26   ` Andy Shevchenko

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='CAHp75VfGpk_+m=yJAqGNWxVg01UvsFnw5HHOOSCbgXLMLeDUdg@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jan.kiszka@siemens.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=sudip.mukherjee@codethink.co.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.