1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-20 02:38:43 +00:00

Don't detect an EISA bus unless we see a "card" there somewhere. An EISA

motherboard will have a card for the "motherboard" on slot 0.
 eisa0: <EISA bus> on motherboard
 mainboard0: <ASU5101 (System Board)> at slot 0 on eisa0
This should stop the probe "detecting" an EISA bus everywhere that has
a 'controller eisa0' line regardless of whether it's really there.
This commit is contained in:
Peter Wemm 1999-05-18 21:03:30 +00:00
parent 8dc26439da
commit ab25d374b2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=47308
2 changed files with 20 additions and 4 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.42 1999/05/06 22:17:26 peter Exp $
* $Id: eisaconf.c,v 1.43 1999/05/08 21:59:20 dfr Exp $
*/
#include "opt_eisa.h"
@ -149,6 +149,7 @@ eisa_probe(device_t dev)
struct eisa_device *e_dev;
int eisaBase = 0xc80;
eisa_id_t eisa_id;
int devices_found = 0;
device_set_desc(dev, "EISA bus");
@ -162,6 +163,8 @@ eisa_probe(device_t dev)
if (eisa_id & 0x80000000)
continue; /* no EISA card in slot */
devices_found++;
/* Prepare an eisa_device_node for this slot */
e_dev = (struct eisa_device *)malloc(sizeof(*e_dev),
M_DEVBUF, M_NOWAIT);
@ -183,7 +186,12 @@ eisa_probe(device_t dev)
device_add_child(dev, NULL, -1, e_dev);
}
return 0;
/*
* EISA busses themselves are not easily detectable, the easiest way
* to tell if there is an eisa bus is if we found something - there
* should be a motherboard "card" there somewhere.
*/
return devices_found ? 0 : ENXIO;
}
static void

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.42 1999/05/06 22:17:26 peter Exp $
* $Id: eisaconf.c,v 1.43 1999/05/08 21:59:20 dfr Exp $
*/
#include "opt_eisa.h"
@ -149,6 +149,7 @@ eisa_probe(device_t dev)
struct eisa_device *e_dev;
int eisaBase = 0xc80;
eisa_id_t eisa_id;
int devices_found = 0;
device_set_desc(dev, "EISA bus");
@ -162,6 +163,8 @@ eisa_probe(device_t dev)
if (eisa_id & 0x80000000)
continue; /* no EISA card in slot */
devices_found++;
/* Prepare an eisa_device_node for this slot */
e_dev = (struct eisa_device *)malloc(sizeof(*e_dev),
M_DEVBUF, M_NOWAIT);
@ -183,7 +186,12 @@ eisa_probe(device_t dev)
device_add_child(dev, NULL, -1, e_dev);
}
return 0;
/*
* EISA busses themselves are not easily detectable, the easiest way
* to tell if there is an eisa bus is if we found something - there
* should be a motherboard "card" there somewhere.
*/
return devices_found ? 0 : ENXIO;
}
static void