e1000 : Make Intel e1000 driver legacy I/O port free
Subsystems (2)
PATCH 4/5 e1000 : Make Intel e1000 driver legacy I/O port free
This patch makes Intel e1000 driver legacy I/O port free.
--- drivers/net/e1000/e1000.h | 6 + drivers/net/e1000/e1000_main.c | 146 ++++++++++++++++++++++------------------- 2 files changed, 83 insertions(+), 69 deletions(-)
drivers/net/e1000/e1000.h +4 -2
@@ -75,8 +75,9 @@#define BAR_1 1#define BAR_5 5 -#define INTEL_E1000_ETHERNET_DEVICE (device_id) {\ - PCI_DEVICE(PCI_VENDOR_ID_INTEL, device_id)} +#define E1000_USE_IOPORT (1 << 0) +#define INTEL_E1000_ETHERNET_DEVICE (device_id, flags) {\ + PCI_DEVICE(PCI_VENDOR_ID_INTEL, device_id), .driver_data = flags}struct e1000_adapter ;
@@ -342,6 +343,7 @@boolean_t quad_port_a;unsigned long flags;uint32_t eeprom_wol; +int bars;/* BARs to be enabled */ };enum e1000_state_t {
drivers/net/e1000/e1000_main.c +79 -67
194 lines not on this page · raw message
drivers/net/e1000/e1000_main.c line 53
Quoted 3 lines · Hidetoshi Seto
static struct
pci_device_ide1000_pci_tbl[] = {drivers/net/e1000/e1000_main.c +2
-0+INTEL_E1000_ETHERNET_DEVICE (0x1004 ,0 ), + INTEL_E1000_ETHERNET_DEVICE(0x1008, E1000_USE_IOPORT),
Hi,
this has the unfortunate effect that it's now a lot harder to add PCI ID's to this driver at runtime via sysfs ;(
Greetings,
Arjan van de Ven
Signature · 2 lines
if you want to mail me at work (you don't), use arjan (at) linux.intel.com Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org
Quoted 9 lines · Arjan van de Ven
drivers/net/e1000/e1000_main.c line 53
Quoted 3 lines · Hidetoshi Seto
static struct
pci_device_ide1000_pci_tbl[] = {drivers/net/e1000/e1000_main.c +2
-0+INTEL_E1000_ETHERNET_DEVICE (0x1004 ,0 ), + INTEL_E1000_ETHERNET_DEVICE(0x1008, E1000_USE_IOPORT),Hi,
this has the unfortunate effect that it's now a lot harder to add PCI ID's to this driver at runtime via sysfs ;(
It does? Normally you get 0 passed in that field, so you'll just not get io ports enabled ...
Need to set use_driver_data to get non-0 passed in that field.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Quoted 7 lines · Matthew Wilcox
Quoted 6 lines · Arjan van de Ven
drivers/net/e1000/e1000_main.c line 53
Quoted 3 lines · Hidetoshi Seto
static struct
pci_device_ide1000_pci_tbl[] = {drivers/net/e1000/e1000_main.c +2
-0+INTEL_E1000_ETHERNET_DEVICE (0x1004 ,0 ), + INTEL_E1000_ETHERNET_DEVICE(0x1008, E1000_USE_IOPORT),Hi,
Quoted 7 lines
Quoted 2 lines
this has the unfortunate effect that it's now a lot harder to add PCI ID's to this driver at runtime via sysfs ;(
It does? Normally you get 0 passed in that field, so you'll just not get io ports enabled ...
Need to set
use_driver_datato get non-0 passed in that field.
I think we want to condense the USE_IOPORT flag together with the other hardware feature flags, as suggested by Jeff Garzik. This would save some headroom and leave the pci device id table as it is.
Cheers,
Auke
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Quoted 1 line · Auke Kok
I think we want to condense the
USE_IOPORTflag together with the other hardware
two cases
1. the IO port is not allocated by firmware, but pci_assign_unassigned_resources will get that allocated.
2. the IO port is allocated by firmware, the bar will be retrieved by pcibios_resource_survey.
so acctully the device already get the bar allocated in any case.
So what the purpose of this patch? the /poc/ioports hide ioport for the driver?
It seems need to add some pci_quirk to clear the bar for 2, and skip the resource allocation for 1.
YH
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV