Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' of rom.etherboot.org:/pub/scm/gpxe
  • Loading branch information
Michael Brown committed Dec 15, 2007
2 parents 5172d7b + bd26073 commit 7e8624a
Show file tree
Hide file tree
Showing 30 changed files with 238 additions and 51 deletions.
14 changes: 12 additions & 2 deletions src/drivers/net/3c509-eisa.c
Expand Up @@ -15,9 +15,11 @@
*/
static int el3_eisa_probe ( struct nic *nic, struct eisa_device *eisa ) {

enable_eisa_device ( eisa );
eisa_fill_nic ( nic, eisa );

nic->ioaddr = eisa->ioaddr;
nic->irqno = 0;
enable_eisa_device ( eisa );

/* Hand off to generic t5x9 probe routine */
return t5x9_probe ( nic, ISA_PROD_ID ( PROD_ID ), ISA_PROD_ID_MASK );
}
Expand All @@ -37,3 +39,11 @@ DRIVER ( "3c509 (EISA)", nic_driver, eisa_driver, el3_eisa_driver,
el3_eisa_probe, el3_eisa_disable );

ISA_ROM ( "3c509-eisa","3c509 (EISA)" );

/*
* Local variables:
* c-basic-offset: 8
* c-indent-level: 8
* tab-width: 8
* End:
*/
2 changes: 0 additions & 2 deletions src/drivers/net/3c515.c
Expand Up @@ -614,8 +614,6 @@ static int t515_probe ( struct nic *nic, struct isapnp_device *isapnp ) {

/* Direct copy from Beckers 3c515.c removing any ISAPNP sections */

isapnp_fill_nic ( nic, isapnp );

nic->ioaddr = isapnp->ioaddr;
nic->irqno = isapnp->irqno;
activate_isapnp_device ( isapnp );
Expand Down
9 changes: 8 additions & 1 deletion src/drivers/net/3c529.c
Expand Up @@ -23,7 +23,6 @@
static int t529_probe ( struct nic *nic, struct mca_device *mca ) {

/* Retrieve NIC parameters from MCA device parameters */
mca_fill_nic ( nic, mca );
nic->ioaddr = ( ( mca->pos[4] & 0xfc ) | 0x02 ) << 8;
nic->irqno = mca->pos[5] & 0x0f;
printf ( "3c529 board found on MCA at %#hx IRQ %d -",
Expand Down Expand Up @@ -51,3 +50,11 @@ DRIVER ( "3c529", nic_driver, mca_driver, t529_driver,
t529_probe, t529_disable );

ISA_ROM( "3c529", "3c529 == MCA 3c509" );

/*
* Local variables:
* c-basic-offset: 8
* c-indent-level: 8
* tab-width: 8
* End:
*/
4 changes: 2 additions & 2 deletions src/drivers/net/3c595.c
Expand Up @@ -479,7 +479,6 @@ static int t595_probe ( struct nic *nic, struct pci_device *pci ) {
eth_nic_base = pci->ioaddr;

nic->irqno = 0;
pci_fill_nic ( nic, pci );
nic->ioaddr = pci->ioaddr;

GO_WINDOW(0);
Expand Down Expand Up @@ -547,6 +546,7 @@ DRIVER ( "3C595", nic_driver, pci_driver, t595_driver,
/*
* Local variables:
* c-basic-offset: 8
* c-indent-level: 8
* tab-width: 8
* End:
*/

10 changes: 8 additions & 2 deletions src/drivers/net/3c90x.c
Expand Up @@ -713,8 +713,6 @@ static int a3c90x_probe ( struct nic *nic, struct pci_device *pci ) {

adjust_pci_device(pci);

pci_fill_nic ( nic, pci );

nic->ioaddr = pci->ioaddr;
nic->irqno = 0;

Expand Down Expand Up @@ -1016,3 +1014,11 @@ PCI_DRIVER ( a3c90x_driver, a3c90x_nics, PCI_NO_CLASS );

DRIVER ( "3C90X", nic_driver, pci_driver, a3c90x_driver,
a3c90x_probe, a3c90x_disable );

/*
* Local variables:
* c-basic-offset: 8
* c-indent-level: 8
* tab-width: 8
* End:
*/
11 changes: 10 additions & 1 deletion src/drivers/net/amd8111e.c
Expand Up @@ -653,7 +653,8 @@ static int amd8111e_probe(struct nic *nic, struct pci_device *pdev)
struct amd8111e_priv *lp = &amd8111e;
unsigned long mmio_start, mmio_len;

pci_fill_nic ( nic, pdev );
nic->ioaddr = pdev->ioaddr;
nic->irqno = pdev->irq;

mmio_start = pci_bar_start(pdev, PCI_BASE_ADDRESS_0);
mmio_len = pci_bar_size(pdev, PCI_BASE_ADDRESS_0);
Expand Down Expand Up @@ -681,3 +682,11 @@ PCI_DRIVER ( amd8111e_driver, amd8111e_nics, PCI_NO_CLASS );

DRIVER ( "AMD8111E", nic_driver, pci_driver, amd8111e_driver,
amd8111e_probe, amd8111e_disable );

/*
* Local variables:
* c-basic-offset: 8
* c-indent-level: 8
* tab-width: 8
* End:
*/
9 changes: 5 additions & 4 deletions src/drivers/net/cs89x0.c
Expand Up @@ -477,14 +477,12 @@ static int cs89x0_probe_addr ( isa_probe_addr_t ioaddr ) {
return 1;
}

static int cs89x0_probe ( struct nic *nic, struct isa_device *isa ) {
static int cs89x0_probe ( struct nic *nic, struct isa_device *isa __unused ) {
int i, result = -1;
unsigned rev_type = 0, isa_cnf, cs_revision;
unsigned short eeprom_buff[CHKSUM_LEN];

isa_fill_nic ( nic, isa );
nic->ioaddr &= ~1; /* LSB = 1 indicates a more aggressive probe */

eth_nic_base = nic->ioaddr;

/* get the chip type */
Expand Down Expand Up @@ -552,6 +550,8 @@ static int cs89x0_probe ( struct nic *nic, struct isa_device *isa ) {
else printf("\ncs: BUG: isa_config is %d\n", i); }
eth_irqno = i; }

nic->irqno = eth_irqno;

/* Retrieve and print the ethernet address. */
for (i=0; i<ETH_ALEN; i++) {
nic->node_addr[i] = ((unsigned char *)eeprom_buff)[i];
Expand Down Expand Up @@ -712,6 +712,7 @@ ISA_ROM ( "cs89x0", "Crystal Semiconductor CS89x0" );
/*
* Local variables:
* c-basic-offset: 8
* c-indent-level: 8
* tab-width: 8
* End:
*/

11 changes: 10 additions & 1 deletion src/drivers/net/davicom.c
Expand Up @@ -666,7 +666,8 @@ static int davicom_probe ( struct nic *nic, struct pci_device *pci ) {
dev_id = pci->device;
ioaddr = pci->ioaddr;

pci_fill_nic ( nic, pci );
nic->ioaddr = pci->ioaddr;
nic->irqno = 0;

/* wakeup chip */
pci_write_config_dword(pci, 0x40, 0x00000000);
Expand Down Expand Up @@ -714,3 +715,11 @@ PCI_DRIVER ( davicom_driver, davicom_nics, PCI_NO_CLASS );

DRIVER ( "DAVICOM", nic_driver, pci_driver, davicom_driver,
davicom_probe, davicom_disable );

/*
* Local variables:
* c-basic-offset: 8
* c-indent-level: 8
* tab-width: 8
* End:
*/
9 changes: 8 additions & 1 deletion src/drivers/net/depca.c
Expand Up @@ -742,7 +742,6 @@ static int depca_probe ( struct nic *nic, struct isa_device *isa ) {
long sum, chksum;

nic->irqno = 0;
isa_fill_nic ( nic, isa );
nic->ioaddr = isa->ioaddr;

for (i = 0, j = 0, sum = 0; j < 3; j++) {
Expand Down Expand Up @@ -794,3 +793,11 @@ DRIVER ( "depce", nic_driver, isa_driver, depca_driver,
ISA_ROM ( "depca", "Digital DE100 and DE200" );

#endif

/*
* Local variables:
* c-basic-offset: 8
* c-indent-level: 8
* tab-width: 8
* End:
*/
9 changes: 8 additions & 1 deletion src/drivers/net/dmfe.c
Expand Up @@ -496,7 +496,6 @@ static int dmfe_probe ( struct nic *nic, struct pci_device *pci ) {
dmfe_reset(nic);

nic->irqno = 0;
pci_fill_nic ( nic, pci );
nic->ioaddr = pci->ioaddr;

/* point to NIC specific routines */
Expand Down Expand Up @@ -1216,3 +1215,11 @@ PCI_DRIVER ( dmfe_driver, dmfe_nics, PCI_NO_CLASS );

DRIVER ( "DMFE/PCI", nic_driver, pci_driver, dmfe_driver,
dmfe_probe, dmfe_disable );

/*
* Local variables:
* c-basic-offset: 8
* c-indent-level: 8
* tab-width: 8
* End:
*/
4 changes: 2 additions & 2 deletions src/drivers/net/e1000/e1000.c
Expand Up @@ -728,10 +728,10 @@ e1000_irq ( struct net_device *netdev, int enable )

switch ( enable ) {
case 0 :
e1000_irq_enable ( adapter );
e1000_irq_disable ( adapter );
break;
case 1 :
e1000_irq_disable ( adapter );
e1000_irq_enable ( adapter );
break;
case 2 :
e1000_irq_force ( adapter );
Expand Down
9 changes: 8 additions & 1 deletion src/drivers/net/eepro.c
Expand Up @@ -562,7 +562,6 @@ static int eepro_probe ( struct nic *nic, struct isa_device *isa ) {
const char *name;

nic->irqno = 0;
isa_fill_nic ( nic, isa );
nic->ioaddr = isa->ioaddr;

station_addr.saddr[2] = read_eeprom(nic->ioaddr,2);
Expand Down Expand Up @@ -627,3 +626,11 @@ DRIVER ( "eepro", nic_driver, isa_driver, eepro_driver,
eepro_probe, eepro_disable );

ISA_ROM ( "eepro", "Intel Etherexpress Pro/10" );

/*
* Local variables:
* c-basic-offset: 8
* c-indent-level: 8
* tab-width: 8
* End:
*/
20 changes: 16 additions & 4 deletions src/drivers/net/eepro100.c
Expand Up @@ -599,7 +599,7 @@ static void eepro100_disable ( struct nic *nic __unused ) {
* leaves the 82557 initialized, and ready to recieve packets.
*/

static int eepro100_probe ( struct nic *nic, struct pci_device *p ) {
static int eepro100_probe ( struct nic *nic, struct pci_device *pci ) {

unsigned short sum = 0;
int i;
Expand All @@ -611,10 +611,14 @@ static int eepro100_probe ( struct nic *nic, struct pci_device *p ) {
be careful not to access beyond this array */
unsigned short eeprom[16];

if (p->ioaddr == 0)
if (pci->ioaddr == 0)
return 0;
pci_fill_nic ( nic, p );
adjust_pci_device(p);

adjust_pci_device(pci);

nic->ioaddr = pci->ioaddr;
nic->irqno = pci->irq;

ioaddr = nic->ioaddr;

if ((do_eeprom_cmd(EE_READ_CMD << 24, 27) & 0xffe0000)
Expand Down Expand Up @@ -834,3 +838,11 @@ PCI_DRIVER ( eepro100_driver, eepro100_nics, PCI_NO_CLASS );

DRIVER ( "EEPRO100", nic_driver, pci_driver, eepro100_driver,
eepro100_probe, eepro100_disable );

/*
* Local variables:
* c-basic-offset: 8
* c-indent-level: 8
* tab-width: 8
* End:
*/
10 changes: 9 additions & 1 deletion src/drivers/net/epic100.c
Expand Up @@ -120,8 +120,8 @@ epic100_probe ( struct nic *nic, struct pci_device *pci ) {
Epic cards in slot order. */

ioaddr = pci->ioaddr;

nic->irqno = 0;
pci_fill_nic ( nic, pci );
nic->ioaddr = pci->ioaddr & ~3;

/* compute all used static epic100 registers address */
Expand Down Expand Up @@ -525,3 +525,11 @@ PCI_DRIVER ( epic100_driver, epic100_nics, PCI_NO_CLASS );

DRIVER ( "EPIC100", nic_driver, pci_driver, epic100_driver,
epic100_probe, epic100_disable );

/*
* Local variables:
* c-basic-offset: 8
* c-indent-level: 8
* tab-width: 8
* End:
*/
11 changes: 10 additions & 1 deletion src/drivers/net/forcedeth.c
Expand Up @@ -1248,7 +1248,8 @@ static int forcedeth_probe ( struct nic *nic, struct pci_device *pci ) {
printf("forcedeth.c: Found %s, vendor=0x%hX, device=0x%hX\n",
pci->driver_name, pci->vendor, pci->device);

pci_fill_nic ( nic, pci );
nic->ioaddr = pci->ioaddr;
nic->irqno = 0;

/* point to private storage */
np = &npx;
Expand Down Expand Up @@ -1426,3 +1427,11 @@ PCI_DRIVER ( forcedeth_driver, forcedeth_nics, PCI_NO_CLASS );

DRIVER ( "forcedeth", nic_driver, pci_driver, forcedeth_driver,
forcedeth_probe, forcedeth_disable );

/*
* Local variables:
* c-basic-offset: 8
* c-indent-level: 8
* tab-width: 8
* End:
*/
4 changes: 3 additions & 1 deletion src/drivers/net/mtd80x.c
Expand Up @@ -674,9 +674,11 @@ static int mtd_probe ( struct nic *nic, struct pci_device *pci ) {
if (pci->ioaddr == 0)
return 0;

pci_fill_nic ( nic, pci );
adjust_pci_device(pci);

nic->ioaddr = pci->ioaddr;
nic->irqno = 0;

mtdx.nic_name = pci->driver_name;
mtdx.dev_id = pci->device;
mtdx.ioaddr = nic->ioaddr;
Expand Down
9 changes: 8 additions & 1 deletion src/drivers/net/ns83820.c
Expand Up @@ -837,7 +837,6 @@ static int ns83820_probe ( struct nic *nic, struct pci_device *pci ) {
return 0;

nic->irqno = 0;
pci_fill_nic ( nic, pci );
nic->ioaddr = pci->ioaddr & ~3;

/* disable interrupts */
Expand Down Expand Up @@ -1003,3 +1002,11 @@ static int ns83820_probe ( struct nic *nic, struct pci_device *pci ) {

DRIVER ( "NS83820/PCI", nic_driver, pci_driver, ns83820_driver,
ns83820_probe, ns83820_disable );

/*
* Local variables:
* c-basic-offset: 8
* c-indent-level: 8
* tab-width: 8
* End:
*/
7 changes: 4 additions & 3 deletions src/drivers/net/ns8390.c
Expand Up @@ -1018,11 +1018,12 @@ DRIVER ( "NE2000/PCI", nic_driver, pci_driver, nepci_driver,

#endif /* INCLUDE_NS8390 */

#endif

/*
* Local variables:
* c-basic-offset: 8
* c-indent-level: 8
* tab-width: 8
* End:
*/


#endif
9 changes: 8 additions & 1 deletion src/drivers/net/pcnet32.c
Expand Up @@ -681,7 +681,6 @@ static int pcnet32_probe ( struct nic *nic, struct pci_device *pci ) {
pci->driver_name, pci->vendor, pci->device);

nic->irqno = 0;
pci_fill_nic ( nic, pci );
nic->ioaddr = pci->ioaddr & ~3;

/* reset the chip */
Expand Down Expand Up @@ -1017,3 +1016,11 @@ PCI_DRIVER ( pcnet32_driver, pcnet32_nics, PCI_NO_CLASS );

DRIVER ( "PCNET32/PCI", nic_driver, pci_driver, pcnet32_driver,
pcnet32_probe, pcnet32_disable );

/*
* Local variables:
* c-basic-offset: 8
* c-indent-level: 8
* tab-width: 8
* End:
*/

0 comments on commit 7e8624a

Please sign in to comment.