Re: [PATCH] baycom_ser_fdx: also allow i/o ports >= 0x1000 and enhanced failure logging

2007-03-05 Thread Thomas Sailer
On Mon, 2007-03-05 at 18:03 +, Ralf Baechle DL5RB wrote:

> A few people asked me if it is possible to drive one of those RS232 abusing
> modems through a USB-to-RS232 converter but I guess the answer is no?

No way. For 9k6 you're polling the RX line say every 25us. That's just
not feasible over full speed USB. I'd expect most of these cables to
allow modem status line sampling over USB only once per USB frame, i.e.
once per 1ms.

OTOH, if you manage to change the firmware of such an adapter (also not
very feasible, because normally it's mask rom), then you can have a "non
dumb" modem ;-)

If someone has the time one could probably adapt something like a Silabs
Toolstick
http://www.silabs.com/tgwWebApp/public/web_content/products/Microcontrollers/en/USBToolStick.htm
to drive a Baycom type modem, they're about the same price as an USB to
RS232 adapter...

Tom


-
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] baycom_ser_fdx: also allow i/o ports >= 0x1000 and enhanced failure logging

2007-03-05 Thread Ralf Baechle DL5RB
On Mon, Mar 05, 2007 at 02:45:09PM +0100, Thomas Sailer wrote:

> The baycom modem really doesn't have anything to do with RS232, it just
> uses the RS232 port as a PIO port + timer. That's why it needs its own
> 16550 driver.

A few people asked me if it is possible to drive one of those RS232 abusing
modems through a USB-to-RS232 converter but I guess the answer is no?

73 de DL5RB op Ralf

--
Loc.JN47BS / CQ 14 / ITU 28 / DOK A21
Packet: [EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] baycom_ser_fdx: also allow i/o ports >= 0x1000 and enhanced failure logging

2007-03-05 Thread Thomas Sailer
On Mon, 2007-03-05 at 10:30 +1100, Hamish Moffatt wrote:

> Ideally it wouldn't have its own 16550 driver.. I have a non-16550 card
> here (using the parport_serial driver) which then couldn't be used with
> the baycom.

The baycom modem really doesn't have anything to do with RS232, it just
uses the RS232 port as a PIO port + timer. That's why it needs its own
16550 driver.

Tom

-
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] baycom_ser_fdx: also allow i/o ports >= 0x1000 and enhanced failure logging

2007-03-04 Thread Hamish Moffatt
On Sun, Mar 04, 2007 at 10:30:35PM +0100, Folkert van Heusden wrote:
> The baycom_ser_fdx driver did not allow i/o ports >= 0x1000. Now that
> there are pci cards (with rs232 ports) which use for example 0xb800 this
> limit should not exists.
> Also, for non kernel coders find the cause of problems was challenging
> so I added extra logging.

Ideally it wouldn't have its own 16550 driver.. I have a non-16550 card
here (using the parport_serial driver) which then couldn't be used with
the baycom.


Hamish
-- 
Hamish Moffatt VK3SB <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] baycom_ser_fdx: also allow i/o ports >= 0x1000 and enhanced failure logging

2007-03-04 Thread Folkert van Heusden
> > The baycom_ser_fdx driver did not allow i/o ports >= 0x1000. Now that
> > there are pci cards (with rs232 ports) which use for example 0xb800 this
> > limit should not exists.
> The IRQ test is also wrong for PCI systems the moment an APIC is present.
> NR_IRQS is the define to use.

Ok, changed:


Signed-off-by: Folkert van Heusden <[EMAIL PROTECTED]>

--- ./drivers/net/hamradio/baycom_ser_fdx.c.org 2007-03-04 22:24:47.0 
+0100
+++ ./drivers/net/hamradio/baycom_ser_fdx.c 2007-03-04 22:42:51.0 
+0100
@@ -413,11 +413,15 @@

if (!dev || !bc)
return -ENXIO;
-   if (!dev->base_addr || dev->base_addr > 0x1000-SER12_EXTENT ||
-   dev->irq < 2 || dev->irq > 15)
+   if (!dev->base_addr || dev->base_addr > 0x-SER12_EXTENT ||
+   dev->irq < 2 || dev->irq > NR_IRQS) {
+   printk(KERN_INFO "baycom_ser_fdx: invalid portnumber (max %u) 
or irq (2 <= irq <= %d)\n", 0x-SER12_EXTENT, NR_IRQS);
return -ENXIO;
-   if (bc->baud < 300 || bc->baud > 4800)
+   }
+   if (bc->baud < 300 || bc->baud > 4800) {
+   printk(KERN_INFO "baycom_ser_fdx: invalid baudrate 
(300...4800)\n");
return -EINVAL;
+   }
if (!request_region(dev->base_addr, SER12_EXTENT, "baycom_ser_fdx")) {
printk(KERN_WARNING "BAYCOM_SER_FSX: I/O port 0x%04lx busy \n",
   dev->base_addr);


Folkert van Heusden

-- 
MultiTail är en flexibel redskap för att fälja logfilar, utför av
commandoer, filtrera, ge färg, sammanfoga, o.s.v. följa.
http://www.vanheusden.com/multitail/
--
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com
-
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] baycom_ser_fdx: also allow i/o ports >= 0x1000 and enhanced failure logging

2007-03-04 Thread Alan Cox
> The baycom_ser_fdx driver did not allow i/o ports >= 0x1000. Now that
> there are pci cards (with rs232 ports) which use for example 0xb800 this
> limit should not exists.

The IRQ test is also wrong for PCI systems the moment an APIC is present.
NR_IRQS is the define to use.

> Also, for non kernel coders find the cause of problems was challenging
> so I added extra logging.
-
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] baycom_ser_fdx: also allow i/o ports >= 0x1000 and enhanced failure logging

2007-03-04 Thread Folkert van Heusden
Hi,

The baycom_ser_fdx driver did not allow i/o ports >= 0x1000. Now that
there are pci cards (with rs232 ports) which use for example 0xb800 this
limit should not exists.
Also, for non kernel coders find the cause of problems was challenging
so I added extra logging.


Signed-off-by: Folkert van Heusden <[EMAIL PROTECTED]>

--- ./drivers/net/hamradio/baycom_ser_fdx.c.org 2007-03-04 22:24:47.0 
+0100
+++ ./drivers/net/hamradio/baycom_ser_fdx.c 2007-03-04 22:25:47.0 
+0100
@@ -413,11 +413,15 @@

if (!dev || !bc)
return -ENXIO;
-   if (!dev->base_addr || dev->base_addr > 0x1000-SER12_EXTENT ||
-   dev->irq < 2 || dev->irq > 15)
+   if (!dev->base_addr || dev->base_addr > 0x-SER12_EXTENT ||
+   dev->irq < 2 || dev->irq > 15) {
+   printk(KERN_INFO "baycom_ser_fdx: invalid portnumber\n");
return -ENXIO;
-   if (bc->baud < 300 || bc->baud > 4800)
+   }
+   if (bc->baud < 300 || bc->baud > 4800) {
+   printk(KERN_INFO "baycom_ser_fdx: invalid baudrate\n");
return -EINVAL;
+   }
if (!request_region(dev->base_addr, SER12_EXTENT, "baycom_ser_fdx")) {
printk(KERN_WARNING "BAYCOM_SER_FSX: I/O port 0x%04lx busy \n",
   dev->base_addr);


Folkert van Heusden

-- 
MultiTail ist eine flexible Applikation um Logfiles und Kommando
Eingaben zu überprüfen. Inkl. Filter, Farben, Zusammenführen,
Ansichten etc. http://www.vanheusden.com/multitail/
--
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com
-
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html