public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [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
  0 siblings, 1 reply; 3+ 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] 3+ messages in thread

end of thread, other threads:[~2007-03-04 21:50 UTC | newest]

Thread overview: 3+ 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 22:43 ` Alan Cox
2007-03-04 21:47   ` Folkert van Heusden

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox