diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-06-27 07:38:33 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-07-05 13:40:47 -0400 |
commit | 36e1e84768b1123eb632aff153104855c71684cc (patch) | |
tree | a64dbbaca3470f2fe5194878ccd472c4dda73b4d /drivers/net/epic100.c | |
parent | ca78f6baca863afe2e6a244a0fe94b3a70211d46 (diff) |
[netdrvr] epic100: minor cleanups
- Remove in-source changelog, it's in the global kernel history.
- convert silly and useless version to useful one
- replace invariant pci_id_tbl[]::io_size uses with EPIC_TOTAL_SIZE
- remove now-unused io_size member from pci_id_tbl[]
- current kernel style prefers dev_printk() for the rare ethernet driver
messages that cannot print an 'eth%d' prefix.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/epic100.c')
-rw-r--r-- | drivers/net/epic100.c | 71 |
1 files changed, 10 insertions, 61 deletions
diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c index 9f3e09a3d88c..05c9a26a74e2 100644 --- a/drivers/net/epic100.c +++ b/drivers/net/epic100.c | |||
@@ -19,62 +19,15 @@ | |||
19 | 19 | ||
20 | Information and updates available at | 20 | Information and updates available at |
21 | http://www.scyld.com/network/epic100.html | 21 | http://www.scyld.com/network/epic100.html |
22 | [this link no longer provides anything useful -jgarzik] | ||
22 | 23 | ||
23 | --------------------------------------------------------------------- | 24 | --------------------------------------------------------------------- |
24 | 25 | ||
25 | Linux kernel-specific changes: | ||
26 | |||
27 | LK1.1.2 (jgarzik): | ||
28 | * Merge becker version 1.09 (4/08/2000) | ||
29 | |||
30 | LK1.1.3: | ||
31 | * Major bugfix to 1.09 driver (Francis Romieu) | ||
32 | |||
33 | LK1.1.4 (jgarzik): | ||
34 | * Merge becker test version 1.09 (5/29/2000) | ||
35 | |||
36 | LK1.1.5: | ||
37 | * Fix locking (jgarzik) | ||
38 | * Limit 83c175 probe to ethernet-class PCI devices (rgooch) | ||
39 | |||
40 | LK1.1.6: | ||
41 | * Merge becker version 1.11 | ||
42 | * Move pci_enable_device before any PCI BAR len checks | ||
43 | |||
44 | LK1.1.7: | ||
45 | * { fill me in } | ||
46 | |||
47 | LK1.1.8: | ||
48 | * ethtool driver info support (jgarzik) | ||
49 | |||
50 | LK1.1.9: | ||
51 | * ethtool media get/set support (jgarzik) | ||
52 | |||
53 | LK1.1.10: | ||
54 | * revert MII transceiver init change (jgarzik) | ||
55 | |||
56 | LK1.1.11: | ||
57 | * implement ETHTOOL_[GS]SET, _NWAY_RST, _[GS]MSGLVL, _GLINK (jgarzik) | ||
58 | * replace some MII-related magic numbers with constants | ||
59 | |||
60 | LK1.1.12: | ||
61 | * fix power-up sequence | ||
62 | |||
63 | LK1.1.13: | ||
64 | * revert version 1.1.12, power-up sequence "fix" | ||
65 | |||
66 | LK1.1.14 (Kryzsztof Halasa): | ||
67 | * fix spurious bad initializations | ||
68 | * pound phy a la SMSC's app note on the subject | ||
69 | |||
70 | AC1.1.14ac | ||
71 | * fix power up/down for ethtool that broke in 1.11 | ||
72 | |||
73 | */ | 26 | */ |
74 | 27 | ||
75 | #define DRV_NAME "epic100" | 28 | #define DRV_NAME "epic100" |
76 | #define DRV_VERSION "1.11+LK1.1.14+AC1.1.14" | 29 | #define DRV_VERSION "2.0" |
77 | #define DRV_RELDATE "June 2, 2004" | 30 | #define DRV_RELDATE "June 27, 2006" |
78 | 31 | ||
79 | /* The user-configurable values. | 32 | /* The user-configurable values. |
80 | These may be modified when a driver module is loaded.*/ | 33 | These may be modified when a driver module is loaded.*/ |
@@ -204,19 +157,15 @@ typedef enum { | |||
204 | 157 | ||
205 | struct epic_chip_info { | 158 | struct epic_chip_info { |
206 | const char *name; | 159 | const char *name; |
207 | int io_size; /* Needed for I/O region check or ioremap(). */ | ||
208 | int drv_flags; /* Driver use, intended as capability flags. */ | 160 | int drv_flags; /* Driver use, intended as capability flags. */ |
209 | }; | 161 | }; |
210 | 162 | ||
211 | 163 | ||
212 | /* indexed by chip_t */ | 164 | /* indexed by chip_t */ |
213 | static const struct epic_chip_info pci_id_tbl[] = { | 165 | static const struct epic_chip_info pci_id_tbl[] = { |
214 | { "SMSC EPIC/100 83c170", | 166 | { "SMSC EPIC/100 83c170", TYPE2_INTR | NO_MII | MII_PWRDWN }, |
215 | EPIC_TOTAL_SIZE, TYPE2_INTR | NO_MII | MII_PWRDWN }, | 167 | { "SMSC EPIC/100 83c170", TYPE2_INTR }, |
216 | { "SMSC EPIC/100 83c170", | 168 | { "SMSC EPIC/C 83c175", TYPE2_INTR | MII_PWRDWN }, |
217 | EPIC_TOTAL_SIZE, TYPE2_INTR }, | ||
218 | { "SMSC EPIC/C 83c175", | ||
219 | EPIC_TOTAL_SIZE, TYPE2_INTR | MII_PWRDWN }, | ||
220 | }; | 169 | }; |
221 | 170 | ||
222 | 171 | ||
@@ -385,8 +334,8 @@ static int __devinit epic_init_one (struct pci_dev *pdev, | |||
385 | goto out; | 334 | goto out; |
386 | irq = pdev->irq; | 335 | irq = pdev->irq; |
387 | 336 | ||
388 | if (pci_resource_len(pdev, 0) < pci_id_tbl[chip_idx].io_size) { | 337 | if (pci_resource_len(pdev, 0) < EPIC_TOTAL_SIZE) { |
389 | printk (KERN_ERR "card %d: no PCI region space\n", card_idx); | 338 | dev_printk(KERN_ERR, &pdev->dev, "no PCI region space\n"); |
390 | ret = -ENODEV; | 339 | ret = -ENODEV; |
391 | goto err_out_disable; | 340 | goto err_out_disable; |
392 | } | 341 | } |
@@ -401,7 +350,7 @@ static int __devinit epic_init_one (struct pci_dev *pdev, | |||
401 | 350 | ||
402 | dev = alloc_etherdev(sizeof (*ep)); | 351 | dev = alloc_etherdev(sizeof (*ep)); |
403 | if (!dev) { | 352 | if (!dev) { |
404 | printk (KERN_ERR "card %d: no memory for eth device\n", card_idx); | 353 | dev_printk(KERN_ERR, &pdev->dev, "no memory for eth device\n"); |
405 | goto err_out_free_res; | 354 | goto err_out_free_res; |
406 | } | 355 | } |
407 | SET_MODULE_OWNER(dev); | 356 | SET_MODULE_OWNER(dev); |
@@ -413,7 +362,7 @@ static int __devinit epic_init_one (struct pci_dev *pdev, | |||
413 | ioaddr = pci_resource_start (pdev, 1); | 362 | ioaddr = pci_resource_start (pdev, 1); |
414 | ioaddr = (long) ioremap (ioaddr, pci_resource_len (pdev, 1)); | 363 | ioaddr = (long) ioremap (ioaddr, pci_resource_len (pdev, 1)); |
415 | if (!ioaddr) { | 364 | if (!ioaddr) { |
416 | printk (KERN_ERR DRV_NAME " %d: ioremap failed\n", card_idx); | 365 | dev_printk(KERN_ERR, &pdev->dev, "ioremap failed\n"); |
417 | goto err_out_free_netdev; | 366 | goto err_out_free_netdev; |
418 | } | 367 | } |
419 | #endif | 368 | #endif |