|
@@ -302,7 +302,7 @@ static int hunt_rom ( void ) {
|
302
|
302
|
/* If we are not a PCI device, we cannot search for a ROM that
|
303
|
303
|
* matches us (?)
|
304
|
304
|
*/
|
305
|
|
- if ( ! undi.pci->vendor )
|
|
305
|
+ if ( ! undi.pci->vendor_id )
|
306
|
306
|
return 0;
|
307
|
307
|
|
308
|
308
|
printf ( "Hunting for ROMs..." );
|
|
@@ -327,11 +327,11 @@ static int hunt_rom ( void ) {
|
327
|
327
|
}
|
328
|
328
|
printf ( "PCI:%hx:%hx...", pcir_header->vendor_id,
|
329
|
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
|
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
|
335
|
continue;
|
336
|
336
|
}
|
337
|
337
|
if ( undi.rom->pnp_off == 0 ) {
|
|
@@ -661,7 +661,7 @@ static void nontrivial_irq_debug ( irq_t irq ) {
|
661
|
661
|
static int undi_loader ( void ) {
|
662
|
662
|
pxe_t *pxe = NULL;
|
663
|
663
|
|
664
|
|
- if ( ! undi.pci->vendor ) {
|
|
664
|
+ if ( ! undi.pci->vendor_id ) {
|
665
|
665
|
printf ( "ERROR: attempted to call loader of an ISA ROM?\n" );
|
666
|
666
|
return 0;
|
667
|
667
|
}
|
|
@@ -1331,7 +1331,8 @@ static void undi_transmit(
|
1331
|
1331
|
/**************************************************************************
|
1332
|
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
|
1336
|
undi_full_shutdown();
|
1336
|
1337
|
free_base_mem_data();
|
1337
|
1338
|
}
|
|
@@ -1369,14 +1370,12 @@ static struct nic_operations undi_operations = {
|
1369
|
1370
|
.poll = undi_poll,
|
1370
|
1371
|
.transmit = undi_transmit,
|
1371
|
1372
|
.irq = dummy_irq,
|
1372
|
|
- .disable = undi_disable,
|
1373
|
1373
|
};
|
1374
|
1374
|
|
1375
|
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
|
1380
|
/* Zero out global undi structure */
|
1382
|
1381
|
memset ( &undi, 0, sizeof(undi) );
|
|
@@ -1434,7 +1433,7 @@ static int undi_probe ( struct dev *dev, struct pci_device *pci ) {
|
1434
|
1433
|
nic->nic_op = &undi_operations;
|
1435
|
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
|
1437
|
return 0;
|
1439
|
1438
|
}
|
1440
|
1439
|
|
|
@@ -1448,8 +1447,9 @@ static struct pci_id undi_nics[] = {
|
1448
|
1447
|
};
|
1449
|
1448
|
|
1450
|
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
|
1455
|
#endif /* PCBIOS */
|