mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "V. Ananda Krishnan" <mansarov@us.ibm.com>
To: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: linux-kernel@vger.kernel.org, gregkh@suse.de
Subject: Re: uart_port structure in serial8250_port[i]  doesn't have the port_type values
Date: Mon, 15 Aug 2005 11:33:39 -0500	[thread overview]
Message-ID: <1124123620.3694.53.camel@siliver.austin.ibm.com> (raw)
In-Reply-To: <20050815171159.C30479@flint.arm.linux.org.uk>

On Mon, 2005-08-15 at 17:11 +0100, Russell King wrote:
> On Mon, Aug 15, 2005 at 10:56:38AM -0500, V. Ananda Krishnan wrote:
> > On Mon, 2005-08-15 at 15:52 +0100, Russell King wrote:
> > > On Mon, Aug 15, 2005 at 09:10:56AM -0500, V. Ananda Krishnan wrote:
> > > >   The problem described here is related to the 8250_pci driver in
> > > > 2.6.12.3/2.6.12.4 kernels. When 8250_pci device driver detects a serial
> > > > port pci device and sets up the default setup (8250_pci.c), it tries to
> > > > find a match or unused port (serial8250_find_match_or_unused proc in in
> > > > 8250.c).
> > > > 
> > > > This leads to the uart_match_port with one of the parameters as
> > > > serial8250_ports[i].port. During debugging, I noticed that the none of
> > > > elements of the serial8250_ports[i].port.type was having any port value.
> > > 
> > > Every variable has a value.  In this case, they start off as PORT_UNKNOWN
> > > as expected.
> > > 
> > > > So the serial8250_register_port fails and the device driver module fails
> > > > to load.
> > > 
> > > I don't follow you here - failure of this function is not dependent on
> > > port.type being PORT_UNKNOWN.
> > 
> > Sorry for not being clear.  When 8250_pci.c invokes the function
> > serial8250_register_port(&serial_port) at line 1736 (linux-2.6.12.4), I
> > am seeing the following values: number of ports in the pci device is 1,
> > and the port structure has io_type:2, iobase:0, membase:80005000 and
> > mapbase:d6000000. In turn, The serial8250_register_port procedure in
> > 8250.c calls the serial8250_find_match_or_unused(port) routine (line
> > 2439 in 8250.c of linux-2.6.12.4) which returns 0. Hence the
> > uart_add_one_port(&serial8250_reg, &uart->port) (line 2455 in 8250.c of
> > linux-2.6.12.4) codes are not touched and serial8250_register_port
> > returns -28 (-ENOSPC) to the register_port caller.
> 
> Please consider that the person you're trying to communicate with has
> intimate knowledge of the code in question, so adding such things like
> line numbers, filenames, and versions to your explaination just adds
> extra meaningless noise which just obfuscates the rest of your
> explaination.
> 
> The problem with your explaination is that it doesn't really give me
> any idea what:
> 
> * ports are already registered with the driver
> * the value of CONFIG_SERIAL_8250_NR_UARTS is
> 
> You can provide all of this by providing the complete and entire contents
> of /proc/tty/driver/serial

Thanks for your guidance.  Here is the cat of /proc/tty/driver/serial:
serinfo:1.0 driver revision:
0: uart:16550A port:000003F8 irq:4 tx:11963 rx:0 RTS|DTR
1: uart:16550A port:000002F8 irq:3 tx:11 rx:0
2: uart:16550A port:00000898 irq:14 tx:0 rx:0
3: uart:16550A port:00000890 irq:15 tx:0 rx:0

> 
> Without this, I can only conclude from your above description that
> all available 8250 ports are already associated with some hardware,
> and therefore the 8250 driver is working as designed.
> 



  reply	other threads:[~2005-08-15 16:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-15 14:10 V. Ananda Krishnan
2005-08-15 14:52 ` Russell King
2005-08-15 15:56   ` V. Ananda Krishnan
2005-08-15 16:11     ` Russell King
2005-08-15 16:33       ` V. Ananda Krishnan [this message]
2005-08-15 16:41         ` Russell King
2005-08-15 16:46           ` V. Ananda Krishnan
2005-08-15 17:14           ` V. Ananda Krishnan

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=1124123620.3694.53.camel@siliver.austin.ibm.com \
    --to=mansarov@us.ibm.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+lkml@arm.linux.org.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome