Fix a [start,end] vs [start,count] botch that corrupted the resource

manager and prevented IOPort allocation beyond the first EISA slot from
working.  subr_rman.c should have trapped this on the way into the system
rather than tripping over the wreckage.

Head banged into wall repeatedly by:  "Matthew N. Dodd" <winter@jurai.net>
This commit is contained in:
Peter Wemm 1999-05-24 03:08:46 +00:00
parent 5095f1917a
commit 578de0426e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=47451
2 changed files with 6 additions and 6 deletions

View File

@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: eisaconf.c,v 1.43 1999/05/08 21:59:20 dfr Exp $
* $Id: eisaconf.c,v 1.44 1999/05/18 21:03:30 peter Exp $
*/
#include "opt_eisa.h"
@ -310,7 +310,7 @@ eisa_alloc_resource(device_t dev, device_t child, int type, int *rid,
return 0;
start = resv->addr;
end = resv->size - 1;
end = resv->addr + (resv->size - 1);
count = resv->size;
rvp = &resv->res;
}
@ -325,7 +325,7 @@ eisa_alloc_resource(device_t dev, device_t child, int type, int *rid,
return 0;
start = resv->addr;
end = resv->size - 1;
end = resv->addr + (resv->size - 1);
count = resv->size;
rvp = &resv->res;
}

View File

@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: eisaconf.c,v 1.43 1999/05/08 21:59:20 dfr Exp $
* $Id: eisaconf.c,v 1.44 1999/05/18 21:03:30 peter Exp $
*/
#include "opt_eisa.h"
@ -310,7 +310,7 @@ eisa_alloc_resource(device_t dev, device_t child, int type, int *rid,
return 0;
start = resv->addr;
end = resv->size - 1;
end = resv->addr + (resv->size - 1);
count = resv->size;
rvp = &resv->res;
}
@ -325,7 +325,7 @@ eisa_alloc_resource(device_t dev, device_t child, int type, int *rid,
return 0;
start = resv->addr;
end = resv->size - 1;
end = resv->addr + (resv->size - 1);
count = resv->size;
rvp = &resv->res;
}