mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Add a new `conflicts' flag for telling when a device is in conflict with
others. The flag can be put in descriptive locations, e.g.: device sb0 at isa? port 0x220 irq 7 conflicts drq 1 vector sbintr or device psm0 at isa? port "IO_KBD" conflicts tty irq 12 vector psmintr But is nonetheless boolean only. You can't turn conflict checking off for only a given type of conflict. I didn't deem it worth the trouble at this stage, and it's far better than the ALLOW_CONFLICT_* that preceeded it.
This commit is contained in:
parent
9cc347481f
commit
babb4e927f
4 changed files with 10 additions and 4 deletions
|
|
@ -121,6 +121,7 @@ struct device {
|
|||
#define UNKNOWN -2 /* -2 means not set yet */
|
||||
int d_dk; /* if init 1 set to number for iostat */
|
||||
int d_flags; /* flags for device init */
|
||||
int d_conflicts; /* I'm allowed to conflict */
|
||||
char *d_port; /* io port base manifest constant */
|
||||
int d_portn; /* io port base (if number not manifest) */
|
||||
char *d_mask; /* interrupt mask */
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
%token BIO
|
||||
%token COMMA
|
||||
%token CONFIG
|
||||
%token CONFLICTS
|
||||
%token CONTROLLER
|
||||
%token CPU
|
||||
%token CSR
|
||||
|
|
@ -633,7 +634,9 @@ Info:
|
|||
NET
|
||||
= { cur.d_mask = "net"; } |
|
||||
FLAGS NUMBER
|
||||
= { cur.d_flags = $2; };
|
||||
= { cur.d_flags = $2; } |
|
||||
CONFLICTS
|
||||
= { cur.d_conflicts = 1; };
|
||||
|
||||
Int_spec:
|
||||
VECTOR Id_list
|
||||
|
|
@ -909,6 +912,7 @@ init_dev(dp)
|
|||
dp->d_name = "OHNO!!!";
|
||||
dp->d_type = DEVICE;
|
||||
dp->d_conn = 0;
|
||||
dp->d_conflicts = 0;
|
||||
dp->d_vec = 0;
|
||||
dp->d_addr = dp->d_flags = dp->d_dk = 0;
|
||||
dp->d_pri = -1;
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ struct kt {
|
|||
{ "at", AT },
|
||||
#if MACHINE_I386
|
||||
{ "bio", BIO },
|
||||
{ "conflicts", CONFLICTS },
|
||||
#endif MACHINE_I386
|
||||
{ "config", CONFIG },
|
||||
{ "controller", CONTROLLER },
|
||||
|
|
|
|||
|
|
@ -717,7 +717,7 @@ isa_devtab(fp, table, dev_idp)
|
|||
|
||||
fprintf(fp, "\n\nstruct isa_device isa_devtab_%s[] = {\n", table);
|
||||
fprintf(fp, "\
|
||||
/* id driver iobase irq drq maddr msiz intr unit flags */\n");
|
||||
/* id driver iobase irq drq maddr msiz intr unit flags conflicts */\n");
|
||||
for (dp = dtab; dp != 0; dp = dp->d_next) {
|
||||
if (dp->d_unit == QUES || !eq(dp->d_mask, table))
|
||||
continue;
|
||||
|
|
@ -729,10 +729,10 @@ isa_devtab(fp, table, dev_idp)
|
|||
fprintf(fp, " %8s,", dp->d_port);
|
||||
else
|
||||
fprintf(fp, " 0x%04x,", dp->d_portn);
|
||||
fprintf(fp, "%6s, %2d, C 0x%05X, %5d, %8s, %2d, 0x%04X, 0, 0, 0, 0, 1 },\n",
|
||||
fprintf(fp, "%6s, %2d, C 0x%05X, %5d, %8s, %2d, 0x%04X, %2d, 0, 0, 0, 0, 1 },\n",
|
||||
sirq(dp->d_irq), dp->d_drq, dp->d_maddr,
|
||||
dp->d_msize, shandler(dp), dp->d_unit,
|
||||
dp->d_flags);
|
||||
dp->d_flags, dp->d_conflicts);
|
||||
}
|
||||
fprintf(fp, "0\n};\n");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue