Loading drivers/net/via-velocity.c +25 −46 Original line number Diff line number Diff line Loading @@ -42,7 +42,6 @@ * */ #include <linux/module.h> #include <linux/types.h> #include <linux/bitops.h> Loading Loading @@ -112,7 +111,6 @@ static void mac_get_cam_mask(struct mac_regs __iomem *regs, u8 *mask) BYTE_REG_BITS_SET(CAMCR_PS_MAR, CAMCR_PS1 | CAMCR_PS0, ®s->CAMCR); } /** * mac_set_cam_mask - Set a CAM mask * @regs: register block for this velocity Loading Loading @@ -700,7 +698,6 @@ static int velocity_mii_read(struct mac_regs __iomem *regs, u8 index, u16 *data) return 0; } /** * mii_check_media_mode - check media state * @regs: velocity registers Loading Loading @@ -866,8 +863,6 @@ static u32 check_connection_type(struct mac_regs __iomem *regs) return status; } /** * velocity_set_media_mode - set media mode * @mii_status: old MII link state Loading Loading @@ -1262,6 +1257,7 @@ static void setup_queue_timers(struct velocity_info *vptr) writeb(rxqueue_timer, &vptr->mac_regs->RQETMR); } } /** * setup_adaptive_interrupts - Setup interrupt suppression * Loading Loading @@ -1601,8 +1597,6 @@ static void velocity_free_rd_ring(struct velocity_info *vptr) vptr->rx.info = NULL; } /** * velocity_init_rd_ring - set up receive ring * @vptr: velocity to configure Loading Loading @@ -1676,7 +1670,6 @@ static void velocity_free_dma_rings(struct velocity_info *vptr) pci_free_consistent(vptr->pdev, size, vptr->rx.ring, vptr->rx.pool_dma); } static int velocity_init_rings(struct velocity_info *vptr, int mtu) { int ret; Loading Loading @@ -1739,7 +1732,6 @@ static void velocity_free_tx_buf(struct velocity_info *vptr, tdinfo->skb = NULL; } /* * FIXME: could we merge this with velocity_free_tx_buf ? */ Loading Loading @@ -1787,7 +1779,6 @@ static void velocity_free_td_ring(struct velocity_info *vptr) } } static void velocity_free_rings(struct velocity_info *vptr) { velocity_free_td_ring(vptr); Loading Loading @@ -2025,7 +2016,6 @@ static inline void velocity_iph_realign(struct velocity_info *vptr, } } /** * velocity_receive_frame - received packet processor * @vptr: velocity we are handling Loading Loading @@ -2097,7 +2087,6 @@ static int velocity_receive_frame(struct velocity_info *vptr, int idx) return 0; } /** * velocity_rx_srv - service RX interrupt * @vptr: velocity Loading Loading @@ -2405,7 +2394,6 @@ static int velocity_mii_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd return 0; } /** * velocity_ioctl - ioctl entry point * @dev: network device Loading Loading @@ -2620,7 +2608,6 @@ static netdev_tx_t velocity_xmit(struct sk_buff *skb, return NETDEV_TX_OK; } static const struct net_device_ops velocity_netdev_ops = { .ndo_open = velocity_open, .ndo_stop = velocity_close, Loading Loading @@ -2718,7 +2705,6 @@ static u32 velocity_get_link(struct net_device *dev) return BYTE_REG_BITS_IS_ON(PHYSR0_LINKGD, ®s->PHYSR0) ? 1 : 0; } /** * velocity_found1 - set up discovered velocity card * @pdev: PCI device Loading Loading @@ -2865,7 +2851,6 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi goto out; } #ifdef CONFIG_PM /** * wol_calc_crc - WOL CRC Loading Loading @@ -3036,7 +3021,7 @@ static int velocity_suspend(struct pci_dev *pdev, pm_message_t state) spin_lock_irqsave(&vptr->lock, flags); pci_save_state(pdev); #ifdef ETHTOOL_GWOL if (vptr->flags & VELOCITY_FLAGS_WOL_ENABLED) { velocity_get_ip(vptr); velocity_save_context(vptr, &vptr->context); Loading @@ -3050,9 +3035,7 @@ static int velocity_suspend(struct pci_dev *pdev, pm_message_t state) pci_disable_device(pdev); pci_set_power_state(pdev, pci_choose_state(pdev, state)); } #else pci_set_power_state(pdev, pci_choose_state(pdev, state)); #endif spin_unlock_irqrestore(&vptr->lock, flags); return 0; } Loading Loading @@ -3538,11 +3521,10 @@ static const struct ethtool_ops velocity_ethtool_ops = { .complete = velocity_ethtool_down }; #ifdef CONFIG_PM #ifdef CONFIG_INET #if defined(CONFIG_PM) && defined(CONFIG_INET) static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr) { struct in_ifaddr *ifa = (struct in_ifaddr *) ptr; struct in_ifaddr *ifa = ptr; struct net_device *dev = ifa->ifa_dev->dev; if (dev_net(dev) == &init_net && Loading @@ -3551,10 +3533,7 @@ static int velocity_netdev_event(struct notifier_block *nb, unsigned long notifi return NOTIFY_DONE; } #endif /* CONFIG_INET */ #endif /* CONFIG_PM */ #if defined(CONFIG_PM) && defined(CONFIG_INET) static struct notifier_block velocity_inetaddr_notifier = { .notifier_call = velocity_netdev_event, }; Loading Loading
drivers/net/via-velocity.c +25 −46 Original line number Diff line number Diff line Loading @@ -42,7 +42,6 @@ * */ #include <linux/module.h> #include <linux/types.h> #include <linux/bitops.h> Loading Loading @@ -112,7 +111,6 @@ static void mac_get_cam_mask(struct mac_regs __iomem *regs, u8 *mask) BYTE_REG_BITS_SET(CAMCR_PS_MAR, CAMCR_PS1 | CAMCR_PS0, ®s->CAMCR); } /** * mac_set_cam_mask - Set a CAM mask * @regs: register block for this velocity Loading Loading @@ -700,7 +698,6 @@ static int velocity_mii_read(struct mac_regs __iomem *regs, u8 index, u16 *data) return 0; } /** * mii_check_media_mode - check media state * @regs: velocity registers Loading Loading @@ -866,8 +863,6 @@ static u32 check_connection_type(struct mac_regs __iomem *regs) return status; } /** * velocity_set_media_mode - set media mode * @mii_status: old MII link state Loading Loading @@ -1262,6 +1257,7 @@ static void setup_queue_timers(struct velocity_info *vptr) writeb(rxqueue_timer, &vptr->mac_regs->RQETMR); } } /** * setup_adaptive_interrupts - Setup interrupt suppression * Loading Loading @@ -1601,8 +1597,6 @@ static void velocity_free_rd_ring(struct velocity_info *vptr) vptr->rx.info = NULL; } /** * velocity_init_rd_ring - set up receive ring * @vptr: velocity to configure Loading Loading @@ -1676,7 +1670,6 @@ static void velocity_free_dma_rings(struct velocity_info *vptr) pci_free_consistent(vptr->pdev, size, vptr->rx.ring, vptr->rx.pool_dma); } static int velocity_init_rings(struct velocity_info *vptr, int mtu) { int ret; Loading Loading @@ -1739,7 +1732,6 @@ static void velocity_free_tx_buf(struct velocity_info *vptr, tdinfo->skb = NULL; } /* * FIXME: could we merge this with velocity_free_tx_buf ? */ Loading Loading @@ -1787,7 +1779,6 @@ static void velocity_free_td_ring(struct velocity_info *vptr) } } static void velocity_free_rings(struct velocity_info *vptr) { velocity_free_td_ring(vptr); Loading Loading @@ -2025,7 +2016,6 @@ static inline void velocity_iph_realign(struct velocity_info *vptr, } } /** * velocity_receive_frame - received packet processor * @vptr: velocity we are handling Loading Loading @@ -2097,7 +2087,6 @@ static int velocity_receive_frame(struct velocity_info *vptr, int idx) return 0; } /** * velocity_rx_srv - service RX interrupt * @vptr: velocity Loading Loading @@ -2405,7 +2394,6 @@ static int velocity_mii_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd return 0; } /** * velocity_ioctl - ioctl entry point * @dev: network device Loading Loading @@ -2620,7 +2608,6 @@ static netdev_tx_t velocity_xmit(struct sk_buff *skb, return NETDEV_TX_OK; } static const struct net_device_ops velocity_netdev_ops = { .ndo_open = velocity_open, .ndo_stop = velocity_close, Loading Loading @@ -2718,7 +2705,6 @@ static u32 velocity_get_link(struct net_device *dev) return BYTE_REG_BITS_IS_ON(PHYSR0_LINKGD, ®s->PHYSR0) ? 1 : 0; } /** * velocity_found1 - set up discovered velocity card * @pdev: PCI device Loading Loading @@ -2865,7 +2851,6 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi goto out; } #ifdef CONFIG_PM /** * wol_calc_crc - WOL CRC Loading Loading @@ -3036,7 +3021,7 @@ static int velocity_suspend(struct pci_dev *pdev, pm_message_t state) spin_lock_irqsave(&vptr->lock, flags); pci_save_state(pdev); #ifdef ETHTOOL_GWOL if (vptr->flags & VELOCITY_FLAGS_WOL_ENABLED) { velocity_get_ip(vptr); velocity_save_context(vptr, &vptr->context); Loading @@ -3050,9 +3035,7 @@ static int velocity_suspend(struct pci_dev *pdev, pm_message_t state) pci_disable_device(pdev); pci_set_power_state(pdev, pci_choose_state(pdev, state)); } #else pci_set_power_state(pdev, pci_choose_state(pdev, state)); #endif spin_unlock_irqrestore(&vptr->lock, flags); return 0; } Loading Loading @@ -3538,11 +3521,10 @@ static const struct ethtool_ops velocity_ethtool_ops = { .complete = velocity_ethtool_down }; #ifdef CONFIG_PM #ifdef CONFIG_INET #if defined(CONFIG_PM) && defined(CONFIG_INET) static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr) { struct in_ifaddr *ifa = (struct in_ifaddr *) ptr; struct in_ifaddr *ifa = ptr; struct net_device *dev = ifa->ifa_dev->dev; if (dev_net(dev) == &init_net && Loading @@ -3551,10 +3533,7 @@ static int velocity_netdev_event(struct notifier_block *nb, unsigned long notifi return NOTIFY_DONE; } #endif /* CONFIG_INET */ #endif /* CONFIG_PM */ #if defined(CONFIG_PM) && defined(CONFIG_INET) static struct notifier_block velocity_inetaddr_notifier = { .notifier_call = velocity_netdev_event, }; Loading