Loading drivers/dca/dca-sysfs.c +21 −0 Original line number Original line Diff line number Diff line /* * Copyright(c) 2007 - 2009 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 59 * Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * The full GNU General Public License is included in this distribution in the * file called COPYING. */ #include <linux/kernel.h> #include <linux/kernel.h> #include <linux/spinlock.h> #include <linux/spinlock.h> #include <linux/device.h> #include <linux/device.h> Loading drivers/net/Kconfig +1 −1 Original line number Original line Diff line number Diff line Loading @@ -1051,7 +1051,7 @@ config NI65 config DNET config DNET tristate "Dave ethernet support (DNET)" tristate "Dave ethernet support (DNET)" depends on NET_ETHERNET depends on NET_ETHERNET && HAS_IOMEM select PHYLIB select PHYLIB help help The Dave ethernet interface (DNET) is found on Qong Board FPGA. The Dave ethernet interface (DNET) is found on Qong Board FPGA. Loading drivers/net/benet/be.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -194,6 +194,7 @@ struct be_adapter { struct be_eq_obj rx_eq; struct be_eq_obj rx_eq; struct be_rx_obj rx_obj; struct be_rx_obj rx_obj; u32 big_page_size; /* Compounded page size shared by rx wrbs */ u32 big_page_size; /* Compounded page size shared by rx wrbs */ bool rx_post_starved; /* Zero rx frags have been posted to BE */ struct vlan_group *vlan_grp; struct vlan_group *vlan_grp; u16 num_vlans; u16 num_vlans; Loading drivers/net/benet/be_main.c +34 −26 Original line number Original line Diff line number Diff line Loading @@ -273,26 +273,6 @@ static void be_rx_eqd_update(struct be_adapter *adapter) rx_eq->cur_eqd = eqd; rx_eq->cur_eqd = eqd; } } static void be_worker(struct work_struct *work) { struct be_adapter *adapter = container_of(work, struct be_adapter, work.work); int status; /* Check link */ be_link_status_update(adapter); /* Get Stats */ status = be_cmd_get_stats(&adapter->ctrl, &adapter->stats.cmd); if (!status) netdev_stats_update(adapter); /* Set EQ delay */ be_rx_eqd_update(adapter); schedule_delayed_work(&adapter->work, msecs_to_jiffies(1000)); } static struct net_device_stats *be_get_stats(struct net_device *dev) static struct net_device_stats *be_get_stats(struct net_device *dev) { { struct be_adapter *adapter = netdev_priv(dev); struct be_adapter *adapter = netdev_priv(dev); Loading Loading @@ -493,7 +473,7 @@ static int be_change_mtu(struct net_device *netdev, int new_mtu) * program them in BE. If more than BE_NUM_VLANS_SUPPORTED are configured, * program them in BE. If more than BE_NUM_VLANS_SUPPORTED are configured, * set the BE in promiscuous VLAN mode. * set the BE in promiscuous VLAN mode. */ */ static void be_vids_config(struct net_device *netdev) static void be_vid_config(struct net_device *netdev) { { struct be_adapter *adapter = netdev_priv(netdev); struct be_adapter *adapter = netdev_priv(netdev); u16 vtag[BE_NUM_VLANS_SUPPORTED]; u16 vtag[BE_NUM_VLANS_SUPPORTED]; Loading Loading @@ -536,7 +516,7 @@ static void be_vlan_add_vid(struct net_device *netdev, u16 vid) adapter->num_vlans++; adapter->num_vlans++; adapter->vlan_tag[vid] = 1; adapter->vlan_tag[vid] = 1; be_vids_config(netdev); be_vid_config(netdev); } } static void be_vlan_rem_vid(struct net_device *netdev, u16 vid) static void be_vlan_rem_vid(struct net_device *netdev, u16 vid) Loading @@ -547,7 +527,7 @@ static void be_vlan_rem_vid(struct net_device *netdev, u16 vid) adapter->vlan_tag[vid] = 0; adapter->vlan_tag[vid] = 0; vlan_group_set_device(adapter->vlan_grp, vid, NULL); vlan_group_set_device(adapter->vlan_grp, vid, NULL); be_vids_config(netdev); be_vid_config(netdev); } } static void be_set_multicast_filter(struct net_device *netdev) static void be_set_multicast_filter(struct net_device *netdev) Loading Loading @@ -900,8 +880,11 @@ static void be_post_rx_frags(struct be_adapter *adapter) page_info->last_page_user = true; page_info->last_page_user = true; if (posted) { if (posted) { be_rxq_notify(&adapter->ctrl, rxq->id, posted); atomic_add(posted, &rxq->used); atomic_add(posted, &rxq->used); be_rxq_notify(&adapter->ctrl, rxq->id, posted); } else if (atomic_read(&rxq->used) == 0) { /* Let be_worker replenish when memory is available */ adapter->rx_post_starved = true; } } return; return; Loading Loading @@ -1305,6 +1288,31 @@ int be_poll_tx(struct napi_struct *napi, int budget) return 1; return 1; } } static void be_worker(struct work_struct *work) { struct be_adapter *adapter = container_of(work, struct be_adapter, work.work); int status; /* Check link */ be_link_status_update(adapter); /* Get Stats */ status = be_cmd_get_stats(&adapter->ctrl, &adapter->stats.cmd); if (!status) netdev_stats_update(adapter); /* Set EQ delay */ be_rx_eqd_update(adapter); if (adapter->rx_post_starved) { adapter->rx_post_starved = false; be_post_rx_frags(adapter); } schedule_delayed_work(&adapter->work, msecs_to_jiffies(1000)); } static void be_msix_enable(struct be_adapter *adapter) static void be_msix_enable(struct be_adapter *adapter) { { int i, status; int i, status; Loading Loading @@ -1422,6 +1430,8 @@ static int be_open(struct net_device *netdev) if (status != 0) if (status != 0) goto do_none; goto do_none; be_vid_config(netdev); status = be_cmd_set_flow_control(ctrl, true, true); status = be_cmd_set_flow_control(ctrl, true, true); if (status != 0) if (status != 0) goto if_destroy; goto if_destroy; Loading Loading @@ -1856,8 +1866,6 @@ static int be_resume(struct pci_dev *pdev) pci_set_power_state(pdev, 0); pci_set_power_state(pdev, 0); pci_restore_state(pdev); pci_restore_state(pdev); be_vids_config(netdev); if (netif_running(netdev)) { if (netif_running(netdev)) { rtnl_lock(); rtnl_lock(); be_open(netdev); be_open(netdev); Loading drivers/net/dm9000.c +4 −2 Original line number Original line Diff line number Diff line Loading @@ -930,13 +930,15 @@ static irqreturn_t dm9000_interrupt(int irq, void *dev_id) struct net_device *dev = dev_id; struct net_device *dev = dev_id; board_info_t *db = netdev_priv(dev); board_info_t *db = netdev_priv(dev); int int_status; int int_status; unsigned long flags; u8 reg_save; u8 reg_save; dm9000_dbg(db, 3, "entering %s\n", __func__); dm9000_dbg(db, 3, "entering %s\n", __func__); /* A real interrupt coming */ /* A real interrupt coming */ spin_lock(&db->lock); /* holders of db->lock must always block IRQs */ spin_lock_irqsave(&db->lock, flags); /* Save previous register address */ /* Save previous register address */ reg_save = readb(db->io_addr); reg_save = readb(db->io_addr); Loading Loading @@ -972,7 +974,7 @@ static irqreturn_t dm9000_interrupt(int irq, void *dev_id) /* Restore previous register address */ /* Restore previous register address */ writeb(reg_save, db->io_addr); writeb(reg_save, db->io_addr); spin_unlock(&db->lock); spin_unlock_irqrestore(&db->lock, flags); return IRQ_HANDLED; return IRQ_HANDLED; } } Loading Loading
drivers/dca/dca-sysfs.c +21 −0 Original line number Original line Diff line number Diff line /* * Copyright(c) 2007 - 2009 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 59 * Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * The full GNU General Public License is included in this distribution in the * file called COPYING. */ #include <linux/kernel.h> #include <linux/kernel.h> #include <linux/spinlock.h> #include <linux/spinlock.h> #include <linux/device.h> #include <linux/device.h> Loading
drivers/net/Kconfig +1 −1 Original line number Original line Diff line number Diff line Loading @@ -1051,7 +1051,7 @@ config NI65 config DNET config DNET tristate "Dave ethernet support (DNET)" tristate "Dave ethernet support (DNET)" depends on NET_ETHERNET depends on NET_ETHERNET && HAS_IOMEM select PHYLIB select PHYLIB help help The Dave ethernet interface (DNET) is found on Qong Board FPGA. The Dave ethernet interface (DNET) is found on Qong Board FPGA. Loading
drivers/net/benet/be.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -194,6 +194,7 @@ struct be_adapter { struct be_eq_obj rx_eq; struct be_eq_obj rx_eq; struct be_rx_obj rx_obj; struct be_rx_obj rx_obj; u32 big_page_size; /* Compounded page size shared by rx wrbs */ u32 big_page_size; /* Compounded page size shared by rx wrbs */ bool rx_post_starved; /* Zero rx frags have been posted to BE */ struct vlan_group *vlan_grp; struct vlan_group *vlan_grp; u16 num_vlans; u16 num_vlans; Loading
drivers/net/benet/be_main.c +34 −26 Original line number Original line Diff line number Diff line Loading @@ -273,26 +273,6 @@ static void be_rx_eqd_update(struct be_adapter *adapter) rx_eq->cur_eqd = eqd; rx_eq->cur_eqd = eqd; } } static void be_worker(struct work_struct *work) { struct be_adapter *adapter = container_of(work, struct be_adapter, work.work); int status; /* Check link */ be_link_status_update(adapter); /* Get Stats */ status = be_cmd_get_stats(&adapter->ctrl, &adapter->stats.cmd); if (!status) netdev_stats_update(adapter); /* Set EQ delay */ be_rx_eqd_update(adapter); schedule_delayed_work(&adapter->work, msecs_to_jiffies(1000)); } static struct net_device_stats *be_get_stats(struct net_device *dev) static struct net_device_stats *be_get_stats(struct net_device *dev) { { struct be_adapter *adapter = netdev_priv(dev); struct be_adapter *adapter = netdev_priv(dev); Loading Loading @@ -493,7 +473,7 @@ static int be_change_mtu(struct net_device *netdev, int new_mtu) * program them in BE. If more than BE_NUM_VLANS_SUPPORTED are configured, * program them in BE. If more than BE_NUM_VLANS_SUPPORTED are configured, * set the BE in promiscuous VLAN mode. * set the BE in promiscuous VLAN mode. */ */ static void be_vids_config(struct net_device *netdev) static void be_vid_config(struct net_device *netdev) { { struct be_adapter *adapter = netdev_priv(netdev); struct be_adapter *adapter = netdev_priv(netdev); u16 vtag[BE_NUM_VLANS_SUPPORTED]; u16 vtag[BE_NUM_VLANS_SUPPORTED]; Loading Loading @@ -536,7 +516,7 @@ static void be_vlan_add_vid(struct net_device *netdev, u16 vid) adapter->num_vlans++; adapter->num_vlans++; adapter->vlan_tag[vid] = 1; adapter->vlan_tag[vid] = 1; be_vids_config(netdev); be_vid_config(netdev); } } static void be_vlan_rem_vid(struct net_device *netdev, u16 vid) static void be_vlan_rem_vid(struct net_device *netdev, u16 vid) Loading @@ -547,7 +527,7 @@ static void be_vlan_rem_vid(struct net_device *netdev, u16 vid) adapter->vlan_tag[vid] = 0; adapter->vlan_tag[vid] = 0; vlan_group_set_device(adapter->vlan_grp, vid, NULL); vlan_group_set_device(adapter->vlan_grp, vid, NULL); be_vids_config(netdev); be_vid_config(netdev); } } static void be_set_multicast_filter(struct net_device *netdev) static void be_set_multicast_filter(struct net_device *netdev) Loading Loading @@ -900,8 +880,11 @@ static void be_post_rx_frags(struct be_adapter *adapter) page_info->last_page_user = true; page_info->last_page_user = true; if (posted) { if (posted) { be_rxq_notify(&adapter->ctrl, rxq->id, posted); atomic_add(posted, &rxq->used); atomic_add(posted, &rxq->used); be_rxq_notify(&adapter->ctrl, rxq->id, posted); } else if (atomic_read(&rxq->used) == 0) { /* Let be_worker replenish when memory is available */ adapter->rx_post_starved = true; } } return; return; Loading Loading @@ -1305,6 +1288,31 @@ int be_poll_tx(struct napi_struct *napi, int budget) return 1; return 1; } } static void be_worker(struct work_struct *work) { struct be_adapter *adapter = container_of(work, struct be_adapter, work.work); int status; /* Check link */ be_link_status_update(adapter); /* Get Stats */ status = be_cmd_get_stats(&adapter->ctrl, &adapter->stats.cmd); if (!status) netdev_stats_update(adapter); /* Set EQ delay */ be_rx_eqd_update(adapter); if (adapter->rx_post_starved) { adapter->rx_post_starved = false; be_post_rx_frags(adapter); } schedule_delayed_work(&adapter->work, msecs_to_jiffies(1000)); } static void be_msix_enable(struct be_adapter *adapter) static void be_msix_enable(struct be_adapter *adapter) { { int i, status; int i, status; Loading Loading @@ -1422,6 +1430,8 @@ static int be_open(struct net_device *netdev) if (status != 0) if (status != 0) goto do_none; goto do_none; be_vid_config(netdev); status = be_cmd_set_flow_control(ctrl, true, true); status = be_cmd_set_flow_control(ctrl, true, true); if (status != 0) if (status != 0) goto if_destroy; goto if_destroy; Loading Loading @@ -1856,8 +1866,6 @@ static int be_resume(struct pci_dev *pdev) pci_set_power_state(pdev, 0); pci_set_power_state(pdev, 0); pci_restore_state(pdev); pci_restore_state(pdev); be_vids_config(netdev); if (netif_running(netdev)) { if (netif_running(netdev)) { rtnl_lock(); rtnl_lock(); be_open(netdev); be_open(netdev); Loading
drivers/net/dm9000.c +4 −2 Original line number Original line Diff line number Diff line Loading @@ -930,13 +930,15 @@ static irqreturn_t dm9000_interrupt(int irq, void *dev_id) struct net_device *dev = dev_id; struct net_device *dev = dev_id; board_info_t *db = netdev_priv(dev); board_info_t *db = netdev_priv(dev); int int_status; int int_status; unsigned long flags; u8 reg_save; u8 reg_save; dm9000_dbg(db, 3, "entering %s\n", __func__); dm9000_dbg(db, 3, "entering %s\n", __func__); /* A real interrupt coming */ /* A real interrupt coming */ spin_lock(&db->lock); /* holders of db->lock must always block IRQs */ spin_lock_irqsave(&db->lock, flags); /* Save previous register address */ /* Save previous register address */ reg_save = readb(db->io_addr); reg_save = readb(db->io_addr); Loading Loading @@ -972,7 +974,7 @@ static irqreturn_t dm9000_interrupt(int irq, void *dev_id) /* Restore previous register address */ /* Restore previous register address */ writeb(reg_save, db->io_addr); writeb(reg_save, db->io_addr); spin_unlock(&db->lock); spin_unlock_irqrestore(&db->lock, flags); return IRQ_HANDLED; return IRQ_HANDLED; } } Loading