Browse Source

Add dummy_connect and dummy_irq

tags/v0.9.3
Michael Brown 19 years ago
parent
commit
d9f34bfdfc
2 changed files with 18 additions and 4 deletions
  1. 16
    4
      src/core/nic.c
  2. 2
    0
      src/include/nic.h

+ 16
- 4
src/core/nic.c View File

257
 #endif
257
 #endif
258
 	if (!server_found) {
258
 	if (!server_found) {
259
 		printf("No Server found\n");
259
 		printf("No Server found\n");
260
-		longjmp(restart_etherboot, -1);
260
+		return 0;
261
 	}
261
 	}
262
-	return 0;
262
+	return 1;
263
 }
263
 }
264
 
264
 
265
 
265
 
312
 		printf("No filename\n");
312
 		printf("No filename\n");
313
 	}
313
 	}
314
 	interruptible_sleep(2);		/* lay off the server for a while */
314
 	interruptible_sleep(2);		/* lay off the server for a while */
315
-	longjmp(restart_etherboot, -1);
315
+	return 0;
316
 }
316
 }
317
 
317
 
318
 
318
 
329
 	nic->nic_op->disable ( nic );
329
 	nic->nic_op->disable ( nic );
330
 }
330
 }
331
 
331
 
332
+static void nic_print_info ( struct dev *dev ) {
333
+	struct nic *nic = &dev->nic;
334
+
335
+	printf ( "Found %s NIC (MAC %!)\n", dev->name, nic->node_addr );
336
+}
337
+
332
 /* 
338
 /* 
333
  * Device operations tables
339
  * Device operations tables
334
  *
340
  *
335
  */
341
  */
336
 static struct dev_operations nic_operations = {
342
 static struct dev_operations nic_operations = {
337
 	.disable = nic_disable,
343
 	.disable = nic_disable,
344
+	.print_info = nic_print_info,
338
 	.load_configuration = nic_load_configuration,
345
 	.load_configuration = nic_load_configuration,
339
 	.load = nic_load,
346
 	.load = nic_load,
340
 };
347
 };
363
 
370
 
364
 
371
 
365
 
372
 
373
+int dummy_connect ( struct nic *nic ) {
374
+	return 1;
375
+}
366
 
376
 
367
-
377
+int dummy_irq ( struct nic *nic ) {
378
+	return 1;
379
+}
368
 
380
 
369
 /**************************************************************************
381
 /**************************************************************************
370
 DEFAULT_NETMASK - Return default netmask for IP address
382
 DEFAULT_NETMASK - Return default netmask for IP address

+ 2
- 0
src/include/nic.h View File

44
  */
44
  */
45
 struct dev;
45
 struct dev;
46
 extern struct nic * nic_device ( struct dev * dev );
46
 extern struct nic * nic_device ( struct dev * dev );
47
+extern int dummy_connect ( struct nic *nic );
48
+extern int dummy_irq ( struct nic *nic );
47
 
49
 
48
 /*
50
 /*
49
  * Functions that implicitly operate on the current boot device
51
  * Functions that implicitly operate on the current boot device

Loading…
Cancel
Save