mirror of
https://github.com/ipxe/ipxe
synced 2025-12-23 13:30:57 +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:
@@ -3224,15 +3224,15 @@ static struct nic_operations tg3_operations = {
|
||||
.poll = tg3_poll,
|
||||
.transmit = tg3_transmit,
|
||||
.irq = tg3_irq,
|
||||
.disable = tg3_disable,
|
||||
|
||||
};
|
||||
|
||||
/**************************************************************************
|
||||
PROBE - Look for an adapter, this routine's visible to the outside
|
||||
You should omit the last argument struct pci_device * for a non-PCI NIC
|
||||
***************************************************************************/
|
||||
static int tg3_probe ( struct dev *dev, struct pci_device *pdev ) {
|
||||
struct nic *nic = nic_device ( dev );
|
||||
static int tg3_probe ( struct nic *nic, struct pci_device *pdev ) {
|
||||
|
||||
struct tg3 *tp = &tg3;
|
||||
unsigned long tg3reg_base, tg3reg_len;
|
||||
int i, err, pm_cap;
|
||||
@@ -3385,6 +3385,7 @@ PCI_ROM(0x173b, 0x03eb, "tg3-ac1003", "Altima AC1003"),
|
||||
};
|
||||
|
||||
static struct pci_driver tg3_driver =
|
||||
PCI_DRIVER ( "TG3", tg3_nics, PCI_NO_CLASS );
|
||||
PCI_DRIVER ( tg3_nics, PCI_NO_CLASS );
|
||||
|
||||
BOOT_DRIVER ( "TG3", find_pci_boot_device, tg3_driver, tg3_probe );
|
||||
DRIVER ( "TG3", nic_driver, pci_driver, tg3_driver,
|
||||
tg3_probe, tg3_disable );
|
||||
|
||||
Reference in New Issue
Block a user