Removed trailing spaces.
This commit is contained in:
parent
669e6a0ed0
commit
b0b7e6fde4
1062
Doxyfile.in
1062
Doxyfile.in
File diff suppressed because it is too large
Load Diff
2
FEATURES
2
FEATURES
|
|
@ -65,7 +65,7 @@ General Features:
|
|||
and configurable with standard tools.
|
||||
|
||||
* Implementation of the "Vendor-specific over EtherCAT" (VoE) mailbox protocol.
|
||||
- Communication with vendor-specific mailbox protocols via the API.
|
||||
- Communication with vendor-specific mailbox protocols via the API.
|
||||
|
||||
* Implementation of the "File Access over EtherCAT" (FoE) mailbox protocol.
|
||||
- Loading and storing files via the command-line tool.
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# ---
|
||||
#
|
||||
#
|
||||
# The license mentioned above concerns the source code only. Using the
|
||||
# EtherCAT technology and brand is only permitted in compliance with the
|
||||
# industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# ---
|
||||
#
|
||||
#
|
||||
# The license mentioned above concerns the source code only. Using the
|
||||
# EtherCAT technology and brand is only permitted in compliance with the
|
||||
# industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
14
bootstrap
14
bootstrap
|
|
@ -2,26 +2,26 @@
|
|||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
#
|
||||
# Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
#
|
||||
#
|
||||
# This file is part of the IgH EtherCAT Master.
|
||||
#
|
||||
#
|
||||
# The IgH EtherCAT Master is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License version 2, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
#
|
||||
# The IgH EtherCAT Master 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 the IgH EtherCAT Master; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
#
|
||||
# ---
|
||||
#
|
||||
#
|
||||
# The license mentioned above concerns the source code only. Using the
|
||||
# EtherCAT technology and brand is only permitted in compliance with the
|
||||
# industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -644,7 +644,7 @@ struct rtl8139_private {
|
|||
struct mii_if_info mii;
|
||||
unsigned int regs_len;
|
||||
unsigned long fifo_copy_timeout;
|
||||
|
||||
|
||||
ec_device_t *ecdev;
|
||||
};
|
||||
|
||||
|
|
@ -1068,7 +1068,7 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
|
|||
tp->mii.reg_num_mask = 0x1f;
|
||||
|
||||
/* dev is fully set up and ready to use now */
|
||||
|
||||
|
||||
// offer device to EtherCAT master module
|
||||
tp->ecdev = ecdev_offer(dev, ec_poll, THIS_MODULE);
|
||||
|
||||
|
|
|
|||
|
|
@ -644,7 +644,7 @@ struct rtl8139_private {
|
|||
struct mii_if_info mii;
|
||||
unsigned int regs_len;
|
||||
unsigned long fifo_copy_timeout;
|
||||
|
||||
|
||||
ec_device_t *ecdev;
|
||||
};
|
||||
|
||||
|
|
@ -1067,7 +1067,7 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
|
|||
tp->mii.reg_num_mask = 0x1f;
|
||||
|
||||
/* dev is fully set up and ready to use now */
|
||||
|
||||
|
||||
// offer device to EtherCAT master module
|
||||
tp->ecdev = ecdev_offer(dev, ec_poll, THIS_MODULE);
|
||||
|
||||
|
|
|
|||
|
|
@ -644,7 +644,7 @@ struct rtl8139_private {
|
|||
struct mii_if_info mii;
|
||||
unsigned int regs_len;
|
||||
unsigned long fifo_copy_timeout;
|
||||
|
||||
|
||||
ec_device_t *ecdev;
|
||||
};
|
||||
|
||||
|
|
@ -1067,7 +1067,7 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
|
|||
tp->mii.reg_num_mask = 0x1f;
|
||||
|
||||
/* dev is fully set up and ready to use now */
|
||||
|
||||
|
||||
// offer device to EtherCAT master module
|
||||
tp->ecdev = ecdev_offer(dev, ec_poll, THIS_MODULE);
|
||||
|
||||
|
|
|
|||
|
|
@ -653,7 +653,7 @@ struct rtl8139_private {
|
|||
struct mii_if_info mii;
|
||||
unsigned int regs_len;
|
||||
unsigned long fifo_copy_timeout;
|
||||
|
||||
|
||||
ec_device_t *ecdev;
|
||||
};
|
||||
|
||||
|
|
@ -1060,7 +1060,7 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
|
|||
tp->mii.reg_num_mask = 0x1f;
|
||||
|
||||
/* dev is fully set up and ready to use now */
|
||||
|
||||
|
||||
// offer device to EtherCAT master module
|
||||
tp->ecdev = ecdev_offer(dev, ec_poll, THIS_MODULE);
|
||||
|
||||
|
|
|
|||
|
|
@ -653,7 +653,7 @@ struct rtl8139_private {
|
|||
struct mii_if_info mii;
|
||||
unsigned int regs_len;
|
||||
unsigned long fifo_copy_timeout;
|
||||
|
||||
|
||||
ec_device_t *ecdev;
|
||||
};
|
||||
|
||||
|
|
@ -1060,7 +1060,7 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
|
|||
tp->mii.reg_num_mask = 0x1f;
|
||||
|
||||
/* dev is fully set up and ready to use now */
|
||||
|
||||
|
||||
// offer device to EtherCAT master module
|
||||
tp->ecdev = ecdev_offer(dev, ec_poll, THIS_MODULE);
|
||||
|
||||
|
|
|
|||
|
|
@ -653,7 +653,7 @@ struct rtl8139_private {
|
|||
struct mii_if_info mii;
|
||||
unsigned int regs_len;
|
||||
unsigned long fifo_copy_timeout;
|
||||
|
||||
|
||||
ec_device_t *ecdev;
|
||||
};
|
||||
|
||||
|
|
@ -1066,7 +1066,7 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
|
|||
tp->mii.reg_num_mask = 0x1f;
|
||||
|
||||
/* dev is fully set up and ready to use now */
|
||||
|
||||
|
||||
// offer device to EtherCAT master module
|
||||
tp->ecdev = ecdev_offer(dev, ec_poll, THIS_MODULE);
|
||||
|
||||
|
|
|
|||
|
|
@ -654,7 +654,7 @@ struct rtl8139_private {
|
|||
struct mii_if_info mii;
|
||||
unsigned int regs_len;
|
||||
unsigned long fifo_copy_timeout;
|
||||
|
||||
|
||||
ec_device_t *ecdev;
|
||||
};
|
||||
|
||||
|
|
@ -1066,7 +1066,7 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
|
|||
tp->mii.reg_num_mask = 0x1f;
|
||||
|
||||
/* dev is fully set up and ready to use now */
|
||||
|
||||
|
||||
// offer device to EtherCAT master module
|
||||
tp->ecdev = ecdev_offer(dev, ec_poll, THIS_MODULE);
|
||||
|
||||
|
|
@ -1811,24 +1811,24 @@ static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev)
|
|||
wmb();
|
||||
RTL_W32_F (TxStatus0 + (entry * sizeof (u32)),
|
||||
tp->tx_flag | max(len, (unsigned int)ETH_ZLEN));
|
||||
|
||||
|
||||
dev->trans_start = jiffies;
|
||||
|
||||
|
||||
tp->cur_tx++;
|
||||
} else {
|
||||
spin_lock_irqsave(&tp->lock, flags);
|
||||
wmb();
|
||||
RTL_W32_F (TxStatus0 + (entry * sizeof (u32)),
|
||||
tp->tx_flag | max(len, (unsigned int)ETH_ZLEN));
|
||||
|
||||
|
||||
dev->trans_start = jiffies;
|
||||
|
||||
|
||||
tp->cur_tx++;
|
||||
|
||||
|
||||
if ((tp->cur_tx - NUM_TX_DESC) == tp->dirty_tx)
|
||||
netif_stop_queue (dev);
|
||||
spin_unlock_irqrestore(&tp->lock, flags);
|
||||
|
||||
|
||||
if (netif_msg_tx_queued(tp))
|
||||
printk (KERN_DEBUG "%s: Queued Tx packet size %u to slot %d.\n",
|
||||
dev->name, len, entry);
|
||||
|
|
|
|||
|
|
@ -654,7 +654,7 @@ struct rtl8139_private {
|
|||
struct mii_if_info mii;
|
||||
unsigned int regs_len;
|
||||
unsigned long fifo_copy_timeout;
|
||||
|
||||
|
||||
ec_device_t *ecdev;
|
||||
};
|
||||
|
||||
|
|
@ -1066,7 +1066,7 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
|
|||
tp->mii.reg_num_mask = 0x1f;
|
||||
|
||||
/* dev is fully set up and ready to use now */
|
||||
|
||||
|
||||
// offer device to EtherCAT master module
|
||||
tp->ecdev = ecdev_offer(dev, ec_poll, THIS_MODULE);
|
||||
|
||||
|
|
@ -1811,24 +1811,24 @@ static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev)
|
|||
wmb();
|
||||
RTL_W32_F (TxStatus0 + (entry * sizeof (u32)),
|
||||
tp->tx_flag | max(len, (unsigned int)ETH_ZLEN));
|
||||
|
||||
|
||||
dev->trans_start = jiffies;
|
||||
|
||||
|
||||
tp->cur_tx++;
|
||||
} else {
|
||||
spin_lock_irqsave(&tp->lock, flags);
|
||||
wmb();
|
||||
RTL_W32_F (TxStatus0 + (entry * sizeof (u32)),
|
||||
tp->tx_flag | max(len, (unsigned int)ETH_ZLEN));
|
||||
|
||||
|
||||
dev->trans_start = jiffies;
|
||||
|
||||
|
||||
tp->cur_tx++;
|
||||
|
||||
|
||||
if ((tp->cur_tx - NUM_TX_DESC) == tp->dirty_tx)
|
||||
netif_stop_queue (dev);
|
||||
spin_unlock_irqrestore(&tp->lock, flags);
|
||||
|
||||
|
||||
if (netif_msg_tx_queued(tp))
|
||||
printk (KERN_DEBUG "%s: Queued Tx packet size %u to slot %d.\n",
|
||||
dev->name, len, entry);
|
||||
|
|
|
|||
|
|
@ -647,7 +647,7 @@ struct rtl8139_private {
|
|||
struct mii_if_info mii;
|
||||
unsigned int regs_len;
|
||||
unsigned long fifo_copy_timeout;
|
||||
|
||||
|
||||
ec_device_t *ecdev;
|
||||
};
|
||||
|
||||
|
|
@ -1799,9 +1799,9 @@ static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev)
|
|||
wmb();
|
||||
RTL_W32_F (TxStatus0 + (entry * sizeof (u32)),
|
||||
tp->tx_flag | max(len, (unsigned int)ETH_ZLEN));
|
||||
|
||||
|
||||
dev->trans_start = jiffies;
|
||||
|
||||
|
||||
tp->cur_tx++;
|
||||
} else {
|
||||
spin_lock_irqsave(&tp->lock, flags);
|
||||
|
|
|
|||
|
|
@ -647,7 +647,7 @@ struct rtl8139_private {
|
|||
struct mii_if_info mii;
|
||||
unsigned int regs_len;
|
||||
unsigned long fifo_copy_timeout;
|
||||
|
||||
|
||||
ec_device_t *ecdev;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -648,7 +648,7 @@ struct rtl8139_private {
|
|||
struct mii_if_info mii;
|
||||
unsigned int regs_len;
|
||||
unsigned long fifo_copy_timeout;
|
||||
|
||||
|
||||
ec_device_t *ecdev;
|
||||
};
|
||||
|
||||
|
|
@ -1800,9 +1800,9 @@ static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev)
|
|||
wmb();
|
||||
RTL_W32_F (TxStatus0 + (entry * sizeof (u32)),
|
||||
tp->tx_flag | max(len, (unsigned int)ETH_ZLEN));
|
||||
|
||||
|
||||
dev->trans_start = jiffies;
|
||||
|
||||
|
||||
tp->cur_tx++;
|
||||
} else {
|
||||
spin_lock_irqsave(&tp->lock, flags);
|
||||
|
|
|
|||
|
|
@ -648,7 +648,7 @@ struct rtl8139_private {
|
|||
struct mii_if_info mii;
|
||||
unsigned int regs_len;
|
||||
unsigned long fifo_copy_timeout;
|
||||
|
||||
|
||||
ec_device_t *ecdev;
|
||||
};
|
||||
|
||||
|
|
@ -1801,8 +1801,7 @@ static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev)
|
|||
wmb();
|
||||
RTL_W32_F (TxStatus0 + (entry * sizeof (u32)),
|
||||
tp->tx_flag | max(len, (unsigned int)ETH_ZLEN));
|
||||
|
||||
|
||||
|
||||
tp->cur_tx++;
|
||||
} else {
|
||||
spin_lock_irqsave(&tp->lock, flags);
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# ---
|
||||
#
|
||||
#
|
||||
# The license mentioned above concerns the source code only. Using the
|
||||
# EtherCAT technology and brand is only permitted in compliance with the
|
||||
# industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -2965,7 +2965,7 @@ static pci_ers_result_t e100_io_error_detected(struct pci_dev *pdev, pci_channel
|
|||
|
||||
/* Similar to calling e100_down(), but avoids adpater I/O. */
|
||||
netdev->stop(netdev);
|
||||
|
||||
|
||||
if (!nic->ecdev) {
|
||||
/* Detach; put netif into state similar to hotplug unplug. */
|
||||
napi_enable(&nic->napi);
|
||||
|
|
|
|||
|
|
@ -1097,7 +1097,7 @@ static void e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb)
|
|||
config->multicast_all = 0x1; /* 1=accept, 0=no */
|
||||
|
||||
/* disable WoL when up */
|
||||
if (nic->ecdev ||
|
||||
if (nic->ecdev ||
|
||||
(netif_running(nic->netdev) || !(nic->flags & wol_magic)))
|
||||
config->magic_packet_disable = 0x1; /* 1=off, 0=on */
|
||||
|
||||
|
|
@ -2997,7 +2997,7 @@ static int __init e100_init_module(void)
|
|||
{
|
||||
printk(KERN_INFO DRV_NAME " " DRV_DESCRIPTION " " DRV_VERSION
|
||||
", master " EC_MASTER_VERSION "\n");
|
||||
|
||||
|
||||
return pci_register_driver(&e100_driver);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1202,7 +1202,7 @@ static void e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb)
|
|||
config->multicast_all = 0x1; /* 1=accept, 0=no */
|
||||
|
||||
/* disable WoL when up */
|
||||
if (nic->ecdev ||
|
||||
if (nic->ecdev ||
|
||||
(netif_running(nic->netdev) || !(nic->flags & wol_magic)))
|
||||
config->magic_packet_disable = 0x1; /* 1=off, 0=on */
|
||||
|
||||
|
|
@ -3216,7 +3216,7 @@ static int __init e100_init_module(void)
|
|||
{
|
||||
printk(KERN_INFO DRV_NAME " " DRV_DESCRIPTION " " DRV_VERSION
|
||||
", master " EC_MASTER_VERSION "\n");
|
||||
|
||||
|
||||
return pci_register_driver(&e100_driver);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1205,7 +1205,7 @@ static void e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb)
|
|||
config->multicast_all = 0x1; /* 1=accept, 0=no */
|
||||
|
||||
/* disable WoL when up */
|
||||
if (nic->ecdev ||
|
||||
if (nic->ecdev ||
|
||||
(netif_running(nic->netdev) || !(nic->flags & wol_magic)))
|
||||
config->magic_packet_disable = 0x1; /* 1=off, 0=on */
|
||||
|
||||
|
|
@ -3239,7 +3239,7 @@ static int __init e100_init_module(void)
|
|||
{
|
||||
printk(KERN_INFO DRV_NAME " " DRV_DESCRIPTION " " DRV_VERSION
|
||||
", master " EC_MASTER_VERSION "\n");
|
||||
|
||||
|
||||
return pci_register_driver(&e100_driver);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1203,7 +1203,7 @@ static void e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb)
|
|||
config->multicast_all = 0x1; /* 1=accept, 0=no */
|
||||
|
||||
/* disable WoL when up */
|
||||
if (nic->ecdev ||
|
||||
if (nic->ecdev ||
|
||||
(netif_running(nic->netdev) || !(nic->flags & wol_magic)))
|
||||
config->magic_packet_disable = 0x1; /* 1=off, 0=on */
|
||||
|
||||
|
|
@ -3247,7 +3247,7 @@ static int __init e100_init_module(void)
|
|||
{
|
||||
printk(KERN_INFO DRV_NAME " " DRV_DESCRIPTION " " DRV_VERSION
|
||||
", master " EC_MASTER_VERSION "\n");
|
||||
|
||||
|
||||
return pci_register_driver(&e100_driver);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1204,7 +1204,7 @@ static void e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb)
|
|||
config->multicast_all = 0x1; /* 1=accept, 0=no */
|
||||
|
||||
/* disable WoL when up */
|
||||
if (nic->ecdev ||
|
||||
if (nic->ecdev ||
|
||||
(netif_running(nic->netdev) || !(nic->flags & wol_magic)))
|
||||
config->magic_packet_disable = 0x1; /* 1=off, 0=on */
|
||||
|
||||
|
|
|
|||
|
|
@ -1204,7 +1204,7 @@ static void e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb)
|
|||
config->multicast_all = 0x1; /* 1=accept, 0=no */
|
||||
|
||||
/* disable WoL when up */
|
||||
if (nic->ecdev ||
|
||||
if (nic->ecdev ||
|
||||
(netif_running(nic->netdev) || !(nic->flags & wol_magic)))
|
||||
config->magic_packet_disable = 0x1; /* 1=off, 0=on */
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# ---
|
||||
#
|
||||
#
|
||||
# The license mentioned above concerns the source code only. Using the
|
||||
# EtherCAT technology and brand is only permitted in compliance with the
|
||||
# industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -2178,7 +2178,7 @@ e1000_leave_82542_rst(struct e1000_adapter *adapter)
|
|||
/* No need to loop, because 82542 supports only 1 queue */
|
||||
struct e1000_rx_ring *ring = &adapter->rx_ring[0];
|
||||
e1000_configure_rx(adapter);
|
||||
if (adapter->ecdev) {
|
||||
if (adapter->ecdev) {
|
||||
/* fill rx ring completely! */
|
||||
adapter->alloc_rx_buf(adapter, ring, ring->count);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
Linux NICS <linux.nics@intel.com>
|
||||
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
|
||||
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
|
||||
|
||||
|
||||
vim: noexpandtab
|
||||
|
||||
*******************************************************************************/
|
||||
|
|
@ -2403,7 +2403,7 @@ e1000_leave_82542_rst(struct e1000_adapter *adapter)
|
|||
/* No need to loop, because 82542 supports only 1 queue */
|
||||
struct e1000_rx_ring *ring = &adapter->rx_ring[0];
|
||||
e1000_configure_rx(adapter);
|
||||
if (adapter->ecdev) {
|
||||
if (adapter->ecdev) {
|
||||
/* fill rx ring completely! */
|
||||
adapter->alloc_rx_buf(adapter, ring, ring->count);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -2404,7 +2404,7 @@ e1000_leave_82542_rst(struct e1000_adapter *adapter)
|
|||
/* No need to loop, because 82542 supports only 1 queue */
|
||||
struct e1000_rx_ring *ring = &adapter->rx_ring[0];
|
||||
e1000_configure_rx(adapter);
|
||||
if (adapter->ecdev) {
|
||||
if (adapter->ecdev) {
|
||||
/* fill rx ring completely! */
|
||||
adapter->alloc_rx_buf(adapter, ring, ring->count);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -2402,7 +2402,7 @@ e1000_leave_82542_rst(struct e1000_adapter *adapter)
|
|||
/* No need to loop, because 82542 supports only 1 queue */
|
||||
struct e1000_rx_ring *ring = &adapter->rx_ring[0];
|
||||
e1000_configure_rx(adapter);
|
||||
if (adapter->ecdev) {
|
||||
if (adapter->ecdev) {
|
||||
/* fill rx ring completely! */
|
||||
adapter->alloc_rx_buf(adapter, ring, ring->count);
|
||||
} else {
|
||||
|
|
@ -3849,7 +3849,7 @@ e1000_intr_msi(int irq, void *data)
|
|||
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||
struct e1000_hw *hw = &adapter->hw;
|
||||
int i;
|
||||
|
||||
|
||||
if (adapter->ecdev) {
|
||||
#ifdef CONFIG_E1000_NAPI
|
||||
int ec_work_done = 0;
|
||||
|
|
@ -4013,7 +4013,7 @@ e1000_intr(int irq, void *data)
|
|||
atomic_inc(&adapter->irq_sem);
|
||||
E1000_WRITE_REG(hw, IMC, ~0);
|
||||
}
|
||||
|
||||
|
||||
adapter->total_tx_bytes = 0;
|
||||
adapter->total_rx_bytes = 0;
|
||||
adapter->total_tx_packets = 0;
|
||||
|
|
|
|||
|
|
@ -672,7 +672,7 @@ e1000_down(struct e1000_adapter *adapter)
|
|||
netdev->tx_queue_len = adapter->tx_queue_len;
|
||||
adapter->link_speed = 0;
|
||||
adapter->link_duplex = 0;
|
||||
|
||||
|
||||
if (!adapter->ecdev) {
|
||||
netif_carrier_off(netdev);
|
||||
netif_stop_queue(netdev);
|
||||
|
|
@ -2467,7 +2467,7 @@ e1000_leave_82542_rst(struct e1000_adapter *adapter)
|
|||
/* No need to loop, because 82542 supports only 1 queue */
|
||||
struct e1000_rx_ring *ring = &adapter->rx_ring[0];
|
||||
e1000_configure_rx(adapter);
|
||||
if (adapter->ecdev) {
|
||||
if (adapter->ecdev) {
|
||||
/* fill rx ring completely! */
|
||||
adapter->alloc_rx_buf(adapter, ring, ring->count);
|
||||
} else {
|
||||
|
|
@ -3924,7 +3924,7 @@ e1000_intr_msi(int irq, void *data)
|
|||
struct net_device *netdev = data;
|
||||
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||
struct e1000_hw *hw = &adapter->hw;
|
||||
|
||||
|
||||
int i;
|
||||
|
||||
if (adapter->ecdev) {
|
||||
|
|
@ -4103,7 +4103,7 @@ e1000_intr(int irq, void *data)
|
|||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ static int e1000_request_irq(struct e1000_adapter *adapter)
|
|||
|
||||
if (adapter->ecdev)
|
||||
return 0;
|
||||
|
||||
|
||||
if (hw->mac_type >= e1000_82571) {
|
||||
adapter->have_msi = !pci_enable_msi(adapter->pdev);
|
||||
if (adapter->have_msi) {
|
||||
|
|
@ -331,7 +331,7 @@ static void e1000_irq_enable(struct e1000_adapter *adapter)
|
|||
|
||||
if (adapter->ecdev)
|
||||
return;
|
||||
|
||||
|
||||
ew32(IMS, IMS_ENABLE_MASK);
|
||||
E1000_WRITE_FLUSH();
|
||||
}
|
||||
|
|
@ -2440,7 +2440,7 @@ static void e1000_leave_82542_rst(struct e1000_adapter *adapter)
|
|||
/* No need to loop, because 82542 supports only 1 queue */
|
||||
struct e1000_rx_ring *ring = &adapter->rx_ring[0];
|
||||
e1000_configure_rx(adapter);
|
||||
if (adapter->ecdev) {
|
||||
if (adapter->ecdev) {
|
||||
/* fill rx ring completely! */
|
||||
adapter->alloc_rx_buf(adapter, ring, ring->count);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ static int e1000_request_irq(struct e1000_adapter *adapter)
|
|||
|
||||
if (adapter->ecdev)
|
||||
return 0;
|
||||
|
||||
|
||||
if (hw->mac_type >= e1000_82571) {
|
||||
adapter->have_msi = !pci_enable_msi(adapter->pdev);
|
||||
if (adapter->have_msi) {
|
||||
|
|
@ -325,7 +325,7 @@ static void e1000_irq_enable(struct e1000_adapter *adapter)
|
|||
|
||||
if (adapter->ecdev)
|
||||
return;
|
||||
|
||||
|
||||
ew32(IMS, IMS_ENABLE_MASK);
|
||||
E1000_WRITE_FLUSH();
|
||||
}
|
||||
|
|
@ -2320,7 +2320,7 @@ static void e1000_leave_82542_rst(struct e1000_adapter *adapter)
|
|||
/* No need to loop, because 82542 supports only 1 queue */
|
||||
struct e1000_rx_ring *ring = &adapter->rx_ring[0];
|
||||
e1000_configure_rx(adapter);
|
||||
if (adapter->ecdev) {
|
||||
if (adapter->ecdev) {
|
||||
/* fill rx ring completely! */
|
||||
adapter->alloc_rx_buf(adapter, ring, ring->count);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ static int e1000_request_irq(struct e1000_adapter *adapter)
|
|||
|
||||
if (adapter->ecdev)
|
||||
return 0;
|
||||
|
||||
|
||||
if (hw->mac_type >= e1000_82571) {
|
||||
adapter->have_msi = !pci_enable_msi(adapter->pdev);
|
||||
if (adapter->have_msi) {
|
||||
|
|
@ -323,7 +323,7 @@ static void e1000_irq_enable(struct e1000_adapter *adapter)
|
|||
|
||||
if (adapter->ecdev)
|
||||
return;
|
||||
|
||||
|
||||
ew32(IMS, IMS_ENABLE_MASK);
|
||||
E1000_WRITE_FLUSH();
|
||||
}
|
||||
|
|
@ -2296,7 +2296,7 @@ static void e1000_leave_82542_rst(struct e1000_adapter *adapter)
|
|||
/* No need to loop, because 82542 supports only 1 queue */
|
||||
struct e1000_rx_ring *ring = &adapter->rx_ring[0];
|
||||
e1000_configure_rx(adapter);
|
||||
if (adapter->ecdev) {
|
||||
if (adapter->ecdev) {
|
||||
/* fill rx ring completely! */
|
||||
adapter->alloc_rx_buf(adapter, ring, ring->count);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ static void e1000_irq_enable(struct e1000_adapter *adapter)
|
|||
|
||||
if (adapter->ecdev)
|
||||
return;
|
||||
|
||||
|
||||
ew32(IMS, IMS_ENABLE_MASK);
|
||||
E1000_WRITE_FLUSH();
|
||||
}
|
||||
|
|
@ -2314,7 +2314,7 @@ static void e1000_leave_82542_rst(struct e1000_adapter *adapter)
|
|||
/* No need to loop, because 82542 supports only 1 queue */
|
||||
struct e1000_rx_ring *ring = &adapter->rx_ring[0];
|
||||
e1000_configure_rx(adapter);
|
||||
if (adapter->ecdev) {
|
||||
if (adapter->ecdev) {
|
||||
/* fill rx ring completely! */
|
||||
adapter->alloc_rx_buf(adapter, ring, ring->count);
|
||||
} else {
|
||||
|
|
@ -2541,7 +2541,7 @@ static void e1000_82547_tx_fifo_stall(unsigned long data)
|
|||
|
||||
adapter->tx_fifo_head = 0;
|
||||
atomic_set(&adapter->tx_fifo_stall, 0);
|
||||
if (!adapter->ecdev)
|
||||
if (!adapter->ecdev)
|
||||
netif_wake_queue(netdev);
|
||||
} else {
|
||||
if (!adapter->ecdev)
|
||||
|
|
|
|||
|
|
@ -2088,7 +2088,7 @@ static void e1000_leave_82542_rst(struct e1000_adapter *adapter)
|
|||
/* No need to loop, because 82542 supports only 1 queue */
|
||||
struct e1000_rx_ring *ring = &adapter->rx_ring[0];
|
||||
e1000_configure_rx(adapter);
|
||||
if (adapter->ecdev) {
|
||||
if (adapter->ecdev) {
|
||||
/* fill rx ring completely! */
|
||||
adapter->alloc_rx_buf(adapter, ring, ring->count);
|
||||
} else {
|
||||
|
|
@ -2291,7 +2291,7 @@ static void e1000_82547_tx_fifo_stall(unsigned long data)
|
|||
atomic_set(&adapter->tx_fifo_stall, 0);
|
||||
if (!adapter->ecdev) netif_wake_queue(netdev);
|
||||
} else if (!test_bit(__E1000_DOWN, &adapter->flags)) {
|
||||
if (!adapter->ecdev)
|
||||
if (!adapter->ecdev)
|
||||
mod_timer(&adapter->tx_fifo_stall_timer, jiffies + 1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -317,7 +317,7 @@ static void e1000_irq_enable(struct e1000_adapter *adapter)
|
|||
|
||||
if (adapter->ecdev)
|
||||
return;
|
||||
|
||||
|
||||
ew32(IMS, IMS_ENABLE_MASK);
|
||||
E1000_WRITE_FLUSH();
|
||||
}
|
||||
|
|
@ -2095,7 +2095,7 @@ static void e1000_leave_82542_rst(struct e1000_adapter *adapter)
|
|||
/* No need to loop, because 82542 supports only 1 queue */
|
||||
struct e1000_rx_ring *ring = &adapter->rx_ring[0];
|
||||
e1000_configure_rx(adapter);
|
||||
if (adapter->ecdev) {
|
||||
if (adapter->ecdev) {
|
||||
/* fill rx ring completely! */
|
||||
adapter->alloc_rx_buf(adapter, ring, ring->count);
|
||||
} else {
|
||||
|
|
@ -2298,7 +2298,7 @@ static void e1000_82547_tx_fifo_stall(unsigned long data)
|
|||
atomic_set(&adapter->tx_fifo_stall, 0);
|
||||
if (!adapter->ecdev) netif_wake_queue(netdev);
|
||||
} else if (!test_bit(__E1000_DOWN, &adapter->flags)) {
|
||||
if (!adapter->ecdev)
|
||||
if (!adapter->ecdev)
|
||||
mod_timer(&adapter->tx_fifo_stall_timer, jiffies + 1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
Linux NICS <linux.nics@intel.com>
|
||||
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
|
||||
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
|
||||
|
||||
|
||||
vim: noexpandtab
|
||||
|
||||
*******************************************************************************/
|
||||
|
|
@ -326,7 +326,7 @@ static void e1000_irq_enable(struct e1000_adapter *adapter)
|
|||
|
||||
if (adapter->ecdev)
|
||||
return;
|
||||
|
||||
|
||||
ew32(IMS, IMS_ENABLE_MASK);
|
||||
E1000_WRITE_FLUSH();
|
||||
}
|
||||
|
|
@ -2104,7 +2104,7 @@ static void e1000_leave_82542_rst(struct e1000_adapter *adapter)
|
|||
/* No need to loop, because 82542 supports only 1 queue */
|
||||
struct e1000_rx_ring *ring = &adapter->rx_ring[0];
|
||||
e1000_configure_rx(adapter);
|
||||
if (adapter->ecdev) {
|
||||
if (adapter->ecdev) {
|
||||
/* fill rx ring completely! */
|
||||
adapter->alloc_rx_buf(adapter, ring, ring->count);
|
||||
} else {
|
||||
|
|
@ -2301,7 +2301,7 @@ static void e1000_82547_tx_fifo_stall(unsigned long data)
|
|||
if (!adapter->ecdev)
|
||||
netif_wake_queue(netdev);
|
||||
} else if (!test_bit(__E1000_DOWN, &adapter->flags)) {
|
||||
if (!adapter->ecdev)
|
||||
if (!adapter->ecdev)
|
||||
mod_timer(&adapter->tx_fifo_stall_timer, jiffies + 1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
Linux NICS <linux.nics@intel.com>
|
||||
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
|
||||
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
|
||||
|
||||
|
||||
vim: noexpandtab
|
||||
|
||||
*******************************************************************************/
|
||||
|
|
@ -332,7 +332,7 @@ static void e1000_irq_enable(struct e1000_adapter *adapter)
|
|||
if (adapter->ecdev) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
ew32(IMS, IMS_ENABLE_MASK);
|
||||
E1000_WRITE_FLUSH();
|
||||
}
|
||||
|
|
@ -2160,7 +2160,7 @@ static void e1000_leave_82542_rst(struct e1000_adapter *adapter)
|
|||
/* No need to loop, because 82542 supports only 1 queue */
|
||||
struct e1000_rx_ring *ring = &adapter->rx_ring[0];
|
||||
e1000_configure_rx(adapter);
|
||||
if (adapter->ecdev) {
|
||||
if (adapter->ecdev) {
|
||||
/* fill rx ring completely! */
|
||||
adapter->alloc_rx_buf(adapter, ring, ring->count);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# ---
|
||||
#
|
||||
#
|
||||
# The license mentioned above concerns the source code only. Using the
|
||||
# EtherCAT technology and brand is only permitted in compliance with the
|
||||
# industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -2929,7 +2929,7 @@ int e1000e_up(struct e1000_adapter *adapter)
|
|||
|
||||
clear_bit(__E1000_DOWN, &adapter->state);
|
||||
|
||||
if (!adapter->ecdev)
|
||||
if (!adapter->ecdev)
|
||||
napi_enable(&adapter->napi);
|
||||
|
||||
if (adapter->msix_entries)
|
||||
|
|
@ -2963,7 +2963,7 @@ void e1000e_down(struct e1000_adapter *adapter)
|
|||
ew32(RCTL, rctl & ~E1000_RCTL_EN);
|
||||
/* flush and sleep below */
|
||||
|
||||
if (!adapter->ecdev)
|
||||
if (!adapter->ecdev)
|
||||
netif_stop_queue(netdev);
|
||||
|
||||
/* disable transmits in the hardware */
|
||||
|
|
@ -3665,7 +3665,7 @@ static void e1000_watchdog_task(struct work_struct *work)
|
|||
e1000_update_mng_vlan(adapter);
|
||||
|
||||
if (link) {
|
||||
if ((adapter->ecdev && !ecdev_get_link(adapter->ecdev))
|
||||
if ((adapter->ecdev && !ecdev_get_link(adapter->ecdev))
|
||||
|| (!adapter->ecdev && !netif_carrier_ok(netdev))) {
|
||||
bool txb2b = 1;
|
||||
/* update snapshot of PHY registers on LSC */
|
||||
|
|
@ -3765,7 +3765,7 @@ static void e1000_watchdog_task(struct work_struct *work)
|
|||
|
||||
if (adapter->ecdev)
|
||||
ecdev_set_link(adapter->ecdev, 1);
|
||||
else
|
||||
else
|
||||
netif_carrier_on(netdev);
|
||||
|
||||
if (!adapter->ecdev && !test_bit(__E1000_DOWN, &adapter->state))
|
||||
|
|
@ -3773,7 +3773,7 @@ static void e1000_watchdog_task(struct work_struct *work)
|
|||
round_jiffies(jiffies + 2 * HZ));
|
||||
}
|
||||
} else {
|
||||
if ((adapter->ecdev && ecdev_get_link(adapter->ecdev))
|
||||
if ((adapter->ecdev && ecdev_get_link(adapter->ecdev))
|
||||
|| (!adapter->ecdev && netif_carrier_ok(netdev))) {
|
||||
adapter->link_speed = 0;
|
||||
adapter->link_duplex = 0;
|
||||
|
|
@ -3808,7 +3808,7 @@ link_up:
|
|||
|
||||
e1000e_update_adaptive(&adapter->hw);
|
||||
|
||||
if ((adapter->ecdev && !ecdev_get_link(adapter->ecdev))
|
||||
if ((adapter->ecdev && !ecdev_get_link(adapter->ecdev))
|
||||
|| (!adapter->ecdev && !netif_carrier_ok(netdev))) {
|
||||
tx_pending = (e1000_desc_unused(tx_ring) + 1 <
|
||||
tx_ring->count);
|
||||
|
|
@ -4857,7 +4857,7 @@ static void e1000_shutdown(struct pci_dev *pdev)
|
|||
bool wake = false;
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
|
||||
if (adapter->ecdev)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -2913,7 +2913,7 @@ int e1000e_up(struct e1000_adapter *adapter)
|
|||
|
||||
clear_bit(__E1000_DOWN, &adapter->state);
|
||||
|
||||
if (!adapter->ecdev)
|
||||
if (!adapter->ecdev)
|
||||
napi_enable(&adapter->napi);
|
||||
|
||||
if (adapter->msix_entries)
|
||||
|
|
@ -2947,7 +2947,7 @@ void e1000e_down(struct e1000_adapter *adapter)
|
|||
ew32(RCTL, rctl & ~E1000_RCTL_EN);
|
||||
/* flush and sleep below */
|
||||
|
||||
if (!adapter->ecdev)
|
||||
if (!adapter->ecdev)
|
||||
netif_stop_queue(netdev);
|
||||
|
||||
/* disable transmits in the hardware */
|
||||
|
|
@ -3654,7 +3654,7 @@ static void e1000_watchdog_task(struct work_struct *work)
|
|||
e1000_update_mng_vlan(adapter);
|
||||
|
||||
if (link) {
|
||||
if ((adapter->ecdev && !ecdev_get_link(adapter->ecdev))
|
||||
if ((adapter->ecdev && !ecdev_get_link(adapter->ecdev))
|
||||
|| (!adapter->ecdev && !netif_carrier_ok(netdev))) {
|
||||
bool txb2b = 1;
|
||||
/* update snapshot of PHY registers on LSC */
|
||||
|
|
@ -3754,7 +3754,7 @@ static void e1000_watchdog_task(struct work_struct *work)
|
|||
|
||||
if (adapter->ecdev)
|
||||
ecdev_set_link(adapter->ecdev, 1);
|
||||
else
|
||||
else
|
||||
netif_carrier_on(netdev);
|
||||
|
||||
if (!adapter->ecdev && !test_bit(__E1000_DOWN, &adapter->state))
|
||||
|
|
@ -3762,7 +3762,7 @@ static void e1000_watchdog_task(struct work_struct *work)
|
|||
round_jiffies(jiffies + 2 * HZ));
|
||||
}
|
||||
} else {
|
||||
if ((adapter->ecdev && ecdev_get_link(adapter->ecdev))
|
||||
if ((adapter->ecdev && ecdev_get_link(adapter->ecdev))
|
||||
|| (!adapter->ecdev && netif_carrier_ok(netdev))) {
|
||||
adapter->link_speed = 0;
|
||||
adapter->link_duplex = 0;
|
||||
|
|
@ -3797,7 +3797,7 @@ link_up:
|
|||
|
||||
e1000e_update_adaptive(&adapter->hw);
|
||||
|
||||
if ((adapter->ecdev && !ecdev_get_link(adapter->ecdev))
|
||||
if ((adapter->ecdev && !ecdev_get_link(adapter->ecdev))
|
||||
|| (!adapter->ecdev && !netif_carrier_ok(netdev))) {
|
||||
tx_pending = (e1000_desc_unused(tx_ring) + 1 <
|
||||
tx_ring->count);
|
||||
|
|
@ -4859,7 +4859,7 @@ static void e1000_shutdown(struct pci_dev *pdev)
|
|||
bool wake = false;
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
|
||||
if (adapter->ecdev)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -2892,7 +2892,7 @@ int e1000e_up(struct e1000_adapter *adapter)
|
|||
|
||||
clear_bit(__E1000_DOWN, &adapter->state);
|
||||
|
||||
if (!adapter->ecdev)
|
||||
if (!adapter->ecdev)
|
||||
napi_enable(&adapter->napi);
|
||||
|
||||
if (adapter->msix_entries)
|
||||
|
|
@ -2926,7 +2926,7 @@ void e1000e_down(struct e1000_adapter *adapter)
|
|||
ew32(RCTL, rctl & ~E1000_RCTL_EN);
|
||||
/* flush and sleep below */
|
||||
|
||||
if (!adapter->ecdev)
|
||||
if (!adapter->ecdev)
|
||||
netif_stop_queue(netdev);
|
||||
|
||||
/* disable transmits in the hardware */
|
||||
|
|
@ -3634,7 +3634,7 @@ static void e1000_watchdog_task(struct work_struct *work)
|
|||
e1000_update_mng_vlan(adapter);
|
||||
|
||||
if (link) {
|
||||
if ((adapter->ecdev && !ecdev_get_link(adapter->ecdev))
|
||||
if ((adapter->ecdev && !ecdev_get_link(adapter->ecdev))
|
||||
|| (!adapter->ecdev && !netif_carrier_ok(netdev))) {
|
||||
bool txb2b = 1;
|
||||
/* update snapshot of PHY registers on LSC */
|
||||
|
|
@ -3728,7 +3728,7 @@ static void e1000_watchdog_task(struct work_struct *work)
|
|||
|
||||
if (adapter->ecdev)
|
||||
ecdev_set_link(adapter->ecdev, 1);
|
||||
else
|
||||
else
|
||||
netif_carrier_on(netdev);
|
||||
|
||||
if (!adapter->ecdev && !test_bit(__E1000_DOWN, &adapter->state))
|
||||
|
|
@ -3736,7 +3736,7 @@ static void e1000_watchdog_task(struct work_struct *work)
|
|||
round_jiffies(jiffies + 2 * HZ));
|
||||
}
|
||||
} else {
|
||||
if ((adapter->ecdev && ecdev_get_link(adapter->ecdev))
|
||||
if ((adapter->ecdev && ecdev_get_link(adapter->ecdev))
|
||||
|| (!adapter->ecdev && netif_carrier_ok(netdev))) {
|
||||
adapter->link_speed = 0;
|
||||
adapter->link_duplex = 0;
|
||||
|
|
@ -3771,7 +3771,7 @@ link_up:
|
|||
|
||||
e1000e_update_adaptive(&adapter->hw);
|
||||
|
||||
if ((adapter->ecdev && !ecdev_get_link(adapter->ecdev))
|
||||
if ((adapter->ecdev && !ecdev_get_link(adapter->ecdev))
|
||||
|| (!adapter->ecdev && !netif_carrier_ok(netdev))) {
|
||||
tx_pending = (e1000_desc_unused(tx_ring) + 1 <
|
||||
tx_ring->count);
|
||||
|
|
@ -4855,7 +4855,7 @@ static void e1000_shutdown(struct pci_dev *pdev)
|
|||
bool wake = false;
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
|
||||
if (adapter->ecdev)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -3306,7 +3306,7 @@ void e1000e_down(struct e1000_adapter *adapter)
|
|||
ew32(RCTL, rctl & ~E1000_RCTL_EN);
|
||||
/* flush and sleep below */
|
||||
|
||||
if (!adapter->ecdev)
|
||||
if (!adapter->ecdev)
|
||||
netif_stop_queue(netdev);
|
||||
|
||||
/* disable transmits in the hardware */
|
||||
|
|
@ -4044,7 +4044,7 @@ static void e1000_watchdog_task(struct work_struct *work)
|
|||
e1000_update_mng_vlan(adapter);
|
||||
|
||||
if (link) {
|
||||
if ((adapter->ecdev && !ecdev_get_link(adapter->ecdev))
|
||||
if ((adapter->ecdev && !ecdev_get_link(adapter->ecdev))
|
||||
|| (!adapter->ecdev && !netif_carrier_ok(netdev))) {
|
||||
bool txb2b = 1;
|
||||
|
||||
|
|
@ -4142,7 +4142,7 @@ static void e1000_watchdog_task(struct work_struct *work)
|
|||
|
||||
if (adapter->ecdev)
|
||||
ecdev_set_link(adapter->ecdev, 1);
|
||||
else
|
||||
else
|
||||
netif_carrier_on(netdev);
|
||||
|
||||
if (!adapter->ecdev && !test_bit(__E1000_DOWN, &adapter->state))
|
||||
|
|
@ -4150,7 +4150,7 @@ static void e1000_watchdog_task(struct work_struct *work)
|
|||
round_jiffies(jiffies + 2 * HZ));
|
||||
}
|
||||
} else {
|
||||
if ((adapter->ecdev && ecdev_get_link(adapter->ecdev))
|
||||
if ((adapter->ecdev && ecdev_get_link(adapter->ecdev))
|
||||
|| (!adapter->ecdev && netif_carrier_ok(netdev))) {
|
||||
adapter->link_speed = 0;
|
||||
adapter->link_duplex = 0;
|
||||
|
|
@ -4188,7 +4188,7 @@ link_up:
|
|||
|
||||
e1000e_update_adaptive(&adapter->hw);
|
||||
|
||||
if ((adapter->ecdev && !ecdev_get_link(adapter->ecdev))
|
||||
if ((adapter->ecdev && !ecdev_get_link(adapter->ecdev))
|
||||
|| (!adapter->ecdev && !netif_carrier_ok(netdev))) {
|
||||
tx_pending = (e1000_desc_unused(tx_ring) + 1 <
|
||||
tx_ring->count);
|
||||
|
|
@ -5359,7 +5359,7 @@ static void e1000_shutdown(struct pci_dev *pdev)
|
|||
bool wake = false;
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
|
||||
if (adapter->ecdev)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -3414,7 +3414,7 @@ void e1000e_down(struct e1000_adapter *adapter)
|
|||
ew32(RCTL, rctl & ~E1000_RCTL_EN);
|
||||
/* flush and sleep below */
|
||||
|
||||
if (!adapter->ecdev)
|
||||
if (!adapter->ecdev)
|
||||
netif_stop_queue(netdev);
|
||||
|
||||
/* disable transmits in the hardware */
|
||||
|
|
@ -4236,7 +4236,7 @@ static void e1000_watchdog_task(struct work_struct *work)
|
|||
e1000_update_mng_vlan(adapter);
|
||||
|
||||
if (link) {
|
||||
if ((adapter->ecdev && !ecdev_get_link(adapter->ecdev))
|
||||
if ((adapter->ecdev && !ecdev_get_link(adapter->ecdev))
|
||||
|| (!adapter->ecdev && !netif_carrier_ok(netdev))) {
|
||||
bool txb2b = 1;
|
||||
|
||||
|
|
@ -4334,7 +4334,7 @@ static void e1000_watchdog_task(struct work_struct *work)
|
|||
|
||||
if (adapter->ecdev)
|
||||
ecdev_set_link(adapter->ecdev, 1);
|
||||
else
|
||||
else
|
||||
netif_carrier_on(netdev);
|
||||
|
||||
if (!adapter->ecdev && !test_bit(__E1000_DOWN, &adapter->state))
|
||||
|
|
@ -4342,7 +4342,7 @@ static void e1000_watchdog_task(struct work_struct *work)
|
|||
round_jiffies(jiffies + 2 * HZ));
|
||||
}
|
||||
} else {
|
||||
if ((adapter->ecdev && ecdev_get_link(adapter->ecdev))
|
||||
if ((adapter->ecdev && ecdev_get_link(adapter->ecdev))
|
||||
|| (!adapter->ecdev && netif_carrier_ok(netdev))) {
|
||||
adapter->link_speed = 0;
|
||||
adapter->link_duplex = 0;
|
||||
|
|
@ -4380,7 +4380,7 @@ link_up:
|
|||
|
||||
e1000e_update_adaptive(&adapter->hw);
|
||||
|
||||
if ((adapter->ecdev && !ecdev_get_link(adapter->ecdev))
|
||||
if ((adapter->ecdev && !ecdev_get_link(adapter->ecdev))
|
||||
|| (!adapter->ecdev && !netif_carrier_ok(netdev))) {
|
||||
tx_pending = (e1000_desc_unused(tx_ring) + 1 <
|
||||
tx_ring->count);
|
||||
|
|
@ -5564,7 +5564,7 @@ static void e1000_shutdown(struct pci_dev *pdev)
|
|||
bool wake = false;
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
|
||||
if (adapter->ecdev)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -3575,7 +3575,7 @@ void e1000e_down(struct e1000_adapter *adapter)
|
|||
ew32(RCTL, rctl & ~E1000_RCTL_EN);
|
||||
/* flush and sleep below */
|
||||
|
||||
if (!adapter->ecdev)
|
||||
if (!adapter->ecdev)
|
||||
netif_stop_queue(netdev);
|
||||
|
||||
/* disable transmits in the hardware */
|
||||
|
|
@ -4391,7 +4391,7 @@ static void e1000_watchdog_task(struct work_struct *work)
|
|||
e1000_update_mng_vlan(adapter);
|
||||
|
||||
if (link) {
|
||||
if ((adapter->ecdev && !ecdev_get_link(adapter->ecdev))
|
||||
if ((adapter->ecdev && !ecdev_get_link(adapter->ecdev))
|
||||
|| (!adapter->ecdev && !netif_carrier_ok(netdev))) {
|
||||
bool txb2b = 1;
|
||||
|
||||
|
|
@ -4489,7 +4489,7 @@ static void e1000_watchdog_task(struct work_struct *work)
|
|||
|
||||
if (adapter->ecdev)
|
||||
ecdev_set_link(adapter->ecdev, 1);
|
||||
else
|
||||
else
|
||||
netif_carrier_on(netdev);
|
||||
|
||||
if (!adapter->ecdev && !test_bit(__E1000_DOWN, &adapter->state))
|
||||
|
|
@ -4497,7 +4497,7 @@ static void e1000_watchdog_task(struct work_struct *work)
|
|||
round_jiffies(jiffies + 2 * HZ));
|
||||
}
|
||||
} else {
|
||||
if ((adapter->ecdev && ecdev_get_link(adapter->ecdev))
|
||||
if ((adapter->ecdev && ecdev_get_link(adapter->ecdev))
|
||||
|| (!adapter->ecdev && netif_carrier_ok(netdev))) {
|
||||
adapter->link_speed = 0;
|
||||
adapter->link_duplex = 0;
|
||||
|
|
@ -4537,7 +4537,7 @@ link_up:
|
|||
|
||||
e1000e_update_adaptive(&adapter->hw);
|
||||
|
||||
if ((adapter->ecdev && !ecdev_get_link(adapter->ecdev))
|
||||
if ((adapter->ecdev && !ecdev_get_link(adapter->ecdev))
|
||||
|| (!adapter->ecdev && (!netif_carrier_ok(netdev) &&
|
||||
(e1000_desc_unused(tx_ring) + 1 < tx_ring->count)))) {
|
||||
/*
|
||||
|
|
@ -5767,7 +5767,7 @@ static void e1000_shutdown(struct pci_dev *pdev)
|
|||
bool wake = false;
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
|
||||
if (adapter->ecdev)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -3910,7 +3910,7 @@ static int rtl8169_suspend(struct device *device)
|
|||
struct pci_dev *pdev = to_pci_dev(device);
|
||||
struct net_device *dev = pci_get_drvdata(pdev);
|
||||
struct rtl8169_private *tp = netdev_priv(dev);
|
||||
|
||||
|
||||
if (tp->ecdev)
|
||||
return -EBUSY;
|
||||
|
||||
|
|
@ -3924,7 +3924,7 @@ static int rtl8169_resume(struct device *device)
|
|||
struct pci_dev *pdev = to_pci_dev(device);
|
||||
struct net_device *dev = pci_get_drvdata(pdev);
|
||||
struct rtl8169_private *tp = netdev_priv(dev);
|
||||
|
||||
|
||||
if (tp->ecdev)
|
||||
return -EBUSY;
|
||||
|
||||
|
|
|
|||
|
|
@ -2704,7 +2704,7 @@ static void rtl8169_phy_timer(unsigned long __opaque)
|
|||
|
||||
if (!tp->ecdev)
|
||||
spin_lock_irq(&tp->lock);
|
||||
|
||||
|
||||
if (tp->phy_reset_pending(ioaddr)) {
|
||||
/*
|
||||
* A busy loop could burn quite a few cycles on nowadays CPU.
|
||||
|
|
@ -3319,7 +3319,6 @@ static int rtl8169_open(struct net_device *dev)
|
|||
goto err_release_ring_2;
|
||||
|
||||
napi_enable(&tp->napi);
|
||||
|
||||
}
|
||||
|
||||
rtl_hw_start(dev);
|
||||
|
|
@ -4765,7 +4764,6 @@ static void rtl8169_down(struct net_device *dev)
|
|||
netif_stop_queue(dev);
|
||||
|
||||
napi_disable(&tp->napi);
|
||||
|
||||
}
|
||||
|
||||
core_down:
|
||||
|
|
@ -4925,7 +4923,7 @@ static int rtl8169_suspend(struct device *device)
|
|||
struct pci_dev *pdev = to_pci_dev(device);
|
||||
struct net_device *dev = pci_get_drvdata(pdev);
|
||||
struct rtl8169_private *tp = netdev_priv(dev);
|
||||
|
||||
|
||||
if (tp->ecdev)
|
||||
return -EBUSY;
|
||||
|
||||
|
|
|
|||
|
|
@ -2709,7 +2709,7 @@ static void rtl8169_phy_timer(unsigned long __opaque)
|
|||
|
||||
if (!tp->ecdev)
|
||||
spin_lock_irq(&tp->lock);
|
||||
|
||||
|
||||
if (tp->phy_reset_pending(ioaddr)) {
|
||||
/*
|
||||
* A busy loop could burn quite a few cycles on nowadays CPU.
|
||||
|
|
@ -3339,7 +3339,6 @@ static int rtl8169_open(struct net_device *dev)
|
|||
goto err_release_ring_2;
|
||||
|
||||
napi_enable(&tp->napi);
|
||||
|
||||
}
|
||||
|
||||
rtl_hw_start(dev);
|
||||
|
|
@ -4943,7 +4942,7 @@ static int rtl8169_suspend(struct device *device)
|
|||
struct pci_dev *pdev = to_pci_dev(device);
|
||||
struct net_device *dev = pci_get_drvdata(pdev);
|
||||
struct rtl8169_private *tp = netdev_priv(dev);
|
||||
|
||||
|
||||
if (tp->ecdev)
|
||||
return -EBUSY;
|
||||
|
||||
|
|
|
|||
|
|
@ -2733,7 +2733,7 @@ static void rtl8169_phy_timer(unsigned long __opaque)
|
|||
|
||||
if (!tp->ecdev)
|
||||
spin_lock_irq(&tp->lock);
|
||||
|
||||
|
||||
if (tp->phy_reset_pending(ioaddr)) {
|
||||
/*
|
||||
* A busy loop could burn quite a few cycles on nowadays CPU.
|
||||
|
|
@ -3354,7 +3354,6 @@ static int rtl8169_open(struct net_device *dev)
|
|||
goto err_release_ring_2;
|
||||
|
||||
napi_enable(&tp->napi);
|
||||
|
||||
}
|
||||
|
||||
rtl_hw_start(dev);
|
||||
|
|
@ -4809,7 +4808,6 @@ static void rtl8169_down(struct net_device *dev)
|
|||
netif_stop_queue(dev);
|
||||
|
||||
napi_disable(&tp->napi);
|
||||
|
||||
}
|
||||
|
||||
core_down:
|
||||
|
|
@ -4970,7 +4968,7 @@ static int rtl8169_suspend(struct device *device)
|
|||
struct pci_dev *pdev = to_pci_dev(device);
|
||||
struct net_device *dev = pci_get_drvdata(pdev);
|
||||
struct rtl8169_private *tp = netdev_priv(dev);
|
||||
|
||||
|
||||
if (tp->ecdev)
|
||||
return -EBUSY;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
% $Id$
|
||||
%
|
||||
% vi: spell spelllang=en tw=78
|
||||
%
|
||||
%
|
||||
%------------------------------------------------------------------------------
|
||||
|
||||
\documentclass[a4paper,12pt,BCOR6mm,bibtotoc,idxtotoc]{scrbook}
|
||||
|
|
@ -926,7 +926,7 @@ the corresponding port. The master can read out the relative receive times,
|
|||
then calculate time delays between the slaves (using its knowledge of the bus
|
||||
topology), and finally calculate the time delays from the reference clock to
|
||||
each slave. These values are programmed into the slaves' transmission delay
|
||||
registers. In this way, the drift compensation can reach nanosecond synchrony.
|
||||
registers. In this way, the drift compensation can reach nanosecond synchrony.
|
||||
|
||||
\paragraph{Checking Synchrony} DC-capable slaves provide the 32-bit ``System
|
||||
time difference'' register at address \lstinline+0x092c+, where the system
|
||||
|
|
@ -1805,7 +1805,7 @@ configured.
|
|||
|
||||
\item[FMMU Configuration] If there are FMMUs configurations supplied by the
|
||||
application (i.\,e.\ if the application registered PDO entries), they are
|
||||
applied.
|
||||
applied.
|
||||
|
||||
\item[SAFEOP] The state change FSM is used to bring the slave to SAFEOP state.
|
||||
If this is the requested state, the state machine is finished.
|
||||
|
|
@ -3092,7 +3092,7 @@ install the EtherCAT header, init script, sysconfig file and the userspace
|
|||
tool to the prefix path. The second one will install the kernel modules to the
|
||||
kernel's modules directory. The final \lstinline+depmod+ call is necessary to
|
||||
include the kernel modules into the \textit{modules.dep} file to make it
|
||||
available to the \lstinline+modprobe+ command, used in the init script.
|
||||
available to the \lstinline+modprobe+ command, used in the init script.
|
||||
|
||||
\begin{lstlisting}
|
||||
# `\textbf{make install}`
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ digraph master {
|
|||
action_next_slave_state [shape=point,label=""]
|
||||
action_next_slave_state -> read_state
|
||||
action_next_slave_state -> action_idle [weight=10]
|
||||
|
||||
|
||||
action_configure [shape=point,label=""]
|
||||
action_configure -> configure_slave [weight=10]
|
||||
action_configure -> action_next_slave_state
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# ---
|
||||
#
|
||||
#
|
||||
# The license mentioned above concerns the source code only. Using the
|
||||
# EtherCAT technology and brand is only permitted in compliance with the
|
||||
# industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# ---
|
||||
#
|
||||
#
|
||||
# The license mentioned above concerns the source code only. Using the
|
||||
# EtherCAT technology and brand is only permitted in compliance with the
|
||||
# industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# ---
|
||||
#
|
||||
#
|
||||
# The license mentioned above concerns the source code only. Using the
|
||||
# EtherCAT technology and brand is only permitted in compliance with the
|
||||
# industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# ---
|
||||
#
|
||||
#
|
||||
# The license mentioned above concerns the source code only. Using the
|
||||
# EtherCAT technology and brand is only permitted in compliance with the
|
||||
# industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# ---
|
||||
#
|
||||
#
|
||||
# The license mentioned above concerns the source code only. Using the
|
||||
# EtherCAT technology and brand is only permitted in compliance with the
|
||||
# industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ void run(long data)
|
|||
tv.tv_sec++;
|
||||
}
|
||||
ecrt_master_application_time(master, EC_TIMEVAL2NANO(tv));
|
||||
|
||||
|
||||
if (sync_ref_counter) {
|
||||
sync_ref_counter--;
|
||||
} else {
|
||||
|
|
@ -280,7 +280,7 @@ int __init init_mod(void)
|
|||
|
||||
master = ecrt_request_master(0);
|
||||
if (!master) {
|
||||
ret = -EBUSY;
|
||||
ret = -EBUSY;
|
||||
printk(KERN_ERR PFX "Requesting master 0 failed!\n");
|
||||
goto out_return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# ---
|
||||
#
|
||||
#
|
||||
# The license mentioned above concerns the source code only. Using the
|
||||
# EtherCAT technology and brand is only permitted in compliance with the
|
||||
# industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
(B).tv_nsec - (A).tv_nsec)
|
||||
|
||||
#define TIMESPEC2NS(T) ((uint64_t) (T).tv_sec * NSEC_PER_SEC + (T).tv_nsec)
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
// EtherCAT
|
||||
|
|
@ -208,11 +208,11 @@ void cyclic_task()
|
|||
#ifdef MEASURE_TIMING
|
||||
// output timing stats
|
||||
printf("period %10u ... %10u\n",
|
||||
period_min_ns, period_max_ns);
|
||||
period_min_ns, period_max_ns);
|
||||
printf("exec %10u ... %10u\n",
|
||||
exec_min_ns, exec_max_ns);
|
||||
exec_min_ns, exec_max_ns);
|
||||
printf("latency %10u ... %10u\n",
|
||||
latency_min_ns, latency_max_ns);
|
||||
latency_min_ns, latency_max_ns);
|
||||
period_max_ns = 0;
|
||||
period_min_ns = 0xffffffff;
|
||||
exec_max_ns = 0;
|
||||
|
|
@ -261,7 +261,7 @@ int main(int argc, char **argv)
|
|||
perror("mlockall failed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
master = ecrt_request_master(0);
|
||||
if (!master)
|
||||
return -1;
|
||||
|
|
@ -320,7 +320,7 @@ int main(int argc, char **argv)
|
|||
|
||||
printf("Starting cyclic function.\n");
|
||||
cyclic_task();
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# ---
|
||||
#
|
||||
#
|
||||
# The license mentioned above concerns the source code only. Using the
|
||||
# EtherCAT technology and brand is only permitted in compliance with the
|
||||
# industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# ---
|
||||
#
|
||||
#
|
||||
# The license mentioned above concerns the source code only. Using the
|
||||
# EtherCAT technology and brand is only permitted in compliance with the
|
||||
# industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@ void cyclic_task(unsigned long data)
|
|||
|
||||
// check for islave configuration state(s) (optional)
|
||||
check_slave_config_states();
|
||||
|
||||
|
||||
#if SDO_ACCESS
|
||||
// read process data SDO
|
||||
read_sdo();
|
||||
|
|
@ -387,12 +387,12 @@ int __init init_mini_module(void)
|
|||
#if EXTERNAL_MEMORY
|
||||
unsigned int size;
|
||||
#endif
|
||||
|
||||
|
||||
printk(KERN_INFO PFX "Starting...\n");
|
||||
|
||||
master = ecrt_request_master(0);
|
||||
if (!master) {
|
||||
ret = -EBUSY;
|
||||
ret = -EBUSY;
|
||||
printk(KERN_ERR PFX "Requesting master 0 failed.\n");
|
||||
goto out_return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# ---
|
||||
#
|
||||
#
|
||||
# The license mentioned above concerns the source code only. Using the
|
||||
# EtherCAT technology and brand is only permitted in compliance with the
|
||||
# industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# ---
|
||||
#
|
||||
#
|
||||
# The license mentioned above concerns the source code only. Using the
|
||||
# EtherCAT technology and brand is only permitted in compliance with the
|
||||
# industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ int __init init_mod(void)
|
|||
|
||||
master = ecrt_request_master(0);
|
||||
if (!master) {
|
||||
ret = -EBUSY;
|
||||
ret = -EBUSY;
|
||||
printk(KERN_ERR PFX "Requesting master 0 failed!\n");
|
||||
goto out_return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# ---
|
||||
#
|
||||
#
|
||||
# The license mentioned above concerns the source code only. Using the
|
||||
# EtherCAT technology and brand is only permitted in compliance with the
|
||||
# industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# ---
|
||||
#
|
||||
#
|
||||
# The license mentioned above concerns the source code only. Using the
|
||||
# EtherCAT technology and brand is only permitted in compliance with the
|
||||
# industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ typedef struct {
|
|||
} el6002_t;
|
||||
|
||||
LIST_HEAD(handlers);
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/* Beckhoff EL6002
|
||||
|
|
@ -300,7 +300,7 @@ int el60xx_cflag_changed(void *data, tcflag_t cflag)
|
|||
rtscts = cflag & CRTSCTS;
|
||||
printk(KERN_INFO PFX "%s: Requested RTS/CTS: %s.\n",
|
||||
port->name, rtscts ? "yes" : "no");
|
||||
|
||||
|
||||
cbaud = cflag & CBAUD;
|
||||
|
||||
for (i = 0; i < sizeof(el600x_baud_rate) / sizeof(el600x_baud_rate_t);
|
||||
|
|
|
|||
|
|
@ -175,13 +175,13 @@ int __init init_mini_module(void)
|
|||
{
|
||||
int ret = -1;
|
||||
ec_slave_config_t *sc;
|
||||
|
||||
|
||||
printk(KERN_INFO PFX "Starting...\n");
|
||||
|
||||
master = ecrt_request_master(0);
|
||||
if (!master) {
|
||||
printk(KERN_ERR PFX "Requesting master 0 failed.\n");
|
||||
ret = -EBUSY;
|
||||
ret = -EBUSY;
|
||||
goto out_return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# ---
|
||||
#
|
||||
#
|
||||
# The license mentioned above concerns the source code only. Using the
|
||||
# EtherCAT technology and brand is only permitted in compliance with the
|
||||
# industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@ int main(int argc, char **argv)
|
|||
ec_slave_config_t *sc;
|
||||
struct sigaction sa;
|
||||
struct itimerval tv;
|
||||
|
||||
|
||||
master = ecrt_request_master(0);
|
||||
if (!master)
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# ---
|
||||
#
|
||||
#
|
||||
# The license mentioned above concerns the source code only. Using the
|
||||
# EtherCAT technology and brand is only permitted in compliance with the
|
||||
# industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT master userspace library.
|
||||
*
|
||||
*
|
||||
* The IgH EtherCAT master userspace library is free software; you can
|
||||
* redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License as published by the Free Software Foundation; version 2.1
|
||||
|
|
@ -19,9 +19,9 @@
|
|||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
* ---
|
||||
*
|
||||
*
|
||||
* The license mentioned above concerns the source code only. Using the
|
||||
* EtherCAT technology and brand is only permitted in compliance with the
|
||||
* industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
#include <linux/termios.h>
|
||||
|
||||
/******************************************************************************
|
||||
* Data types
|
||||
* Data types
|
||||
*****************************************************************************/
|
||||
|
||||
struct ec_tty;
|
||||
|
|
|
|||
|
|
@ -1,25 +1,25 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
#
|
||||
# Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
#
|
||||
#
|
||||
# This file is part of the IgH EtherCAT master userspace library.
|
||||
#
|
||||
#
|
||||
# The IgH EtherCAT master userspace library is free software; you can
|
||||
# redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
# Public License as published by the Free Software Foundation; version 2.1 of
|
||||
# the License.
|
||||
#
|
||||
#
|
||||
# The IgH EtherCAT master userspace library 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 Lesser General Public License for more details.
|
||||
#
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with the IgH EtherCAT master userspace library. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#
|
||||
# ---
|
||||
#
|
||||
# The license mentioned above concerns the source code only. Using the
|
||||
|
|
|
|||
20
lib/domain.c
20
lib/domain.c
|
|
@ -1,11 +1,11 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
*
|
||||
* This file is part of the IgH EtherCAT master userspace library.
|
||||
*
|
||||
*
|
||||
* The IgH EtherCAT master userspace library is free software; you can
|
||||
* redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License as published by the Free Software Foundation; version 2.1
|
||||
|
|
@ -19,9 +19,9 @@
|
|||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
* ---
|
||||
*
|
||||
*
|
||||
* The license mentioned above concerns the source code only. Using the
|
||||
* EtherCAT technology and brand is only permitted in compliance with the
|
||||
* industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
@ -60,7 +60,7 @@ int ecrt_domain_reg_pdo_entry_list(ec_domain_t *domain,
|
|||
const ec_pdo_entry_reg_t *reg;
|
||||
ec_slave_config_t *sc;
|
||||
int ret;
|
||||
|
||||
|
||||
for (reg = regs; reg->index; reg++) {
|
||||
if (!(sc = ecrt_master_slave_config(domain->master, reg->alias,
|
||||
reg->position, reg->vendor_id, reg->product_code)))
|
||||
|
|
@ -88,9 +88,9 @@ uint8_t *ecrt_domain_data(ec_domain_t *domain)
|
|||
if (offset == -1) {
|
||||
fprintf(stderr, "Failed to get domain offset: %s\n",
|
||||
strerror(errno));
|
||||
return NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
domain->process_data = domain->master->process_data + offset;
|
||||
}
|
||||
|
||||
|
|
@ -125,7 +125,7 @@ void ecrt_domain_state(const ec_domain_t *domain, ec_domain_state_t *state)
|
|||
|
||||
data.domain_index = domain->index;
|
||||
data.state = state;
|
||||
|
||||
|
||||
if (ioctl(domain->master->fd, EC_IOCTL_DOMAIN_STATE, &data) == -1) {
|
||||
fprintf(stderr, "Failed to get domain state: %s\n",
|
||||
strerror(errno));
|
||||
|
|
|
|||
12
lib/domain.h
12
lib/domain.h
|
|
@ -1,11 +1,11 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
*
|
||||
* This file is part of the IgH EtherCAT master userspace library.
|
||||
*
|
||||
*
|
||||
* The IgH EtherCAT master userspace library is free software; you can
|
||||
* redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License as published by the Free Software Foundation; version 2.1
|
||||
|
|
@ -19,9 +19,9 @@
|
|||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
* ---
|
||||
*
|
||||
*
|
||||
* The license mentioned above concerns the source code only. Using the
|
||||
* EtherCAT technology and brand is only permitted in compliance with the
|
||||
* industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
12
lib/master.h
12
lib/master.h
|
|
@ -1,11 +1,11 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
*
|
||||
* This file is part of the IgH EtherCAT master userspace library.
|
||||
*
|
||||
*
|
||||
* The IgH EtherCAT master userspace library is free software; you can
|
||||
* redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License as published by the Free Software Foundation; version 2.1
|
||||
|
|
@ -19,9 +19,9 @@
|
|||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
* ---
|
||||
*
|
||||
*
|
||||
* The license mentioned above concerns the source code only. Using the
|
||||
* EtherCAT technology and brand is only permitted in compliance with the
|
||||
* industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
*
|
||||
* This file is part of the IgH EtherCAT master userspace library.
|
||||
*
|
||||
*
|
||||
* The IgH EtherCAT master userspace library is free software; you can
|
||||
* redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License as published by the Free Software Foundation; version 2.1
|
||||
|
|
@ -19,9 +19,9 @@
|
|||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
* ---
|
||||
*
|
||||
*
|
||||
* The license mentioned above concerns the source code only. Using the
|
||||
* EtherCAT technology and brand is only permitted in compliance with the
|
||||
* industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
*
|
||||
* This file is part of the IgH EtherCAT master userspace library.
|
||||
*
|
||||
*
|
||||
* The IgH EtherCAT master userspace library is free software; you can
|
||||
* redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License as published by the Free Software Foundation; version 2.1
|
||||
|
|
@ -19,9 +19,9 @@
|
|||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
* ---
|
||||
*
|
||||
*
|
||||
* The license mentioned above concerns the source code only. Using the
|
||||
* EtherCAT technology and brand is only permitted in compliance with the
|
||||
* industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
*
|
||||
* This file is part of the IgH EtherCAT master userspace library.
|
||||
*
|
||||
*
|
||||
* The IgH EtherCAT master userspace library is free software; you can
|
||||
* redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License as published by the Free Software Foundation; version 2.1
|
||||
|
|
@ -19,9 +19,9 @@
|
|||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
* ---
|
||||
*
|
||||
*
|
||||
* The license mentioned above concerns the source code only. Using the
|
||||
* EtherCAT technology and brand is only permitted in compliance with the
|
||||
* industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
@ -86,7 +86,7 @@ int ecrt_slave_config_sync_manager(ec_slave_config_t *sc, uint8_t sync_index,
|
|||
strerror(errno));
|
||||
return -1; // FIXME
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -124,7 +124,7 @@ int ecrt_slave_config_pdo_assign_add(ec_slave_config_t *sc,
|
|||
strerror(errno));
|
||||
return -1; // FIXME
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -163,7 +163,7 @@ int ecrt_slave_config_pdo_mapping_add(ec_slave_config_t *sc,
|
|||
strerror(errno));
|
||||
return -1; // FIXME
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -428,13 +428,13 @@ ec_sdo_request_t *ecrt_slave_config_create_sdo_request(ec_slave_config_t *sc,
|
|||
data.sdo_index = index;
|
||||
data.sdo_subindex = subindex;
|
||||
data.size = size;
|
||||
|
||||
|
||||
if (ioctl(sc->master->fd, EC_IOCTL_SC_SDO_REQUEST, &data) == -1) {
|
||||
fprintf(stderr, "Failed to create SDO request: %s\n",
|
||||
strerror(errno));
|
||||
ec_sdo_request_clear(req);
|
||||
free(req);
|
||||
return NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
req->next = NULL;
|
||||
|
|
@ -495,13 +495,13 @@ ec_voe_handler_t *ecrt_slave_config_create_voe_handler(ec_slave_config_t *sc,
|
|||
|
||||
data.config_index = sc->index;
|
||||
data.size = size;
|
||||
|
||||
|
||||
if (ioctl(sc->master->fd, EC_IOCTL_SC_VOE, &data) == -1) {
|
||||
fprintf(stderr, "Failed to create VoE handler: %s\n",
|
||||
strerror(errno));
|
||||
ec_voe_handler_clear(voe);
|
||||
free(voe);
|
||||
return NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
voe->next = NULL;
|
||||
|
|
@ -524,7 +524,7 @@ void ecrt_slave_config_state(const ec_slave_config_t *sc,
|
|||
|
||||
data.config_index = sc->index;
|
||||
data.state = state;
|
||||
|
||||
|
||||
if (ioctl(sc->master->fd, EC_IOCTL_SC_STATE, &data) == -1) {
|
||||
fprintf(stderr, "Failed to get slave configuration state: %s\n",
|
||||
strerror(errno));
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
*
|
||||
* This file is part of the IgH EtherCAT master userspace library.
|
||||
*
|
||||
*
|
||||
* The IgH EtherCAT master userspace library is free software; you can
|
||||
* redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License as published by the Free Software Foundation; version 2.1
|
||||
|
|
@ -19,9 +19,9 @@
|
|||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
* ---
|
||||
*
|
||||
*
|
||||
* The license mentioned above concerns the source code only. Using the
|
||||
* EtherCAT technology and brand is only permitted in compliance with the
|
||||
* industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
*
|
||||
* This file is part of the IgH EtherCAT master userspace library.
|
||||
*
|
||||
*
|
||||
* The IgH EtherCAT master userspace library is free software; you can
|
||||
* redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License as published by the Free Software Foundation; version 2.1
|
||||
|
|
@ -19,9 +19,9 @@
|
|||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
* ---
|
||||
*
|
||||
*
|
||||
* The license mentioned above concerns the source code only. Using the
|
||||
* EtherCAT technology and brand is only permitted in compliance with the
|
||||
* industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
*
|
||||
* This file is part of the IgH EtherCAT master userspace library.
|
||||
*
|
||||
*
|
||||
* The IgH EtherCAT master userspace library is free software; you can
|
||||
* redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License as published by the Free Software Foundation; version 2.1
|
||||
|
|
@ -19,9 +19,9 @@
|
|||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
* ---
|
||||
*
|
||||
*
|
||||
* The license mentioned above concerns the source code only. Using the
|
||||
* EtherCAT technology and brand is only permitted in compliance with the
|
||||
* industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# ---
|
||||
#
|
||||
#
|
||||
# The license mentioned above concerns the source code only. Using the
|
||||
# EtherCAT technology and brand is only permitted in compliance with the
|
||||
# industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# ---
|
||||
#
|
||||
#
|
||||
# The license mentioned above concerns the source code only. Using the EtherCAT
|
||||
# technology and brand is only permitted in compliance with the industrial
|
||||
# property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# ---
|
||||
#
|
||||
#
|
||||
# The license mentioned above concerns the source code only. Using the
|
||||
# EtherCAT technology and brand is only permitted in compliance with the
|
||||
# industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ typedef struct {
|
|||
/*****************************************************************************/
|
||||
|
||||
/** Constructor.
|
||||
*
|
||||
*
|
||||
* \return 0 in case of success, else < 0
|
||||
*/
|
||||
int ec_cdev_init(
|
||||
|
|
@ -1674,12 +1674,12 @@ int ec_cdev_ioctl_activate(
|
|||
ec_domain_t *domain;
|
||||
off_t offset;
|
||||
int ret;
|
||||
|
||||
|
||||
if (unlikely(!priv->requested))
|
||||
return -EPERM;
|
||||
|
||||
/* Get the sum of the domains' process data sizes. */
|
||||
|
||||
|
||||
priv->process_data_size = 0;
|
||||
|
||||
if (down_interruptible(&master->master_sem))
|
||||
|
|
@ -1688,7 +1688,7 @@ int ec_cdev_ioctl_activate(
|
|||
list_for_each_entry(domain, &master->domains, list) {
|
||||
priv->process_data_size += ecrt_domain_size(domain);
|
||||
}
|
||||
|
||||
|
||||
up(&master->master_sem);
|
||||
|
||||
if (priv->process_data_size) {
|
||||
|
|
@ -1813,7 +1813,7 @@ int ec_cdev_ioctl_master_state(
|
|||
)
|
||||
{
|
||||
ec_master_state_t data;
|
||||
|
||||
|
||||
if (unlikely(!priv->requested))
|
||||
return -EPERM;
|
||||
|
||||
|
|
@ -1870,7 +1870,7 @@ int ec_cdev_ioctl_app_time(
|
|||
)
|
||||
{
|
||||
ec_ioctl_app_time_t data;
|
||||
|
||||
|
||||
if (unlikely(!priv->requested))
|
||||
return -EPERM;
|
||||
|
||||
|
|
@ -2458,7 +2458,7 @@ int ec_cdev_ioctl_sc_state(
|
|||
ec_ioctl_sc_state_t data;
|
||||
const ec_slave_config_t *sc;
|
||||
ec_slave_config_state_t state;
|
||||
|
||||
|
||||
if (unlikely(!priv->requested))
|
||||
return -EPERM;
|
||||
|
||||
|
|
@ -2630,7 +2630,7 @@ int ec_cdev_ioctl_domain_state(
|
|||
ec_ioctl_domain_state_t data;
|
||||
const ec_domain_t *domain;
|
||||
ec_domain_state_t state;
|
||||
|
||||
|
||||
if (unlikely(!priv->requested))
|
||||
return -EPERM;
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ static const char *type_strings[] = {
|
|||
"ARMW",
|
||||
"FRMW"
|
||||
};
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/** Constructor.
|
||||
|
|
@ -622,7 +622,7 @@ void ec_datagram_output_stats(
|
|||
{
|
||||
if (jiffies - datagram->stats_output_jiffies > HZ) {
|
||||
datagram->stats_output_jiffies = jiffies;
|
||||
|
||||
|
||||
if (unlikely(datagram->skip_count)) {
|
||||
EC_WARN("Datagram %p (%s) was SKIPPED %u time%s.\n",
|
||||
datagram, datagram->name,
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
/** Constructor.
|
||||
*
|
||||
*
|
||||
* \return 0 in case of success, else < 0
|
||||
*/
|
||||
int ec_device_init(
|
||||
|
|
@ -524,7 +524,7 @@ void ecdev_withdraw(ec_device_t *device /**< EtherCAT device */)
|
|||
}
|
||||
|
||||
EC_MASTER_INFO(master, "Releasing %s device %s.\n", dev_str, mac_str);
|
||||
|
||||
|
||||
down(&master->device_sem);
|
||||
ec_device_detach(device);
|
||||
up(&master->device_sem);
|
||||
|
|
@ -587,7 +587,7 @@ void ecdev_close(ec_device_t *device /**< EtherCAT device */)
|
|||
*
|
||||
* Forwards the received data to the master. The master will analyze the frame
|
||||
* and dispatch the received commands to the sending instances.
|
||||
*
|
||||
*
|
||||
* \ingroup DeviceInterface
|
||||
*/
|
||||
void ecdev_receive(
|
||||
|
|
@ -631,7 +631,7 @@ void ecdev_receive(
|
|||
*
|
||||
* If the device notifies the master about the link being down, the master
|
||||
* will not try to send frames using this device.
|
||||
*
|
||||
*
|
||||
* \ingroup DeviceInterface
|
||||
*/
|
||||
void ecdev_set_link(
|
||||
|
|
|
|||
|
|
@ -509,7 +509,7 @@ void ec_eoe_state_rx_fetch(ec_eoe_t *eoe /**< EoE handler */)
|
|||
#if EOE_DEBUG_LEVEL >= 2
|
||||
EC_SLAVE_DBG(eoe->slave, 0, "EoE %s RX fragment %u%s, offset %u,"
|
||||
" frame %u%s, %u octets\n", eoe->dev->name, fragment_number,
|
||||
last_fragment ? "" : "+", fragment_offset, frame_number,
|
||||
last_fragment ? "" : "+", fragment_offset, frame_number,
|
||||
time_appended ? ", + timestamp" : "",
|
||||
time_appended ? rec_size - 8 : rec_size - 4);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ void ec_fsm_pdo_read_action_next_pdo(
|
|||
}
|
||||
|
||||
// finished reading PDO configuration
|
||||
|
||||
|
||||
ec_pdo_list_copy(&fsm->sync->pdos, &fsm->pdos);
|
||||
ec_pdo_list_clear_pdos(&fsm->pdos);
|
||||
|
||||
|
|
@ -389,7 +389,7 @@ ec_pdo_t *ec_fsm_pdo_conf_action_next_pdo(
|
|||
const struct list_head *list /**< current PDO list item */
|
||||
)
|
||||
{
|
||||
list = list->next;
|
||||
list = list->next;
|
||||
if (list == &fsm->pdos.list)
|
||||
return NULL; // no next PDO
|
||||
return list_entry(list, ec_pdo_t, list);
|
||||
|
|
@ -406,7 +406,7 @@ void ec_fsm_pdo_conf_action_next_sync(
|
|||
fsm->sync_index++;
|
||||
|
||||
for (; fsm->sync_index < EC_MAX_SYNC_MANAGERS; fsm->sync_index++) {
|
||||
if (!fsm->slave->config) {
|
||||
if (!fsm->slave->config) {
|
||||
// slave configuration removed in the meantime
|
||||
fsm->state = ec_fsm_pdo_state_error;
|
||||
return;
|
||||
|
|
@ -418,7 +418,7 @@ void ec_fsm_pdo_conf_action_next_sync(
|
|||
fsm->state = ec_fsm_pdo_state_error;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!(fsm->sync = ec_slave_get_sync(fsm->slave, fsm->sync_index))) {
|
||||
if (!list_empty(&fsm->pdos.list))
|
||||
EC_SLAVE_WARN(fsm->slave, "PDOs configured for SM%u,"
|
||||
|
|
@ -464,7 +464,7 @@ void ec_fsm_pdo_conf_action_pdo_mapping(
|
|||
if (list_empty(&fsm->slave_pdo.entries)) {
|
||||
EC_SLAVE_DBG(fsm->slave, 1, "Reading mapping of PDO 0x%04X.\n",
|
||||
fsm->pdo->index);
|
||||
|
||||
|
||||
// pdo mapping is unknown; start loading it
|
||||
ec_fsm_pdo_entry_start_reading(&fsm->fsm_pdo_entry, fsm->slave,
|
||||
&fsm->slave_pdo);
|
||||
|
|
@ -639,7 +639,7 @@ void ec_fsm_pdo_conf_state_zero_pdo_count(
|
|||
ec_pdo_list_clear_pdos(&fsm->sync->pdos);
|
||||
|
||||
// assign all PDOs belonging to the current sync manager
|
||||
|
||||
|
||||
// find first PDO
|
||||
if (!(fsm->pdo = ec_fsm_pdo_conf_action_next_pdo(fsm, &fsm->pdos.list))) {
|
||||
|
||||
|
|
@ -669,7 +669,7 @@ void ec_fsm_pdo_conf_action_assign_pdo(
|
|||
|
||||
EC_SLAVE_DBG(fsm->slave, 1, "Assigning PDO 0x%04X at position %u.\n",
|
||||
fsm->pdo->index, fsm->pdo_pos);
|
||||
|
||||
|
||||
fsm->state = ec_fsm_pdo_conf_state_assign_pdo;
|
||||
ec_fsm_coe_transfer(fsm->fsm_coe, fsm->slave, &fsm->request);
|
||||
ec_fsm_coe_exec(fsm->fsm_coe); // execute immediately
|
||||
|
|
@ -706,7 +706,7 @@ void ec_fsm_pdo_conf_state_assign_pdo(
|
|||
EC_SLAVE_DBG(fsm->slave, 1,
|
||||
"Setting number of assigned PDOs to %u.\n",
|
||||
fsm->pdo_pos);
|
||||
|
||||
|
||||
fsm->state = ec_fsm_pdo_conf_state_set_pdo_count;
|
||||
ec_fsm_coe_transfer(fsm->fsm_coe, fsm->slave, &fsm->request);
|
||||
ec_fsm_coe_exec(fsm->fsm_coe); // execute immediately
|
||||
|
|
@ -717,7 +717,7 @@ void ec_fsm_pdo_conf_state_assign_pdo(
|
|||
fsm->pdo_pos++;
|
||||
ec_fsm_pdo_conf_action_assign_pdo(fsm);
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/** Set the number of assigned PDOs.
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ void ec_fsm_pdo_entry_start_reading(
|
|||
fsm->target_pdo = pdo;
|
||||
|
||||
ec_pdo_clear_entries(fsm->target_pdo);
|
||||
|
||||
|
||||
fsm->state = ec_fsm_pdo_entry_read_state_start;
|
||||
}
|
||||
|
||||
|
|
@ -355,7 +355,7 @@ ec_pdo_entry_t *ec_fsm_pdo_entry_conf_next_entry(
|
|||
const struct list_head *list /**< current entry list item */
|
||||
)
|
||||
{
|
||||
list = list->next;
|
||||
list = list->next;
|
||||
if (list == &fsm->source_pdo->entries)
|
||||
return NULL; // no next entry
|
||||
return list_entry(list, ec_pdo_entry_t, list);
|
||||
|
|
@ -382,7 +382,7 @@ void ec_fsm_pdo_entry_conf_state_zero_entry_count(
|
|||
// find first entry
|
||||
if (!(fsm->entry = ec_fsm_pdo_entry_conf_next_entry(
|
||||
fsm, &fsm->source_pdo->entries))) {
|
||||
|
||||
|
||||
EC_SLAVE_DBG(fsm->slave, 1, "No entries to map.\n");
|
||||
|
||||
fsm->state = ec_fsm_pdo_entry_state_end; // finished
|
||||
|
|
@ -415,7 +415,7 @@ void ec_fsm_pdo_entry_conf_action_map(
|
|||
fsm->request.data_size = 4;
|
||||
ec_sdo_request_address(&fsm->request, fsm->source_pdo->index, fsm->entry_pos);
|
||||
ecrt_sdo_request_write(&fsm->request);
|
||||
|
||||
|
||||
fsm->state = ec_fsm_pdo_entry_conf_state_map_entry;
|
||||
ec_fsm_coe_transfer(fsm->fsm_coe, fsm->slave, &fsm->request);
|
||||
ec_fsm_coe_exec(fsm->fsm_coe); // execute immediately
|
||||
|
|
@ -453,7 +453,7 @@ void ec_fsm_pdo_entry_conf_state_map_entry(
|
|||
|
||||
EC_SLAVE_DBG(fsm->slave, 1, "Setting number of PDO entries to %u.\n",
|
||||
fsm->entry_pos);
|
||||
|
||||
|
||||
fsm->state = ec_fsm_pdo_entry_conf_state_set_entry_count;
|
||||
ec_fsm_coe_transfer(fsm->fsm_coe, fsm->slave, &fsm->request);
|
||||
ec_fsm_coe_exec(fsm->fsm_coe); // execute immediately
|
||||
|
|
|
|||
|
|
@ -590,7 +590,7 @@ typedef struct {
|
|||
uint16_t entry_index;
|
||||
uint8_t entry_subindex;
|
||||
uint32_t domain_index;
|
||||
|
||||
|
||||
// outputs
|
||||
unsigned int bit_position;
|
||||
} ec_ioctl_reg_pdo_entry_t;
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ int ec_master_init(ec_master_t *master, /**< EtherCAT master */
|
|||
|
||||
master->slaves = NULL;
|
||||
master->slave_count = 0;
|
||||
|
||||
|
||||
INIT_LIST_HEAD(&master->configs);
|
||||
INIT_LIST_HEAD(&master->domains);
|
||||
|
||||
|
|
@ -172,7 +172,7 @@ int ec_master_init(ec_master_t *master, /**< EtherCAT master */
|
|||
master->config_busy = 0;
|
||||
sema_init(&master->config_sem, 1);
|
||||
init_waitqueue_head(&master->config_queue);
|
||||
|
||||
|
||||
INIT_LIST_HEAD(&master->datagram_queue);
|
||||
master->datagram_index = 0;
|
||||
|
||||
|
|
@ -180,7 +180,7 @@ int ec_master_init(ec_master_t *master, /**< EtherCAT master */
|
|||
sema_init(&master->ext_queue_sem, 1);
|
||||
|
||||
INIT_LIST_HEAD(&master->external_datagram_queue);
|
||||
|
||||
|
||||
// send interval in IDLE phase
|
||||
ec_master_set_send_interval(master, 1000000 / HZ);
|
||||
|
||||
|
|
@ -274,7 +274,7 @@ int ec_master_init(ec_master_t *master, /**< EtherCAT master */
|
|||
ret = ec_cdev_init(&master->cdev, master, device_number);
|
||||
if (ret)
|
||||
goto out_clear_sync_mon;
|
||||
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
|
||||
master->class_device = device_create(class, NULL,
|
||||
MKDEV(MAJOR(device_number), master->index), NULL,
|
||||
|
|
@ -334,7 +334,7 @@ void ec_master_clear(
|
|||
#endif
|
||||
|
||||
ec_cdev_clear(&master->cdev);
|
||||
|
||||
|
||||
#ifdef EC_EOE
|
||||
ec_master_clear_eoe_handlers(master);
|
||||
#endif
|
||||
|
|
@ -512,7 +512,7 @@ int ec_master_thread_start(
|
|||
master->thread = NULL;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -525,7 +525,7 @@ void ec_master_thread_stop(
|
|||
)
|
||||
{
|
||||
unsigned long sleep_jiffies;
|
||||
|
||||
|
||||
if (!master->thread) {
|
||||
EC_MASTER_WARN(master, "%s(): Already finished!\n", __func__);
|
||||
return;
|
||||
|
|
@ -539,7 +539,7 @@ void ec_master_thread_stop(
|
|||
|
||||
if (master->fsm_datagram.state != EC_DATAGRAM_SENT)
|
||||
return;
|
||||
|
||||
|
||||
// wait for FSM datagram
|
||||
sleep_jiffies = max(HZ / 100, 1); // 10 ms, at least 1 jiffy
|
||||
schedule_timeout(sleep_jiffies);
|
||||
|
|
@ -586,7 +586,7 @@ void ec_master_leave_idle_phase(ec_master_t *master /**< EtherCAT master */)
|
|||
EC_MASTER_DBG(master, 1, "IDLE -> ORPHANED.\n");
|
||||
|
||||
master->phase = EC_ORPHANED;
|
||||
|
||||
|
||||
#ifdef EC_EOE
|
||||
ec_master_eoe_stop(master);
|
||||
#endif
|
||||
|
|
@ -647,7 +647,7 @@ int ec_master_enter_operation_phase(
|
|||
" interrupted by signal.\n");
|
||||
goto out_allow;
|
||||
}
|
||||
|
||||
|
||||
EC_MASTER_DBG(master, 1, "Waiting for pending"
|
||||
" slave scan returned.\n");
|
||||
}
|
||||
|
|
@ -672,7 +672,7 @@ int ec_master_enter_operation_phase(
|
|||
master->app_receive_cb = NULL;
|
||||
master->app_cb_data = NULL;
|
||||
return ret;
|
||||
|
||||
|
||||
out_allow:
|
||||
master->allow_scan = 1;
|
||||
out_return:
|
||||
|
|
@ -1035,7 +1035,7 @@ void ec_master_send_datagrams(
|
|||
/** Processes a received frame.
|
||||
*
|
||||
* This function is called by the network driver for every received frame.
|
||||
*
|
||||
*
|
||||
* \return 0 in case of success, else < 0
|
||||
*/
|
||||
void ec_master_receive_datagrams(ec_master_t *master, /**< EtherCAT master */
|
||||
|
|
@ -1357,7 +1357,7 @@ static int ec_master_idle_thread(void *priv_data)
|
|||
#endif
|
||||
|
||||
// send interval in IDLE phase
|
||||
ec_master_set_send_interval(master, 1000000 / HZ);
|
||||
ec_master_set_send_interval(master, 1000000 / HZ);
|
||||
|
||||
EC_MASTER_DBG(master, 1, "Idle thread running with send interval = %u us,"
|
||||
" max data size=%zu\n", master->send_interval,
|
||||
|
|
@ -1410,7 +1410,7 @@ static int ec_master_idle_thread(void *priv_data)
|
|||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
EC_MASTER_DBG(master, 1, "Master IDLE thread exiting...\n");
|
||||
|
||||
return 0;
|
||||
|
|
@ -1468,7 +1468,7 @@ static int ec_master_operation_thread(void *priv_data)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
EC_MASTER_DBG(master, 1, "Master OP thread exiting...\n");
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1584,7 +1584,7 @@ schedule:
|
|||
schedule();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
EC_MASTER_DBG(master, 1, "EoE thread exiting...\n");
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1601,7 +1601,7 @@ void ec_master_detach_slave_configs(
|
|||
ec_slave_config_t *sc;
|
||||
|
||||
list_for_each_entry(sc, &master->configs, list) {
|
||||
ec_slave_config_detach(sc);
|
||||
ec_slave_config_detach(sc);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1892,7 +1892,7 @@ void ec_master_find_dc_ref_clock(
|
|||
}
|
||||
|
||||
master->dc_ref_clock = ref;
|
||||
|
||||
|
||||
// This call always succeeds, because the datagram has been pre-allocated.
|
||||
ec_datagram_frmw(&master->sync_datagram,
|
||||
ref ? ref->station_address : 0xffff, 0x0910, 4);
|
||||
|
|
@ -2110,7 +2110,7 @@ int ecrt_master_activate(ec_master_t *master)
|
|||
}
|
||||
domain_offset += domain->data_size;
|
||||
}
|
||||
|
||||
|
||||
up(&master->master_sem);
|
||||
|
||||
// restart EoE process and master thread with new locking
|
||||
|
|
@ -2129,7 +2129,7 @@ int ecrt_master_activate(ec_master_t *master)
|
|||
master->send_cb = master->app_send_cb;
|
||||
master->receive_cb = master->app_receive_cb;
|
||||
master->cb_data = master->app_cb_data;
|
||||
|
||||
|
||||
#ifdef EC_EOE
|
||||
if (eoe_was_running) {
|
||||
ec_master_eoe_start(master);
|
||||
|
|
@ -2175,11 +2175,11 @@ void ecrt_master_deactivate(ec_master_t *master)
|
|||
eoe_was_running = master->eoe_thread != NULL;
|
||||
ec_master_eoe_stop(master);
|
||||
#endif
|
||||
|
||||
|
||||
master->send_cb = ec_master_internal_send_cb;
|
||||
master->receive_cb = ec_master_internal_receive_cb;
|
||||
master->cb_data = master;
|
||||
|
||||
|
||||
ec_master_clear_config(master);
|
||||
|
||||
for (slave = master->slaves;
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ struct ec_master {
|
|||
/* Configuration applied by the application. */
|
||||
struct list_head configs; /**< List of slave configurations. */
|
||||
struct list_head domains; /**< List of domains. */
|
||||
|
||||
|
||||
u64 app_time; /**< Time of the last ecrt_master_sync() call. */
|
||||
u64 app_start_time; /**< Application start time. */
|
||||
u8 has_app_time; /**< Application time is valid. */
|
||||
|
|
@ -217,7 +217,7 @@ struct ec_master {
|
|||
ec_datagram_t sync_mon_datagram; /**< Datagram used for DC synchronisation
|
||||
monitoring. */
|
||||
ec_slave_t *dc_ref_clock; /**< DC reference clock slave. */
|
||||
|
||||
|
||||
unsigned int scan_busy; /**< Current scan state. */
|
||||
unsigned int allow_scan; /**< \a True, if slave scanning is allowed. */
|
||||
struct semaphore scan_sem; /**< Semaphore protecting the \a scan_busy
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ void ec_pdo_init(
|
|||
ec_pdo_t *pdo /**< EtherCAT PDO */
|
||||
)
|
||||
{
|
||||
pdo->sync_index = -1; // not assigned
|
||||
pdo->sync_index = -1; // not assigned
|
||||
pdo->name = NULL;
|
||||
INIT_LIST_HEAD(&pdo->entries);
|
||||
}
|
||||
|
|
@ -131,7 +131,7 @@ int ec_pdo_set_name(
|
|||
|
||||
if (pdo->name && name && !strcmp(pdo->name, name))
|
||||
return 0;
|
||||
|
||||
|
||||
if (pdo->name)
|
||||
kfree(pdo->name);
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ int ec_pdo_entry_set_name(
|
|||
|
||||
if (entry->name && name && !strcmp(entry->name, name))
|
||||
return 0;
|
||||
|
||||
|
||||
if (entry->name)
|
||||
kfree(entry->name);
|
||||
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ int ec_pdo_list_add_pdo_copy(
|
|||
EC_ERR("PDO 0x%04X is already mapped!\n", pdo->index);
|
||||
return -EEXIST;
|
||||
}
|
||||
|
||||
|
||||
if (!(mapped_pdo = kmalloc(sizeof(ec_pdo_t), GFP_KERNEL))) {
|
||||
EC_ERR("Failed to allocate PDO memory.\n");
|
||||
return -ENOMEM;
|
||||
|
|
@ -190,7 +190,7 @@ int ec_pdo_list_copy(
|
|||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ void ec_sdo_clear(
|
|||
/*****************************************************************************/
|
||||
|
||||
/** Get an SDO entry from an SDO via its subindex.
|
||||
*
|
||||
*
|
||||
* \retval >0 Pointer to the requested SDO entry.
|
||||
* \retval NULL SDO entry not found.
|
||||
*/
|
||||
|
|
@ -109,7 +109,7 @@ ec_sdo_entry_t *ec_sdo_get_entry(
|
|||
/** Get an SDO entry from an SDO via its subindex.
|
||||
*
|
||||
* const version.
|
||||
*
|
||||
*
|
||||
* \retval >0 Pointer to the requested SDO entry.
|
||||
* \retval NULL SDO entry not found.
|
||||
*/
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue