* [PATCH] baycom_ser_fdx: also allow i/o ports >= 0x1000 and enhanced failure logging
@ 2007-03-04 21:30 ` Folkert van Heusden
0 siblings, 0 replies; 9+ messages in thread
From: Folkert van Heusden @ 2007-03-04 21:30 UTC (permalink / raw)
To: linux-hams, sailer; +Cc: henk.termeer, udovdh, linux-kernel
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 <folkert@vanheusden.com>
--- ./drivers/net/hamradio/baycom_ser_fdx.c.org 2007-03-04 22:24:47.000000000 +0100
+++ ./drivers/net/hamradio/baycom_ser_fdx.c 2007-03-04 22:25:47.000000000 +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 > 0xffff-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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] baycom_ser_fdx: also allow i/o ports >= 0x1000 and enhanced failure logging
@ 2007-03-04 21:30 ` Folkert van Heusden
0 siblings, 0 replies; 9+ messages in thread
From: Folkert van Heusden @ 2007-03-04 21:30 UTC (permalink / raw)
To: linux-hams, sailer; +Cc: henk.termeer, udovdh, linux-kernel
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 <folkert@vanheusden.com>
--- ./drivers/net/hamradio/baycom_ser_fdx.c.org 2007-03-04 22:24:47.000000000 +0100
+++ ./drivers/net/hamradio/baycom_ser_fdx.c 2007-03-04 22:25:47.000000000 +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 > 0xffff-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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] baycom_ser_fdx: also allow i/o ports >= 0x1000 and enhanced failure logging
2007-03-04 22:43 ` Alan Cox
@ 2007-03-04 21:47 ` Folkert van Heusden
0 siblings, 0 replies; 9+ messages in thread
From: Folkert van Heusden @ 2007-03-04 21:47 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-hams, sailer, henk.termeer, udovdh, linux-kernel
> > 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 <folkert@vanheusden.com>
--- ./drivers/net/hamradio/baycom_ser_fdx.c.org 2007-03-04 22:24:47.000000000 +0100
+++ ./drivers/net/hamradio/baycom_ser_fdx.c 2007-03-04 22:42:51.000000000 +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 > 0xffff-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", 0xffff-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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] baycom_ser_fdx: also allow i/o ports >= 0x1000 and enhanced failure logging
@ 2007-03-04 21:47 ` Folkert van Heusden
0 siblings, 0 replies; 9+ messages in thread
From: Folkert van Heusden @ 2007-03-04 21:47 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-hams, sailer, henk.termeer, udovdh, linux-kernel
> > 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 <folkert@vanheusden.com>
--- ./drivers/net/hamradio/baycom_ser_fdx.c.org 2007-03-04 22:24:47.000000000 +0100
+++ ./drivers/net/hamradio/baycom_ser_fdx.c 2007-03-04 22:42:51.000000000 +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 > 0xffff-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", 0xffff-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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] baycom_ser_fdx: also allow i/o ports >= 0x1000 and enhanced failure logging
2007-03-04 21:30 ` Folkert van Heusden
(?)
@ 2007-03-04 22:43 ` Alan Cox
2007-03-04 21:47 ` Folkert van Heusden
-1 siblings, 1 reply; 9+ messages in thread
From: Alan Cox @ 2007-03-04 22:43 UTC (permalink / raw)
To: Folkert van Heusden
Cc: linux-hams, sailer, henk.termeer, udovdh, linux-kernel
> 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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] baycom_ser_fdx: also allow i/o ports >= 0x1000 and enhanced failure logging
2007-03-04 21:30 ` Folkert van Heusden
(?)
(?)
@ 2007-03-04 23:30 ` Hamish Moffatt
2007-03-05 13:45 ` Thomas Sailer
-1 siblings, 1 reply; 9+ messages in thread
From: Hamish Moffatt @ 2007-03-04 23:30 UTC (permalink / raw)
To: linux-hams
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 <hamish@debian.org> <hamish@cloud.net.au>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] baycom_ser_fdx: also allow i/o ports >= 0x1000 and enhanced failure logging
2007-03-04 23:30 ` Hamish Moffatt
@ 2007-03-05 13:45 ` Thomas Sailer
2007-03-05 18:03 ` Ralf Baechle DL5RB
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Sailer @ 2007-03-05 13:45 UTC (permalink / raw)
To: Hamish Moffatt; +Cc: linux-hams
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] baycom_ser_fdx: also allow i/o ports >= 0x1000 and enhanced failure logging
2007-03-05 13:45 ` Thomas Sailer
@ 2007-03-05 18:03 ` Ralf Baechle DL5RB
2007-03-05 18:20 ` Thomas Sailer
0 siblings, 1 reply; 9+ messages in thread
From: Ralf Baechle DL5RB @ 2007-03-05 18:03 UTC (permalink / raw)
To: Thomas Sailer; +Cc: Hamish Moffatt, linux-hams
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: DL5RB@DB0FHN.#BAY.DEU.EU
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] baycom_ser_fdx: also allow i/o ports >= 0x1000 and enhanced failure logging
2007-03-05 18:03 ` Ralf Baechle DL5RB
@ 2007-03-05 18:20 ` Thomas Sailer
0 siblings, 0 replies; 9+ messages in thread
From: Thomas Sailer @ 2007-03-05 18:20 UTC (permalink / raw)
To: Ralf Baechle DL5RB; +Cc: Hamish Moffatt, linux-hams
On Mon, 2007-03-05 at 18:03 +0000, 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
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-03-05 18:20 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-04 21:30 [PATCH] baycom_ser_fdx: also allow i/o ports >= 0x1000 and enhanced failure logging Folkert van Heusden
2007-03-04 21:30 ` Folkert van Heusden
2007-03-04 22:43 ` Alan Cox
2007-03-04 21:47 ` Folkert van Heusden
2007-03-04 21:47 ` Folkert van Heusden
2007-03-04 23:30 ` Hamish Moffatt
2007-03-05 13:45 ` Thomas Sailer
2007-03-05 18:03 ` Ralf Baechle DL5RB
2007-03-05 18:20 ` Thomas Sailer
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.