From 2ee7f81b57cec4fab17cbac17d9eb944e5c3653e Mon Sep 17 00:00:00 2001 From: sanpei Date: Fri, 20 Oct 2000 13:08:18 +0000 Subject: add -I option, ``Don't get and use a list of free IRQs from kernel.''.. With IBM ThinkPad600. ``sio1'' was disabled in BIOS and irq 3 was free (also not listed in dmesg), I think. But I could not use irq 3 for PC-Card with new(PIOCSRESOURCE ioctl enabled) pccardd. --- usr.sbin/pccard/pccardd/cardd.c | 3 ++- usr.sbin/pccard/pccardd/cardd.h | 1 + usr.sbin/pccard/pccardd/pccardd.8 | 3 +++ usr.sbin/pccard/pccardd/pccardd.c | 6 +++++- 4 files changed, 11 insertions(+), 2 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/pccard/pccardd/cardd.c b/usr.sbin/pccard/pccardd/cardd.c index 18adcca..a2bc78c 100644 --- a/usr.sbin/pccard/pccardd/cardd.c +++ b/usr.sbin/pccard/pccardd/cardd.c @@ -528,7 +528,8 @@ assign_driver(struct card *cp) perror("ioctl (PIOCSRESOURCE)"); exit(1); } - if (pool_irq[i] && res.resource_addr == i) { + if (pool_irq[i] + && (res.resource_addr == i || !use_kern_irq)) { conf->irq = i; pool_irq[i] = 0; break; diff --git a/usr.sbin/pccard/pccardd/cardd.h b/usr.sbin/pccard/pccardd/cardd.h index f225d4f..31be286 100644 --- a/usr.sbin/pccard/pccardd/cardd.h +++ b/usr.sbin/pccard/pccardd/cardd.h @@ -154,6 +154,7 @@ EXTERN bitstr_t *mem_init; EXTERN bitstr_t *io_avail; EXTERN bitstr_t *io_init; EXTERN int pccard_init_sleep; /* Time to sleep on init */ +EXTERN int use_kern_irq; EXTERN int debug_level; /* cardd.c functions */ diff --git a/usr.sbin/pccard/pccardd/pccardd.8 b/usr.sbin/pccard/pccardd/pccardd.8 index 9214a04..e7553c8 100644 --- a/usr.sbin/pccard/pccardd/pccardd.8 +++ b/usr.sbin/pccard/pccardd/pccardd.8 @@ -37,6 +37,7 @@ .Op Fl v .Op Fl z .Op Fl i Ar IRQ +.Op Fl I .Op Fl f Ar configfile .Sh DESCRIPTION .Nm Pccardd @@ -135,6 +136,8 @@ After reading the configuration file, print out a summary of it. .It Fl z Delays running as a daemon until after the cards have been probed and attached. +.It Fl I +Don't get a list of free IRQs from kernel. .It Fl i Ar IRQ Configures an available IRQ. It overrides the "irq" line in .Pa /etc/defaults/pccard.conf diff --git a/usr.sbin/pccard/pccardd/pccardd.c b/usr.sbin/pccard/pccardd/pccardd.c index f911d33..ba70336 100644 --- a/usr.sbin/pccard/pccardd/pccardd.c +++ b/usr.sbin/pccard/pccardd/pccardd.c @@ -161,14 +161,18 @@ main(int argc, char *argv[]) int irq_specified = 0; int i; struct sockaddr_un sun; -#define COM_OPTS ":dvf:s:i:z" +#define COM_OPTS ":Idvf:s:i:z" bzero(irq_arg, sizeof(irq_arg)); + use_kern_irq = 1; debug_level = 0; pccard_init_sleep = 5000000; cards = last_card = 0; while ((count = getopt(argc, argv, COM_OPTS)) != -1) { switch (count) { + case 'I': + use_kern_irq = 0; + break; case 'd': setbuf(stdout, 0); setbuf(stderr, 0); -- cgit v1.1