Browse Source

Coerced into compiling.

tags/v0.9.3
Michael Brown 20 years ago
parent
commit
dbea213c27
1 changed files with 13 additions and 13 deletions
  1. 13
    13
      src/arch/i386/drivers/net/undi.c

+ 13
- 13
src/arch/i386/drivers/net/undi.c View File

302
 	/* If we are not a PCI device, we cannot search for a ROM that
302
 	/* If we are not a PCI device, we cannot search for a ROM that
303
 	 * matches us (?)
303
 	 * matches us (?)
304
 	 */
304
 	 */
305
-	if ( ! undi.pci->vendor )
305
+	if ( ! undi.pci->vendor_id )
306
 		return 0;
306
 		return 0;
307
 
307
 
308
 	printf ( "Hunting for ROMs..." );
308
 	printf ( "Hunting for ROMs..." );
327
 			}
327
 			}
328
 			printf ( "PCI:%hx:%hx...", pcir_header->vendor_id,
328
 			printf ( "PCI:%hx:%hx...", pcir_header->vendor_id,
329
 				 pcir_header->device_id );
329
 				 pcir_header->device_id );
330
-			if ( ( pcir_header->vendor_id != undi.pci->vendor ) ||
331
-			     ( pcir_header->device_id != undi.pci->dev_id ) ) {
330
+			if ( (pcir_header->vendor_id != undi.pci->vendor_id) ||
331
+			     (pcir_header->device_id != undi.pci->device_id) ){
332
 				printf ( "not me (%hx:%hx)\n...",
332
 				printf ( "not me (%hx:%hx)\n...",
333
-					 undi.pci->vendor,
334
-					 undi.pci->dev_id );
333
+					 undi.pci->vendor_id,
334
+					 undi.pci->device_id );
335
 				continue;
335
 				continue;
336
 			}
336
 			}
337
 			if ( undi.rom->pnp_off == 0 ) {
337
 			if ( undi.rom->pnp_off == 0 ) {
661
 static int undi_loader ( void ) {
661
 static int undi_loader ( void ) {
662
 	pxe_t *pxe = NULL;
662
 	pxe_t *pxe = NULL;
663
 
663
 
664
-	if ( ! undi.pci->vendor ) {
664
+	if ( ! undi.pci->vendor_id ) {
665
 		printf ( "ERROR: attempted to call loader of an ISA ROM?\n" );
665
 		printf ( "ERROR: attempted to call loader of an ISA ROM?\n" );
666
 		return 0;
666
 		return 0;
667
 	}
667
 	}
1331
 /**************************************************************************
1331
 /**************************************************************************
1332
 DISABLE - Turn off ethernet interface
1332
 DISABLE - Turn off ethernet interface
1333
 ***************************************************************************/
1333
 ***************************************************************************/
1334
-static void undi_disable ( struct nic *nic __unused ) {
1334
+static void undi_disable ( struct nic *nic __unused,
1335
+			   struct pci_device *pci __unused ) {
1335
 	undi_full_shutdown();
1336
 	undi_full_shutdown();
1336
 	free_base_mem_data();
1337
 	free_base_mem_data();
1337
 }
1338
 }
1369
 	.poll = undi_poll,
1370
 	.poll = undi_poll,
1370
 	.transmit = undi_transmit,
1371
 	.transmit = undi_transmit,
1371
 	.irq = dummy_irq,
1372
 	.irq = dummy_irq,
1372
-	.disable = undi_disable,
1373
 };
1373
 };
1374
 
1374
 
1375
 /* The actual Etherboot probe routine.
1375
 /* The actual Etherboot probe routine.
1376
  */
1376
  */
1377
 
1377
 
1378
-static int undi_probe ( struct dev *dev, struct pci_device *pci ) {
1379
-	struct nic *nic = nic_device ( dev );
1378
+static int undi_probe ( struct nic *nic, struct pci_device *pci ) {
1380
 
1379
 
1381
 	/* Zero out global undi structure */
1380
 	/* Zero out global undi structure */
1382
 	memset ( &undi, 0, sizeof(undi) );
1381
 	memset ( &undi, 0, sizeof(undi) );
1434
 		nic->nic_op = &undi_operations;
1433
 		nic->nic_op = &undi_operations;
1435
 		return 1;
1434
 		return 1;
1436
 	}
1435
 	}
1437
-	undi_disable ( nic ); /* To free base memory structures */
1436
+	undi_disable ( nic, pci ); /* To free base memory structures */
1438
 	return 0;
1437
 	return 0;
1439
 }
1438
 }
1440
 
1439
 
1448
 };
1447
 };
1449
 
1448
 
1450
 static struct pci_driver undi_driver =
1449
 static struct pci_driver undi_driver =
1451
-	PCI_DRIVER ( "UNDI", undi_nics, PCI_CLASS_NETWORK_ETHERNET );
1450
+	PCI_DRIVER ( undi_nics, PCI_CLASS_NETWORK_ETHERNET );
1452
 
1451
 
1453
-BOOT_DRIVER ( "UNDI", find_pci_boot_device, undi_driver, undi_probe );
1452
+DRIVER ( "UNDI", nic_driver, pci_driver, undi_driver,
1453
+	 undi_probe, undi_disable );
1454
 
1454
 
1455
 #endif /* PCBIOS */
1455
 #endif /* PCBIOS */

Loading…
Cancel
Save