diff options
author | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2009-01-14 00:29:08 -0500 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2009-01-14 00:29:08 -0500 |
commit | c088f4e9da74b901f7ed1749ad697d77622ed0f9 (patch) | |
tree | 84cddf20369f82f10c1c3712e6cce20dd1b9d863 /drivers/net/pcnet32.c | |
parent | ce79735c12d62c3cda38eb31762cf98e87c7b087 (diff) | |
parent | a6525042bfdfcab128bd91fad264de10fd24a55e (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/net/pcnet32.c')
-rw-r--r-- | drivers/net/pcnet32.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c index 044b7b07f5f4..665a4286da39 100644 --- a/drivers/net/pcnet32.c +++ b/drivers/net/pcnet32.c | |||
@@ -1568,6 +1568,22 @@ pcnet32_probe_pci(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1568 | return err; | 1568 | return err; |
1569 | } | 1569 | } |
1570 | 1570 | ||
1571 | static const struct net_device_ops pcnet32_netdev_ops = { | ||
1572 | .ndo_open = pcnet32_open, | ||
1573 | .ndo_stop = pcnet32_close, | ||
1574 | .ndo_start_xmit = pcnet32_start_xmit, | ||
1575 | .ndo_tx_timeout = pcnet32_tx_timeout, | ||
1576 | .ndo_get_stats = pcnet32_get_stats, | ||
1577 | .ndo_set_multicast_list = pcnet32_set_multicast_list, | ||
1578 | .ndo_do_ioctl = pcnet32_ioctl, | ||
1579 | .ndo_change_mtu = eth_change_mtu, | ||
1580 | .ndo_set_mac_address = eth_mac_addr, | ||
1581 | .ndo_validate_addr = eth_validate_addr, | ||
1582 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
1583 | .ndo_poll_controller = pcnet32_poll_controller, | ||
1584 | #endif | ||
1585 | }; | ||
1586 | |||
1571 | /* pcnet32_probe1 | 1587 | /* pcnet32_probe1 |
1572 | * Called from both pcnet32_probe_vlbus and pcnet_probe_pci. | 1588 | * Called from both pcnet32_probe_vlbus and pcnet_probe_pci. |
1573 | * pdev will be NULL when called from pcnet32_probe_vlbus. | 1589 | * pdev will be NULL when called from pcnet32_probe_vlbus. |
@@ -1934,20 +1950,10 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev) | |||
1934 | lp->watchdog_timer.function = (void *)&pcnet32_watchdog; | 1950 | lp->watchdog_timer.function = (void *)&pcnet32_watchdog; |
1935 | 1951 | ||
1936 | /* The PCNET32-specific entries in the device structure. */ | 1952 | /* The PCNET32-specific entries in the device structure. */ |
1937 | dev->open = &pcnet32_open; | 1953 | dev->netdev_ops = &pcnet32_netdev_ops; |
1938 | dev->hard_start_xmit = &pcnet32_start_xmit; | ||
1939 | dev->stop = &pcnet32_close; | ||
1940 | dev->get_stats = &pcnet32_get_stats; | ||
1941 | dev->set_multicast_list = &pcnet32_set_multicast_list; | ||
1942 | dev->do_ioctl = &pcnet32_ioctl; | ||
1943 | dev->ethtool_ops = &pcnet32_ethtool_ops; | 1954 | dev->ethtool_ops = &pcnet32_ethtool_ops; |
1944 | dev->tx_timeout = pcnet32_tx_timeout; | ||
1945 | dev->watchdog_timeo = (5 * HZ); | 1955 | dev->watchdog_timeo = (5 * HZ); |
1946 | 1956 | ||
1947 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
1948 | dev->poll_controller = pcnet32_poll_controller; | ||
1949 | #endif | ||
1950 | |||
1951 | /* Fill in the generic fields of the device structure. */ | 1957 | /* Fill in the generic fields of the device structure. */ |
1952 | if (register_netdev(dev)) | 1958 | if (register_netdev(dev)) |
1953 | goto err_free_ring; | 1959 | goto err_free_ring; |
@@ -2276,7 +2282,7 @@ static int pcnet32_open(struct net_device *dev) | |||
2276 | if (lp->chip_version >= PCNET32_79C970A) { | 2282 | if (lp->chip_version >= PCNET32_79C970A) { |
2277 | /* Print the link status and start the watchdog */ | 2283 | /* Print the link status and start the watchdog */ |
2278 | pcnet32_check_media(dev, 1); | 2284 | pcnet32_check_media(dev, 1); |
2279 | mod_timer(&(lp->watchdog_timer), PCNET32_WATCHDOG_TIMEOUT); | 2285 | mod_timer(&lp->watchdog_timer, PCNET32_WATCHDOG_TIMEOUT); |
2280 | } | 2286 | } |
2281 | 2287 | ||
2282 | i = 0; | 2288 | i = 0; |
@@ -2911,7 +2917,7 @@ static void pcnet32_watchdog(struct net_device *dev) | |||
2911 | pcnet32_check_media(dev, 0); | 2917 | pcnet32_check_media(dev, 0); |
2912 | spin_unlock_irqrestore(&lp->lock, flags); | 2918 | spin_unlock_irqrestore(&lp->lock, flags); |
2913 | 2919 | ||
2914 | mod_timer(&(lp->watchdog_timer), PCNET32_WATCHDOG_TIMEOUT); | 2920 | mod_timer(&lp->watchdog_timer, round_jiffies(PCNET32_WATCHDOG_TIMEOUT)); |
2915 | } | 2921 | } |
2916 | 2922 | ||
2917 | static int pcnet32_pm_suspend(struct pci_dev *pdev, pm_message_t state) | 2923 | static int pcnet32_pm_suspend(struct pci_dev *pdev, pm_message_t state) |