Changeset View
Changeset View
Standalone View
Standalone View
sys/isa/isahint.c
Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | for (;;) { | ||||
* cannot be shared, if we get a match on either of | * cannot be shared, if we get a match on either of | ||||
* those, ignore any mismatches in IRQs or DRQs. | * those, ignore any mismatches in IRQs or DRQs. | ||||
* | * | ||||
* XXX: We may want to revisit this to be more lenient | * XXX: We may want to revisit this to be more lenient | ||||
* and wire as long as it gets one match. | * and wire as long as it gets one match. | ||||
*/ | */ | ||||
matches = 0; | matches = 0; | ||||
if (resource_long_value(name, unit, "port", &value) == 0) { | if (resource_long_value(name, unit, "port", &value) == 0) { | ||||
/* | |||||
* Floppy drive controllers are notorious for | |||||
* having a wide variety of resources not all | |||||
* of which include the first port that is | |||||
* specified by the hint (typically 0x3f0) | |||||
* (see the comment above | |||||
* fdc_isa_alloc_resources() in fdc_isa.c). | |||||
* However, they do all seem to include port + | |||||
* 2 (e.g. 0x3f2) so for a floppy device, look | |||||
* for 'value + 2' in the port resources | |||||
* instead of the hint value. | |||||
*/ | |||||
if (strcmp(name, "fdc") == 0) | |||||
value += 2; | |||||
if (isa_match_resource_hint(child, SYS_RES_IOPORT, | if (isa_match_resource_hint(child, SYS_RES_IOPORT, | ||||
value)) | value)) | ||||
matches++; | matches++; | ||||
else | else | ||||
continue; | continue; | ||||
} | } | ||||
if (resource_long_value(name, unit, "maddr", &value) == 0) { | if (resource_long_value(name, unit, "maddr", &value) == 0) { | ||||
if (isa_match_resource_hint(child, SYS_RES_MEMORY, | if (isa_match_resource_hint(child, SYS_RES_MEMORY, | ||||
Show All 28 Lines |