From: Daniel Stodden <stodden@informatik.tu-muenchen.de>
To: linux-kernel@vger.kernel.org,
kai@thphy.uni-duesseldorf.de (Kai Germaschewski)
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH] hisax/sportster dependency error
Date: Tue, 9 Jan 2001 10:30:15 +0000 [thread overview]
Message-ID: <874rz9t6om.fsf@bitch.localnet> (raw)
In-Reply-To: <E14FKlk-00037v-00@the-village.bc.nu>
In-Reply-To: Alan Cox's message of "Sun, 7 Jan 2001 19:40:57 +0000"
hi.
Alan Cox <alan@lxorguk.ukuu.org.uk> writes:
> > > according to sportster.c:get_io_range, this appears to be perfectly
> > > intentional, request_regioning 64x8 byte from 0x268 in 1024byte-steps.
> >
> > AFAIK, this is because the hardware is stupid and does decode the higher
> > address lines. Therefore, the IO ports are mirrored every 1024 bytes and
> > should be reserved to avoid potential conflicts with other devices.
>
> Almost every 10bit decode ISA card is like that. You don't need to do the
> work. The PCI alloc rules already cover it.
so, if i understand this correctly, since all offsets actually in use
are 1024B multiples the following would be sufficient, or more elegant..?
or should
#define SPORTSTER_ISAC 0xC000
#define SPORTSTER_HSCXA 0x0000
#define SPORTSTER_HSCXB 0x4000
#define SPORTSTER_RES_IRQ 0x8000
still get requested explicitly in such cases?
--- linux-2.4/drivers/isdn/hisax/sportster.c.orig Tue Jan 9 09:31:36 2001
+++ linux-2.4/drivers/isdn/hisax/sportster.c Tue Jan 9 09:54:18 2001
@@ -133,13 +133,10 @@
void
release_io_sportster(struct IsdnCardState *cs)
{
- int i, adr;
byteout(cs->hw.spt.cfg_reg + SPORTSTER_RES_IRQ, 0);
- for (i=0; i<64; i++) {
- adr = cs->hw.spt.cfg_reg + i *1024;
- release_region(adr, 8);
- }
+
+ release_region(cs->hw.spt.cfg_reg, 8);
}
void
@@ -185,27 +182,18 @@
static int __init
get_io_range(struct IsdnCardState *cs)
{
- int i, j, adr;
+ int adr = cs->hw.spt.cfg_reg;
+
+ if ( check_region(adr, 8) ) {
+ printk(KERN_WARNING
+ "HiSax: %s config port %x-%x already in use\n",
+ CardType[cs->typ], adr, adr + 8);
+ return 0;
+ }
- for (i=0;i<64;i++) {
- adr = cs->hw.spt.cfg_reg + i *1024;
- if (check_region(adr, 8)) {
- printk(KERN_WARNING
- "HiSax: %s config port %x-%x already in use\n",
- CardType[cs->typ], adr, adr + 8);
- break;
- } else
- request_region(adr, 8, "sportster");
- }
- if (i==64)
- return(1);
- else {
- for (j=0; j<i; j++) {
- adr = cs->hw.spt.cfg_reg + j *1024;
- release_region(adr, 8);
- }
- return(0);
- }
+ request_region(adr, 8, "sportster");
+
+ return 1;
}
int __init
best regards,
dns
--
___________________________________________________________________________
mailto:stodden@in.tum.de
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2001-01-09 9:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-06 3:12 [PATCH] hisax/sportster dependency error Daniel Stodden
2001-01-06 23:11 ` Kai Germaschewski
2001-01-07 18:42 ` Alan Cox
2001-01-09 10:30 ` Daniel Stodden [this message]
2001-01-09 10:32 ` Alan Cox
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=874rz9t6om.fsf@bitch.localnet \
--to=stodden@informatik.tu-muenchen.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=kai@thphy.uni-duesseldorf.de \
--cc=linux-kernel@vger.kernel.org \
--cc=stodden@in.tum.de \
/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 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.