mirror of
https://github.com/ipxe/ipxe
synced 2026-01-31 19:49:50 +03:00
Updated to current API.
This commit is contained in:
@@ -13,26 +13,28 @@
|
|||||||
* The EISA probe function
|
* The EISA probe function
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static int el3_eisa_probe ( struct dev *dev, struct eisa_device *eisa ) {
|
static int el3_eisa_probe ( struct nic *nic, struct eisa_device *eisa ) {
|
||||||
struct nic *nic = nic_device ( dev );
|
|
||||||
|
|
||||||
enable_eisa_device ( eisa );
|
enable_eisa_device ( eisa );
|
||||||
nic->ioaddr = eisa->ioaddr;
|
eisa_fill_nic ( nic, eisa );
|
||||||
nic->irqno = 0;
|
|
||||||
printf ( "3C5x9 board on EISA at %#hx - ", nic->ioaddr );
|
|
||||||
|
|
||||||
/* Hand off to generic t5x9 probe routine */
|
/* Hand off to generic t5x9 probe routine */
|
||||||
return t5x9_probe ( nic, ISA_PROD_ID ( PROD_ID ), ISA_PROD_ID_MASK );
|
return t5x9_probe ( nic, ISA_PROD_ID ( PROD_ID ), ISA_PROD_ID_MASK );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void el3_eisa_disable ( struct nic *nic, struct eisa_device *eisa ) {
|
||||||
|
t5x9_disable ( nic );
|
||||||
|
disable_eisa_device ( eisa );
|
||||||
|
}
|
||||||
|
|
||||||
static struct eisa_id el3_eisa_adapters[] = {
|
static struct eisa_id el3_eisa_adapters[] = {
|
||||||
{ "3Com 3c509 EtherLink III (EISA)", MFG_ID, PROD_ID },
|
{ "3Com 3c509 EtherLink III (EISA)", MFG_ID, PROD_ID },
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct eisa_driver el3_eisa_driver =
|
static struct eisa_driver el3_eisa_driver =
|
||||||
EISA_DRIVER ( "3c509 (EISA)", el3_eisa_adapters );
|
EISA_DRIVER ( el3_eisa_adapters );
|
||||||
|
|
||||||
BOOT_DRIVER ( "3c509 (EISA)", find_eisa_boot_device, el3_eisa_driver,
|
DRIVER ( "3c509 (EISA)", nic_driver, eisa_driver, el3_eisa_driver,
|
||||||
el3_eisa_probe );
|
el3_eisa_probe, el3_eisa_disable );
|
||||||
|
|
||||||
ISA_ROM ( "3c509-eisa","3c509 (EISA)" );
|
ISA_ROM ( "3c509-eisa","3c509 (EISA)" );
|
||||||
|
|||||||
@@ -379,7 +379,7 @@
|
|||||||
*/
|
*/
|
||||||
extern int t5x9_probe ( struct nic *nic,
|
extern int t5x9_probe ( struct nic *nic,
|
||||||
uint16_t prod_id_check, uint16_t prod_id_mask );
|
uint16_t prod_id_check, uint16_t prod_id_mask );
|
||||||
|
extern void t5x9_disable ( struct nic *nic );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Local variables:
|
* Local variables:
|
||||||
|
|||||||
@@ -565,7 +565,8 @@ static void t515_transmit(struct nic *nic, const char *d, /* Destination */
|
|||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
DISABLE - Turn off ethernet interface
|
DISABLE - Turn off ethernet interface
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
static void t515_disable ( struct nic *nic, struct isapnp_device *isapnp __unused ) {
|
static void t515_disable ( struct nic *nic,
|
||||||
|
struct isapnp_device *isapnp ) {
|
||||||
|
|
||||||
nic_disable ( nic );
|
nic_disable ( nic );
|
||||||
|
|
||||||
@@ -586,12 +587,8 @@ static void t515_disable ( struct nic *nic, struct isapnp_device *isapnp __unuse
|
|||||||
|
|
||||||
|
|
||||||
outw(SetIntrEnb | 0x0000, nic->ioaddr + EL3_CMD);
|
outw(SetIntrEnb | 0x0000, nic->ioaddr + EL3_CMD);
|
||||||
#ifdef ISA_PNP
|
|
||||||
/*Deactivate */
|
deactivate_isapnp_device ( isapnp );
|
||||||
/* ACTIVATE;
|
|
||||||
WRITE_DATA(0);
|
|
||||||
*/
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -627,7 +624,7 @@ static int t515_probe ( struct nic *nic, struct isapnp_device *isapnp ) {
|
|||||||
|
|
||||||
nic->ioaddr = isapnp->ioaddr;
|
nic->ioaddr = isapnp->ioaddr;
|
||||||
nic->irqno = isapnp->irqno;
|
nic->irqno = isapnp->irqno;
|
||||||
activate_isapnp_device ( isapnp, 1 );
|
activate_isapnp_device ( isapnp );
|
||||||
|
|
||||||
/* Check the resource configuration for a matching ioaddr. */
|
/* Check the resource configuration for a matching ioaddr. */
|
||||||
if ((unsigned)(inw(nic->ioaddr + 0x2002) & 0x1f0)
|
if ((unsigned)(inw(nic->ioaddr + 0x2002) & 0x1f0)
|
||||||
|
|||||||
@@ -20,19 +20,23 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int t529_probe ( struct dev *dev, struct mca_device *mca ) {
|
static int t529_probe ( struct nic *nic, struct mca_device *mca ) {
|
||||||
struct nic *nic = nic_device ( dev );
|
|
||||||
|
|
||||||
/* Retrieve NIC parameters from MCA device parameters */
|
/* Retrieve NIC parameters from MCA device parameters */
|
||||||
|
mca_fill_nic ( nic, mca );
|
||||||
nic->ioaddr = ( ( mca->pos[4] & 0xfc ) | 0x02 ) << 8;
|
nic->ioaddr = ( ( mca->pos[4] & 0xfc ) | 0x02 ) << 8;
|
||||||
nic->irqno = mca->pos[5] & 0x0f;
|
nic->irqno = mca->pos[5] & 0x0f;
|
||||||
printf ( "%s board found on MCA at %#hx IRQ %d -",
|
printf ( "3c529 board found on MCA at %#hx IRQ %d -",
|
||||||
dev->name, nic->ioaddr, nic->irqno );
|
nic->ioaddr, nic->irqno );
|
||||||
|
|
||||||
/* Hand off to generic t5x9 probe routine */
|
/* Hand off to generic t5x9 probe routine */
|
||||||
return t5x9_probe ( nic, MCA_ID ( mca ), 0xffff );
|
return t5x9_probe ( nic, MCA_ID ( mca ), 0xffff );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int t529_disable ( struct nic *nic, struct mca_device *mca __unused ) {
|
||||||
|
t5x9_disable ( nic );
|
||||||
|
}
|
||||||
|
|
||||||
static struct mca_id el3_mca_adapters[] = {
|
static struct mca_id el3_mca_adapters[] = {
|
||||||
{ "3Com 3c529 EtherLink III (10base2)", 0x627c },
|
{ "3Com 3c529 EtherLink III (10base2)", 0x627c },
|
||||||
{ "3Com 3c529 EtherLink III (10baseT)", 0x627d },
|
{ "3Com 3c529 EtherLink III (10baseT)", 0x627d },
|
||||||
@@ -42,8 +46,9 @@ static struct mca_id el3_mca_adapters[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct mca_driver t529_driver
|
static struct mca_driver t529_driver
|
||||||
= MCA_DRIVER ( "3c529", el3_mca_adapters );
|
= MCA_DRIVER ( el3_mca_adapters );
|
||||||
|
|
||||||
BOOT_DRIVER ( "3c529", find_mca_boot_device, t529_driver, t529_probe );
|
DRIVER ( "3c529", nic_driver, mca_driver, t529_driver,
|
||||||
|
t529_probe, t529_disable );
|
||||||
|
|
||||||
ISA_ROM( "3c529", "3c529 == MCA 3c509" );
|
ISA_ROM( "3c529", "3c529 == MCA 3c509" );
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ static enum { none, bnc, utp } connector = none; /* for 3C509 */
|
|||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
ETH_RESET - Reset adapter
|
ETH_RESET - Reset adapter
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
static void t509_disable ( struct nic *nic ) {
|
void t5x9_disable ( struct nic *nic ) {
|
||||||
/* stop card */
|
/* stop card */
|
||||||
outw(RX_DISABLE, nic->ioaddr + EP_COMMAND);
|
outw(RX_DISABLE, nic->ioaddr + EP_COMMAND);
|
||||||
outw(RX_DISCARD_TOP_PACK, nic->ioaddr + EP_COMMAND);
|
outw(RX_DISCARD_TOP_PACK, nic->ioaddr + EP_COMMAND);
|
||||||
@@ -120,7 +120,7 @@ static void t509_enable ( struct nic *nic ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void t509_reset ( struct nic *nic ) {
|
static void t509_reset ( struct nic *nic ) {
|
||||||
t509_disable ( nic );
|
t5x9_disable ( nic );
|
||||||
t509_enable ( nic );
|
t509_enable ( nic );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -332,7 +332,6 @@ struct nic_operations t509_operations = {
|
|||||||
.poll = t509_poll,
|
.poll = t509_poll,
|
||||||
.transmit = t509_transmit,
|
.transmit = t509_transmit,
|
||||||
.irq = t509_irq,
|
.irq = t509_irq,
|
||||||
.disable = t509_disable,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
|
|||||||
Reference in New Issue
Block a user