diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-06-26 23:47:50 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-06-26 23:47:50 -0400 |
commit | 1f1bd5fc326a46d8c49132260f661b7cc954846f (patch) | |
tree | b564551c3f47ebdff46a348e7ca80bf02b79df4a /drivers/net/yellowfin.c | |
parent | a2b524b2ec6caa0499aea56a58fdb67a6d10db90 (diff) |
[netdrvr] Remove long-unused bits from Becker template drivers
Symbols such as PCI_USES_IO, PCI_ADDR0, etc. originated from Donald
Becker's net driver template, but have been long unused. Remove.
In a few drivers, this allows the further eliminate of the pci_flags (or
just plain flags) member in the template driver probe structure.
Most of this logic is simply open-coded in most drivers, since it never
changes.
Made a few other cleanups while I was in there, too:
* constify, __devinitdata several PCI ID tables
* replace table terminating entries such as "{0,}," and "{NULL},"
with a more-clean "{ }".
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/yellowfin.c')
-rw-r--r-- | drivers/net/yellowfin.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/drivers/net/yellowfin.c b/drivers/net/yellowfin.c index ecec8e5db786..569305f57561 100644 --- a/drivers/net/yellowfin.c +++ b/drivers/net/yellowfin.c | |||
@@ -234,14 +234,6 @@ See Packet Engines confidential appendix (prototype chips only). | |||
234 | 234 | ||
235 | 235 | ||
236 | 236 | ||
237 | enum pci_id_flags_bits { | ||
238 | /* Set PCI command register bits before calling probe1(). */ | ||
239 | PCI_USES_IO=1, PCI_USES_MEM=2, PCI_USES_MASTER=4, | ||
240 | /* Read and map the single following PCI BAR. */ | ||
241 | PCI_ADDR0=0<<4, PCI_ADDR1=1<<4, PCI_ADDR2=2<<4, PCI_ADDR3=3<<4, | ||
242 | PCI_ADDR_64BITS=0x100, PCI_NO_ACPI_WAKE=0x200, PCI_NO_MIN_LATENCY=0x400, | ||
243 | PCI_UNUSED_IRQ=0x800, | ||
244 | }; | ||
245 | enum capability_flags { | 237 | enum capability_flags { |
246 | HasMII=1, FullTxStatus=2, IsGigabit=4, HasMulticastBug=8, FullRxStatus=16, | 238 | HasMII=1, FullTxStatus=2, IsGigabit=4, HasMulticastBug=8, FullRxStatus=16, |
247 | HasMACAddrBug=32, /* Only on early revs. */ | 239 | HasMACAddrBug=32, /* Only on early revs. */ |
@@ -249,11 +241,6 @@ enum capability_flags { | |||
249 | }; | 241 | }; |
250 | /* The PCI I/O space extent. */ | 242 | /* The PCI I/O space extent. */ |
251 | #define YELLOWFIN_SIZE 0x100 | 243 | #define YELLOWFIN_SIZE 0x100 |
252 | #ifdef USE_IO_OPS | ||
253 | #define PCI_IOTYPE (PCI_USES_MASTER | PCI_USES_IO | PCI_ADDR0) | ||
254 | #else | ||
255 | #define PCI_IOTYPE (PCI_USES_MASTER | PCI_USES_MEM | PCI_ADDR1) | ||
256 | #endif | ||
257 | 244 | ||
258 | struct pci_id_info { | 245 | struct pci_id_info { |
259 | const char *name; | 246 | const char *name; |
@@ -261,24 +248,23 @@ struct pci_id_info { | |||
261 | int pci, pci_mask, subsystem, subsystem_mask; | 248 | int pci, pci_mask, subsystem, subsystem_mask; |
262 | int revision, revision_mask; /* Only 8 bits. */ | 249 | int revision, revision_mask; /* Only 8 bits. */ |
263 | } id; | 250 | } id; |
264 | enum pci_id_flags_bits pci_flags; | ||
265 | int io_size; /* Needed for I/O region check or ioremap(). */ | 251 | int io_size; /* Needed for I/O region check or ioremap(). */ |
266 | int drv_flags; /* Driver use, intended as capability flags. */ | 252 | int drv_flags; /* Driver use, intended as capability flags. */ |
267 | }; | 253 | }; |
268 | 254 | ||
269 | static const struct pci_id_info pci_id_tbl[] = { | 255 | static const struct pci_id_info pci_id_tbl[] = { |
270 | {"Yellowfin G-NIC Gigabit Ethernet", { 0x07021000, 0xffffffff}, | 256 | {"Yellowfin G-NIC Gigabit Ethernet", { 0x07021000, 0xffffffff}, |
271 | PCI_IOTYPE, YELLOWFIN_SIZE, | 257 | YELLOWFIN_SIZE, |
272 | FullTxStatus | IsGigabit | HasMulticastBug | HasMACAddrBug | DontUseEeprom}, | 258 | FullTxStatus | IsGigabit | HasMulticastBug | HasMACAddrBug | DontUseEeprom}, |
273 | {"Symbios SYM83C885", { 0x07011000, 0xffffffff}, | 259 | {"Symbios SYM83C885", { 0x07011000, 0xffffffff}, |
274 | PCI_IOTYPE, YELLOWFIN_SIZE, HasMII | DontUseEeprom }, | 260 | YELLOWFIN_SIZE, HasMII | DontUseEeprom }, |
275 | {NULL,}, | 261 | { } |
276 | }; | 262 | }; |
277 | 263 | ||
278 | static struct pci_device_id yellowfin_pci_tbl[] = { | 264 | static const struct pci_device_id yellowfin_pci_tbl[] = { |
279 | { 0x1000, 0x0702, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 265 | { 0x1000, 0x0702, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, |
280 | { 0x1000, 0x0701, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, | 266 | { 0x1000, 0x0701, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, |
281 | { 0, } | 267 | { } |
282 | }; | 268 | }; |
283 | MODULE_DEVICE_TABLE (pci, yellowfin_pci_tbl); | 269 | MODULE_DEVICE_TABLE (pci, yellowfin_pci_tbl); |
284 | 270 | ||