public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Matt Schulte <matts@commtech-fastcom.com>
Cc: linux-serial@vger.kernel.org, Greg KH <greg@kroah.com>
Subject: Re: [PATCH v2] serial/8250: Add support for Exar's XR17V35x family of multi-port PCIe UARTs
Date: Thu, 15 Nov 2012 22:08:09 +0000	[thread overview]
Message-ID: <20121115220809.21ca5fc4@pyramind.ukuu.org.uk> (raw)
In-Reply-To: <CAJp1Oe6jSNxJu-MKeAFzObDwkPUPK9K5GitbsStKQib6big9pQ@mail.gmail.com>

On Thu, 15 Nov 2012 15:37:37 -0600
Matt Schulte <matts@commtech-fastcom.com> wrote:

> On Thu, Nov 15, 2012 at 2:46 PM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> > On Thu, 15 Nov 2012 10:14:59 -0600
> > Matt Schulte <matts@commtech-fastcom.com> wrote:
> >
> >> On Wed, Nov 14, 2012 at 5:05 PM, Matt Schulte
> >> <matts@commtech-fastcom.com> wrote:
> >> > On Wed, Nov 14, 2012 at 5:00 PM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> >> >>> +     /* Fixme: needs tidying up */
> >> >>> +     check = serial_in(up, UART_EXAR_DVID);
> >> >>> +     if ((check == 0x82) || (check == 0x84) || (check == 0x88))
> >> >>> +             p->handle_irq = exar_handle_irq;
> >> >>
> >> >> Can't you check the port type here rather than re-probing stuff ?
> >> >>
> >> >>
> >> >> Otherwise looks good
> >> >
> >> > I tried that but in my tests port.type == 0 at this point.
> >> >
> >>
> >> _Should_ the port.type have the correct value inside of set_io_from_upio?
> >
> > Yes - except possibly if autoconfig changes the port type.
> >
> > It may in fact be sufficient to set it in serial8250_config_port after
> > autoconfig has run. There are far too many different init paths in this
> > code 8(
> 
> Turns out you were right, it seems to work out if I put it in here:
> 
> @@ -2684,10 +2679,14 @@ static void serial8250_config_port(struct
> uart_port *port, int flags)
> 
>  	if (port->type != PORT_RSA && probeflags & PROBE_RSA)
>  		serial8250_release_rsa_resource(up);
>  	if (port->type == PORT_UNKNOWN)
>  		serial8250_release_std_resource(up);
> +
> +	/* Fixme: might not be the best place for this */
> +	if (port->type == PORT_XR17V35X)
> +		port->handle_irq = exar_handle_irq;
>  }
> 
> This look better?

Yep

Alan

      reply	other threads:[~2012-11-15 22:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-14 18:06 [PATCH v2] serial/8250: Add support for Exar's XR17V35x family of multi-port PCIe UARTs Matt Schulte
2012-11-14 23:00 ` Alan Cox
2012-11-14 23:05   ` Matt Schulte
2012-11-15 16:14     ` Matt Schulte
2012-11-15 20:46       ` Alan Cox
2012-11-15 21:37         ` Matt Schulte
2012-11-15 22:08           ` Alan Cox [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=20121115220809.21ca5fc4@pyramind.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=greg@kroah.com \
    --cc=linux-serial@vger.kernel.org \
    --cc=matts@commtech-fastcom.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