Re: Request: Netmos support in parport_serial for 2.4.27

From: Ryan Underwood
Date: Wed Jun 16 2004 - 21:36:50 EST



The Netmos patch is working fine on my Netmos 9815 as far as I can tell.

I also attached a patch which addresses some things:
1) Wrong reporting of device and vendors ids.. I have no clue what the
original code was even trying to do
2) Allows PCI parallel port to share an IRQ if possible. In limited testing
this seems to be ok, but maybe the interrupt handler was not written for
sharing. Someone else will need to ok this.
3) Adds a prod to get the user to specify an irq if one was probed but
none specified, so if DMA is not being enabled, there is an outward looking
cause for it.
4) Documentation clarification for Documentation/parport.txt

Ryan

On Wed, Jun 16, 2004 at 02:24:22PM -0300, Marcelo Tosatti wrote:
>
> Ryan,
>
> I'm going to release 2.4.27-pre6 in an hour or so with the NetMos patch included.
>
> Can you please test it with your card?
>
> TI
>
>
> On Wed, Jun 16, 2004 at 06:50:31AM -0500, Ryan Underwood wrote:
> >
> > On Tue, Jun 15, 2004 at 11:06:59AM -0300, Marcelo Tosatti wrote:
> > > > > Willy
> > > >
> > > > It's not my patch or my site. I also wasn't the one who made previous
> > > > requests for it. However, I have noticed that multiple requests for
> > > > inclusion were ignored without any reason, so I figured it was just lost
> > > > in the shadow of more important things till now. It has already been
> > > > included in 2.6 for a long time, btw.
> > >
> > > Ryan,
> > >
> > > Dont get Willy wrong -- your help bugging the maintainers is much appreciated.
> > >
> > > Are you sure it has been included in v2.6? It doesnt seem to be the case last
> > > time I checked v2.6.7-rc3.
> >
> > No, I don't think it has. I remember seeing a patch from Tim Waugh
> > which made me think it had been included, but I guess not, from
> > examining 2.6.7-rc3.
> >
> > --
> > Ryan Underwood, <nemesis@xxxxxxxxxxxx>
>
>

--
Ryan Underwood, <nemesis@xxxxxxxxxxxx>
--- /tmp/linux-2.4.26/drivers/char/parport_serial.c 2004-06-16 19:56:18.000000000 -0500
+++ drivers/char/parport_serial.c 2004-06-16 20:12:59.000000000 -0500
@@ -334,9 +334,9 @@
/* TODO: test if sharing interrupts works */
printk (KERN_DEBUG "PCI parallel port detected: %04x:%04x, "
"I/O at %#lx(%#lx)\n",
- parport_serial_pci_tbl[i].vendor,
- parport_serial_pci_tbl[i].device, io_lo, io_hi);
- port = parport_pc_probe_port (io_lo, io_hi, PARPORT_IRQ_NONE,
+ dev->vendor,
+ dev->device, io_lo, io_hi);
+ port = parport_pc_probe_port (io_lo, io_hi, dev->irq,
PARPORT_DMA_NONE, dev);
if (port) {
priv->port[priv->num_par++] = port;
--- /tmp/linux-2.4.26/drivers/parport/parport_pc.c 2004-06-16 19:56:19.000000000 -0500
+++ drivers/parport/parport_pc.c 2004-06-16 21:20:09.000000000 -0500
@@ -2343,8 +2343,9 @@
printk ("(,...)");
#endif /* CONFIG_PARPORT_1284 */
printk("]\n");
- if (probedirq != PARPORT_IRQ_NONE)
- printk(KERN_INFO "%s: irq %d detected\n", p->name, probedirq);
+ if (probedirq != PARPORT_IRQ_NONE) {
+ printk(KERN_INFO "%s: irq %d ignored (try irq=auto or irq=%d)\n", p->name, probedirq, probedirq);
+ }
parport_proc_register(p);

request_region (p->base, 3, p->name);
@@ -2355,7 +2356,7 @@

if (p->irq != PARPORT_IRQ_NONE) {
if (request_irq (p->irq, parport_pc_interrupt,
- 0, p->name, p)) {
+ ((dev != NULL)? SA_SHIRQ : 0), p->name, p)) {
printk (KERN_WARNING "%s: irq %d in use, "
"resorting to polled operation\n",
p->name, p->irq);
@@ -2890,9 +2891,9 @@
/* TODO: test if sharing interrupts works */
printk (KERN_DEBUG "PCI parallel port detected: %04x:%04x, "
"I/O at %#lx(%#lx)\n",
- parport_pc_pci_tbl[i + last_sio].vendor,
- parport_pc_pci_tbl[i + last_sio].device, io_lo, io_hi);
- if (parport_pc_probe_port (io_lo, io_hi, PARPORT_IRQ_NONE,
+ dev->vendor,
+ dev->device, io_lo, io_hi);
+ if (parport_pc_probe_port (io_lo, io_hi, dev->irq,
PARPORT_DMA_NONE, dev))
count++;
}
--- /tmp/linux-2.4.26/Documentation/parport.txt 2001-11-09 16:30:55.000000000 -0600
+++ /usr/src/linux/Documentation/parport.txt 2004-06-16 21:30:03.000000000 -0500
@@ -33,7 +33,9 @@

PCI parallel I/O card support comes from parport_pc. Base I/O
addresses should not be specified for supported PCI cards since they
-are automatically detected.
+are automatically detected. If you have a multi PCI I/O card, try
+to use the parport_serial module if parport_pc does not catch
+all the ports by itself.


KMod

Attachment: signature.asc
Description: Digital signature