All of lore.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
  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

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.