opnsense-src/sys
Warner Losh 358fef538f Sometimes, when asked to return region A..C, we'd return A+N..C+N
instead of failing.

When looking for a region to allocate, we used to check to see if the
start address was < end.  In the case where A..B is allocated already,
and one wants to allocate A..C (B < C), then this test would
improperly fail (which means we'd examine that region as a possible
one), and we'd return the region B+1..C+(B-A+1) rather than NULL.
Since C+(B-A+1) is necessarily larger than C (end argument), this is
incorrect behavior for rman_reserve_resource_bound().

The fix is to exclude those regions where r->r_start + count - 1 > end
rather than r->r_start > end.  This bug has been in this code for a
very long time.  I believe that all other tests against end are
correctly done.

This is why sio0 generated a message about interrupts not being
enabled properly for the device.  When fdc had a bug that allocated
from 0x3f7 to 0x3fb, sio0 was then given 0x3fc-0x404 rather than the
0x3f8-0x3ff that it wanted.  Now when fdc has the same bug, sio0 fails
to allocate its ports, which is the proper behavior.  Since the probe
failed, we never saw the messed up resources reported.

I suspect that there are other places in the tree that have weird
looping or other odd work arounds to try to cope with the observed
weirdness this bug can introduce.  These workarounds should be located
and eliminated.

Minor debug write fix to match the above test done as well.

'nice' by: mdodd
Sponsored by: timing solutions (http://www.timing.com/)
2005-03-15 20:28:51 +00:00
..
alpha Refactor the bus_dma header files so that the interface is described in 2005-03-14 16:46:28 +00:00
amd64 Remove fpsetsticky(). This was added for SysV compatibility, but due 2005-03-15 15:53:39 +00:00
arm fix arm wrt to busdma... 2005-03-15 14:57:30 +00:00
boot Ensure GCC does not use FP registers in integer code. 2005-03-15 18:43:36 +00:00
bsm Add a stub audit_kevents.h, which defines exactly one audit event: 2005-02-02 14:27:36 +00:00
cam Reference a pointer correctly when copying to it's location. 2005-02-21 00:28:36 +00:00
coda Disable two users of findcdev. They do the wrong thing now and will 2005-03-15 12:39:30 +00:00
compat Neuter the duplicated disk-device magic code for now. Somebody with 2005-03-15 11:58:40 +00:00
conf Remove OBE comment about AMD64 memory model. 2005-03-15 18:44:51 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r143439, 2005-03-12 00:17:37 +00:00
crypto gbde(8) is also rejndael user. 2005-03-11 22:07:04 +00:00
ddb Start each of the license/copyright comments with /*- 2005-01-06 01:34:41 +00:00
dev Disable two users of findcdev. They do the wrong thing now and will 2005-03-15 12:39:30 +00:00
doc Experimental support for using doxygen to generate kernel documentation. 2004-07-11 16:13:57 +00:00
fs Improve the vfs_hash() API: vput() the unneeded vnode centrally to 2005-03-15 20:00:03 +00:00
gdb /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 18:27:30 +00:00
geom forward declare struct disk. 2005-03-15 10:47:38 +00:00
gnu Improve the vfs_hash() API: vput() the unneeded vnode centrally to 2005-03-15 20:00:03 +00:00
i4b /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
i386 Remove fpsetsticky(). This was added for SysV compatibility, but due 2005-03-15 15:53:39 +00:00
ia64 Refactor the bus_dma header files so that the interface is described in 2005-03-14 16:46:28 +00:00
isa Whitespace sync with amd64. (Rather than re-add the extra blank lines 2005-03-11 22:10:25 +00:00
isofs/cd9660 Improve the vfs_hash() API: vput() the unneeded vnode centrally to 2005-03-15 20:00:03 +00:00
kern Sometimes, when asked to return region A..C, we'd return A+N..C+N 2005-03-15 20:28:51 +00:00
libkern Add strspn() to libkern. 2005-02-10 20:39:39 +00:00
modules Add PSEUDOFS_TRACE option. 2005-03-14 16:04:27 +00:00
net Add a sysctl net.link.log_link_state_change, which allows to 2005-03-12 12:58:03 +00:00
net80211 honor any desired bssid when creating an ibss 2005-03-08 17:04:14 +00:00
netatalk When generating a phase II ARP lookup from aarpwhohas(), use a 2005-02-22 14:37:22 +00:00
netatm In the current world order, solisten() implements the state transition of 2005-02-21 21:58:17 +00:00
netgraph Remove ng_connect_t where it is unused. Probably it remained from ng_source.c. 2005-03-14 20:49:48 +00:00
netinet In tcp_usr_send(), broaden coverage of the socket buffer lock in the 2005-03-14 22:15:14 +00:00
netinet6 refer opencrypto/cast.h directly. 2005-03-11 12:37:07 +00:00
netipsec correct space check 2005-03-09 15:28:48 +00:00
netipx Marginally reformat my copyright statement to remove the spurious ','. 2005-03-10 14:19:31 +00:00
netkey fixed an unexpected addr/port matching failure in IPv6 SA management 2005-01-10 13:06:42 +00:00
netnatm Mark netatm and netnatm explicitly as requiring Giant, as they still do. 2005-02-17 14:21:22 +00:00
netncp avoid potential null ptr derefs 2005-02-23 22:44:38 +00:00
netsmb /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
nfs /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
nfs4client - It is no longer necessary to lock and unlock the vnode in nfs4_close() 2005-03-13 12:16:45 +00:00
nfsclient - VOP_INACTIVE should no longer drop the vnode lock. 2005-03-13 12:15:36 +00:00
nfsserver Don't try to create vnode_pager objects on other filesystems vnodes, 2005-01-24 22:09:13 +00:00
opencrypto just use crypto/rijndael, and nuke opencrypto/rindael.[ch]. 2005-03-11 17:24:46 +00:00
pc98 MFi386: revision 1.217. 2005-03-12 10:30:06 +00:00
pccard Remove more deadwood that never got implemented in NEWCARD, since NEWCARD 2005-02-15 02:54:53 +00:00
pci Bugger, wiped out a needed comma in the previous commit. 2005-03-09 00:54:55 +00:00
posix4 /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
powerpc Prepend underscore to bus_dmamap_{unload|sync} in line with 2005-03-15 11:43:05 +00:00
rpc /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
security Remove an accidental clearing of the new label pointer on a system V 2005-02-24 16:08:41 +00:00
sparc64 Refactor the bus_dma header files so that the interface is described in 2005-03-14 16:46:28 +00:00
sys fix arm wrt to busdma... 2005-03-15 14:57:30 +00:00
tools Add VOP_FOO_APV() which takes a pointer to the vop_vector. 2005-02-08 12:54:32 +00:00
ufs Improve the vfs_hash() API: vput() the unneeded vnode centrally to 2005-03-15 20:00:03 +00:00
vm - In vm_page_insert() hold the backing vnode when the first page 2005-03-15 14:14:09 +00:00
Makefile When building cscopnamefile, default architecture to ${MACHINE}, not i386. 2005-03-08 00:09:41 +00:00