mirror of
https://github.com/ipxe/ipxe
synced 2025-12-21 12:30:20 +03:00
Automatically updated with the program
#!/usr/bin/perl -w -pi -0777
use strict;
( my $type ) = /find_(\w+?)_boot_device/ or die "Could not find type\n";
( my $disable ) = /\.disable\s*=\s*(\w+)/ or die "Could not locate disable\n";
s/(${disable}\s*\(\s*struct\s+nic\s+\*nic)(\s*\)\s*\{)(\s*)/${1}, struct ${type}_device \*${type} __unused${2}${3}nic_disable ( nic );${3}/s;
s/(${disable}\s*\(\s*struct\s+nic\s+\*nic)(\s*\)\s*;)/${1}, struct ${type}_device \*${type}${2}/g;
s/^\s*.disable\s*=\s*${disable}\s*,\s*?$//m;
s/(_probe\s*\(\s*)struct\s+dev\s+\*dev/${1}struct nic \*nic/g;
s/^\s*struct\s+nic\s+\*nic\s*=\s*nic_device\s*\(\s*dev\s*\)\s*;\s*?$//m;
s/^(\s*)(nic->(ioaddr|irqno)\s*=\s*${type})/${1}${type}_fill_nic ( nic, ${type} );\n${1}${2}/m;
This commit is contained in:
@@ -644,7 +644,8 @@ static void mtd_transmit(
|
||||
/**************************************************************************
|
||||
DISABLE - Turn off ethernet interface
|
||||
***************************************************************************/
|
||||
static void mtd_disable ( struct nic *nic ) {
|
||||
static void mtd_disable ( struct nic *nic, struct pci_device *pci __unused ) {
|
||||
nic_disable ( nic );
|
||||
/* put the card in its initial state */
|
||||
/* Disable Tx Rx*/
|
||||
outl( mtdx.crvalue & (~TxEnable) & (~RxEnable), mtdx.ioaddr + TCRRCR);
|
||||
@@ -658,7 +659,7 @@ static struct nic_operations mtd_operations = {
|
||||
.poll = mtd_poll,
|
||||
.transmit = mtd_transmit,
|
||||
.irq = dummy_irq,
|
||||
.disable = mtd_disable,
|
||||
|
||||
};
|
||||
|
||||
static struct pci_id mtd80x_nics[] = {
|
||||
@@ -668,14 +669,14 @@ static struct pci_id mtd80x_nics[] = {
|
||||
};
|
||||
|
||||
static struct pci_driver mtd80x_driver =
|
||||
PCI_DRIVER ( "MTD80X", mtd80x_nics, PCI_NO_CLASS );
|
||||
PCI_DRIVER ( mtd80x_nics, PCI_NO_CLASS );
|
||||
|
||||
/**************************************************************************
|
||||
PROBE - Look for an adapter, this routine's visible to the outside
|
||||
***************************************************************************/
|
||||
|
||||
static int mtd_probe ( struct dev *dev, struct pci_device *pci ) {
|
||||
struct nic *nic = nic_device ( dev );
|
||||
static int mtd_probe ( struct nic *nic, struct pci_device *pci ) {
|
||||
|
||||
int i;
|
||||
|
||||
if (pci->ioaddr == 0)
|
||||
@@ -1086,4 +1087,5 @@ static void getlinktype(struct nic *dev)
|
||||
}
|
||||
}
|
||||
|
||||
BOOT_DRIVER ( "MTD80X", find_pci_boot_device, mtd80x_driver, mtd_probe );
|
||||
DRIVER ( "MTD80X", nic_driver, pci_driver, mtd80x_driver,
|
||||
mtd_probe, mtd_disable );
|
||||
|
||||
Reference in New Issue
Block a user