Ejemplo n.º 1
0
static int __init myri_sbus_probe(void)
{
	struct net_device *dev = NULL;
	struct sbus_bus *bus;
	struct sbus_dev *sdev = 0;
	static int called = 0;
	int cards = 0, v;

#ifdef MODULE
	root_myri_dev = NULL;
#endif

	if (called)
		return -ENODEV;
	called++;

	for_each_sbus(bus) {
		for_each_sbusdev(sdev, bus) {
			if (cards)
				dev = NULL;
			if (myri_sbus_match(sdev)) {
				cards++;
				DET(("Found myricom myrinet as %s\n", sdev->prom_name));
				if ((v = myri_ether_init(dev, sdev, (cards - 1))))
					return v;
			}
		}
	}
	if (!cards)
		return -ENODEV;
	return 0;
}
Ejemplo n.º 2
0
static int __devinit myri_sbus_probe(struct of_device *dev, const struct of_device_id *match)
{
	struct sbus_dev *sdev = to_sbus_device(&dev->dev);

	return myri_ether_init(sdev);
}