mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
Yet another case of resources:
+ * 9: 0x3f0-0x3f3,0x3f4-0x3f5,0x3f7 This requires only one change to support. Rather than keying on the size of the resource being 2, instead key off the end & 7 being 3. This covers the same cases that the size of 2 would catch, but also covers the new above case. In addition, I think it is clearer to use the end in preference to the size and start for case #8 as well. Turns two tests into one, and catches no other cases. Make minor commentary changes to deal with new case #9. # This change is specifically minimal to allow easy MFC. A more # extensive change will go into current once I've had a chance to test # it on a lot of hardware...
This commit is contained in:
parent
04e67b43ff
commit
534e7194f8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=136138
@ -82,6 +82,7 @@ fdc_isa_alloc_resources(device_t dev, struct fdc_data *fdc)
|
||||
* 6: 0x3f2-0x3f3,0x3f4-0x3f5,0x3f7 # becoming common
|
||||
* 7: 0x3f2-0x3f3,0x3f4-0x3f5 # rare
|
||||
* 8: 0x3f0-0x3f1,0x3f2-0x3f3,0x3f4-0x3f5,0x3f7
|
||||
* 9: 0x3f0-0x3f3,0x3f4-0x3f5,0x3f7
|
||||
*
|
||||
* The following code is generic for any value of 0x3fx :-)
|
||||
*/
|
||||
@ -99,8 +100,7 @@ fdc_isa_alloc_resources(device_t dev, struct fdc_data *fdc)
|
||||
nports);
|
||||
return (ENXIO);
|
||||
}
|
||||
if ((rman_get_start(fdc->res_ioport) & 0x7) == 0 &&
|
||||
rman_get_size(fdc->res_ioport) == 2) {
|
||||
if ((rman_get_end(fdc->res_ioport) & 0x7) == 1) {
|
||||
/* Case 8 */
|
||||
bus_release_resource(dev, SYS_RES_IOPORT, fdc->rid_ioport,
|
||||
fdc->res_ioport);
|
||||
@ -116,9 +116,9 @@ fdc_isa_alloc_resources(device_t dev, struct fdc_data *fdc)
|
||||
fdc->port_off = -(fdc->porth & 0x7);
|
||||
|
||||
/*
|
||||
* Deal with case 6, 7, and 8: FDSTS and FDSATA are in rid 1.
|
||||
* Deal with case 6-9: FDSTS and FDDATA.
|
||||
*/
|
||||
if (rman_get_size(fdc->res_ioport) == 2) {
|
||||
if ((rman_get_end(fdc->res_ioport) & 0x7) == 3) {
|
||||
fdc->rid_sts = fdc->rid_ioport + 1;
|
||||
fdc->res_sts = bus_alloc_resource_any(dev, SYS_RES_IOPORT,
|
||||
&fdc->rid_sts, RF_ACTIVE);
|
||||
|
Loading…
Reference in New Issue
Block a user