Loosen up the range test in ndis_register_ioport(). Allow drivers to
map ranges that are smaller than what our resource manager code knows is available, rather than requiring that they match exactly. This fixes a problem with the Intel PRO/1000 gigE driver: it wants to map a range of 32 I/O ports, even though some chips appear set up to decode a range of 64. With this fix, it loads and runs correctly.
This commit is contained in:
parent
b0d8e5b388
commit
2333afc31e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=124454
@ -1069,7 +1069,8 @@ ndis_register_ioport(offset, adapter, port, numports)
|
||||
if (sc->ndis_res_io == NULL)
|
||||
return(NDIS_STATUS_FAILURE);
|
||||
|
||||
if (rman_get_size(sc->ndis_res_io) != numports)
|
||||
/* Don't let the device map more ports than we have. */
|
||||
if (rman_get_size(sc->ndis_res_io) < numports)
|
||||
return(NDIS_STATUS_INVALID_LENGTH);
|
||||
|
||||
*offset = (void *)rman_get_start(sc->ndis_res_io);
|
||||
|
Loading…
Reference in New Issue
Block a user