undirom.h File Reference

UNDI expansion ROMs. More...

#include <pxe_types.h>

Go to the source code of this file.

Data Structures

struct  undi_pci_device_id
 An UNDI PCI device ID. More...
union  undi_device_id
 An UNDI device ID. More...
struct  undi_rom
 An UNDI ROM. More...

Functions

 FILE_LICENCE (GPL2_OR_LATER)
struct undi_romundirom_find_pci (unsigned int vendor_id, unsigned int device_id, unsigned int rombase)
 Find UNDI ROM for PCI device.


Detailed Description

UNDI expansion ROMs.

Definition in file undirom.h.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER   ) 

struct undi_rom* undirom_find_pci ( unsigned int  vendor_id,
unsigned int  device_id,
unsigned int  rombase 
) [read]

Find UNDI ROM for PCI device.

Parameters:
vendor_id PCI vendor ID
device_id PCI device ID
rombase ROM base address, or 0 for any
Return values:
undirom UNDI ROM, or NULL

Definition at line 210 of file undirom.c.

References undi_rom::bus_id, undi_rom::bus_type, DBG, DBGC, undi_pci_device_id::device_id, undi_rom::list, list_for_each_entry, NULL, undi_device_id::pci, PCI_NIC, undi_rom::rom_segment, undirom_probe_all_roms(), and undi_pci_device_id::vendor_id.

Referenced by undipci_find_rom().

00212                                                             {
00213         struct undi_rom *undirom;
00214 
00215         undirom_probe_all_roms();
00216 
00217         list_for_each_entry ( undirom, &undiroms, list ) {
00218                 if ( undirom->bus_type != PCI_NIC )
00219                         continue;
00220                 if ( undirom->bus_id.pci.vendor_id != vendor_id )
00221                         continue;
00222                 if ( undirom->bus_id.pci.device_id != device_id )
00223                         continue;
00224                 if ( rombase && ( ( undirom->rom_segment << 4 ) != rombase ) )
00225                         continue;
00226                 DBGC ( undirom, "UNDIROM %p matched PCI %04x:%04x (%08x)\n",
00227                        undirom, vendor_id, device_id, rombase );
00228                 return undirom;
00229         }
00230 
00231         DBG ( "No UNDI ROM matched PCI %04x:%04x (%08x)\n",
00232               vendor_id, device_id, rombase );
00233         return NULL;
00234 }


Generated on Tue Apr 6 20:01:13 2010 for gPXE by  doxygen 1.5.7.1