mirror of
https://github.com/ipxe/ipxe
synced 2025-12-26 01:22:37 +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:
@@ -3582,8 +3582,8 @@ static void e1000_irq(struct nic *nic __unused, irq_action_t action)
|
||||
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 e1000_probe ( struct dev *dev, struct pci_device *p ) {
|
||||
struct nic *nic = nic_device ( dev );
|
||||
static int e1000_probe ( struct nic *nic, struct pci_device *p ) {
|
||||
|
||||
unsigned long mmio_start, mmio_len;
|
||||
int ret_val, i;
|
||||
|
||||
@@ -3671,7 +3671,7 @@ static struct nic_operations e1000_operations = {
|
||||
.poll = e1000_poll,
|
||||
.transmit = e1000_transmit,
|
||||
.irq = e1000_irq,
|
||||
.disable = e1000_disable,
|
||||
|
||||
};
|
||||
|
||||
static struct pci_id e1000_nics[] = {
|
||||
@@ -3708,6 +3708,7 @@ PCI_ROM(0x8086, 0x107b, "e1000-82546gb-serdes", "Intel EtherExpressPro1000
|
||||
};
|
||||
|
||||
static struct pci_driver e1000_driver =
|
||||
PCI_DRIVER ( "E1000", e1000_nics, PCI_NO_CLASS );
|
||||
PCI_DRIVER ( e1000_nics, PCI_NO_CLASS );
|
||||
|
||||
BOOT_DRIVER ( "E1000", find_pci_boot_device, e1000_driver, e1000_probe );
|
||||
DRIVER ( "E1000", nic_driver, pci_driver, e1000_driver,
|
||||
e1000_probe, e1000_disable );
|
||||
|
||||
Reference in New Issue
Block a user