All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: lkml <linux-kernel@vger.kernel.org>, linux-parport@lists.infradead.org
Subject: Re: [PATCH] Netmos parallel/serial/combo support
Date: Thu, 24 Mar 2005 15:12:29 -0700	[thread overview]
Message-ID: <1111702349.25455.15.camel@eeyore> (raw)
In-Reply-To: <424325A7.2010101@tls.msk.ru>

On Thu, 2005-03-24 at 23:40 +0300, Michael Tokarev wrote:
> So, do you expect 9[78]35 cards to work? ;)

Yes, I expect them all to work.  Thanks very much for testing yours!

> With this patch applied, my 9835 card now works when loading 8250_pci
> module.  But things does not completely work still.
> 
> I've a 9835 card with two serial and no parallel ports:
> 
> 0000:01:00.0 0700: 9710:9835 (rev 01) (prog-if 02)
>          Subsystem: 1000:0002
>          Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
>          Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
>          Interrupt: pin A routed to IRQ 193
>          Region 0: I/O ports at a400 [size=8]
>          Region 1: I/O ports at a000 [size=8]
>          Region 2: I/O ports at 9800 [size=8]
>          Region 3: I/O ports at 9400 [size=8]
>          Region 4: I/O ports at 9000 [size=8]
>          Region 5: I/O ports at 8800 [size=16]
> 
> When I first load 8250_pci, it correctly detects one onboard
> serial port (ttyS0) and two ports on the card (ttyS4 and ttyS5):
> 
> Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing enabled
> ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
> ACPI: PCI interrupt 0000:01:00.0[A] -> GSI 18 (level, low) -> IRQ 193
> ttyS4 at I/O 0xa400 (irq = 193) is a 16550A
> ttyS5 at I/O 0xa000 (irq = 193) is a 16550A
> 
> When I load parport_pc after loading 8250_pci, it correctly detects
> onboard parallel port and nothing more:
> 
> parport: PnPBIOS parport detected.
> parport0: PC-style at 0x378, irq 7 [PCSPP]

Everything looks good so far.

> But after reloading parport_pc, it does not see the built-in
> port anymore; more, after unloading 8250_pci and 8250,
> parport_pc finds one parallel port -- on this netmos
> card only (there's no parallel port on this card):
> 
> PCI parallel port detected: 9710:9835, I/O at 0x9800(0x9400)
> parport0: PC-style at 0x9800 (0x9400) [PCSPP,TRISTATE]

Hmmm...  Do you have an init script or something that pokes
9835 into /sys/bus/pci/drivers/parport_pc/new_id?  If not,
I don't see how parport_pc could claim your 9835, since it's
not compiled into parport_pc_pci_tbl.  It looks like you
should be able to turn off the new_id functionality by
disabling CONFIG_HOTPLUG.

> When parport_pc loaded, 8250[_pci] can't detect the two
> serial ports it detected previously:

That's because there's only one PCI device, and parport_pc
already claimed it.

Can you add some printks to figure out how parport_pc claims
your board?  For example, the patch below might be a start:

--- 2.6.12-rc1-mm1-netmos/drivers/parport/parport_pc.c.orig	2005-03-24 13:27:02.000000000 -0700
+++ 2.6.12-rc1-mm1-netmos/drivers/parport/parport_pc.c	2005-03-24 13:31:40.000000000 -0700
@@ -2930,10 +2930,13 @@
 		return -ENODEV;
 	}
 
+	printk("parport_pc: dev %s i %d numports %d\n", pci_name(dev), i,
+		cards[i].numports);
 	for (n = 0; n < cards[i].numports; n++) {
 		int lo = cards[i].addr[n].lo;
 		int hi = cards[i].addr[n].hi;
 		unsigned long io_lo, io_hi;
+		printk("parport_pc:   port %d lo %d hi %d\n", n, lo, hi);
 		io_lo = pci_resource_start (dev, lo);
 		io_hi = 0;
 		if ((hi >= 0) && (hi <= 6))
--- 2.6.12-rc1-mm1-netmos/drivers/parport/parport_serial.c.orig	2005-03-24 13:39:29.000000000 -0700
+++ 2.6.12-rc1-mm1-netmos/drivers/parport/parport_serial.c	2005-03-24 13:45:23.000000000 -0700
@@ -358,6 +358,8 @@
 	    card->preinit_hook (dev, card, PARPORT_IRQ_NONE, PARPORT_DMA_NONE))
 		return -ENODEV;
 
+	printk("parport_serial: dev %s i %d numports %d\n", pci_name(dev), i,
+		card->numports);
 	for (n = 0; n < card->numports; n++) {
 		struct parport *port;
 		int lo = card->addr[n].lo;
@@ -372,6 +374,7 @@
 			break;
 		}
 
+		printk("parport_serial:   port %d lo %d hi %d\n", n, lo, hi);
 		io_lo = pci_resource_start (dev, lo);
 		io_hi = 0;
 		if ((hi >= 0) && (hi <= 6))




  reply	other threads:[~2005-03-24 22:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-22 23:14 [PATCH] Netmos parallel/serial/combo support Bjorn Helgaas
2005-03-24 20:40 ` Michael Tokarev
2005-03-24 22:12   ` Bjorn Helgaas [this message]
2005-03-25  0:21     ` Michael Tokarev

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=1111702349.25455.15.camel@eeyore \
    --to=bjorn.helgaas@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parport@lists.infradead.org \
    --cc=mjt@tls.msk.ru \
    /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.