From: Folkert van Heusden <folkert@vanheusden.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-hams@vger.kernel.org, sailer@ife.ee.ethz.ch,
henk.termeer@gmail.com, udovdh@xs4all.nl,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] baycom_ser_fdx: also allow i/o ports >= 0x1000 and enhanced failure logging
Date: Sun, 4 Mar 2007 22:47:50 +0100 [thread overview]
Message-ID: <20070304214726.GV10782@vanheusden.com> (raw)
In-Reply-To: <20070304224355.19308ec0@lxorguk.ukuu.org.uk>
> > 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
prev parent reply other threads:[~2007-03-04 21:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-04 21:30 Folkert van Heusden
2007-03-04 22:43 ` Alan Cox
2007-03-04 21:47 ` Folkert van Heusden [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070304214726.GV10782@vanheusden.com \
--to=folkert@vanheusden.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=henk.termeer@gmail.com \
--cc=linux-hams@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sailer@ife.ee.ethz.ch \
--cc=udovdh@xs4all.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®