Hello Gavin, thanks for the hint, I'll have a look for Florians patch and your post. I applied Florians "Link detection" patch for e1000e driver 3.4 to the 3.2er driver (see attatchment), it solves the link detection issue here.
Regards, Jürgen Kunz Am 05.02.2013 06:26, schrieb Gavin Lambert: > > Hi Jürgen & Daniel, > > > > I have a fix for the first issue in my local copy of the driver (see > my post to the dev list on 25 October for specific details). I have > seen the second issue but not chased down a fix for it yet. > > > > Also I just noticed that Florian updated the drivers on 4 January > (posted in response to my message; I haven't checked whether it > includes the same fix or not). I haven't had a chance to test the new > version myself yet but maybe it will help in your case too? > > > > Regards, > > Gavin Lambert > > > > *From:*[email protected] > [mailto:[email protected]] *On Behalf Of *Jürgen Kunz > *Sent:* Tuesday, 5 February 2013 18:16 > *To:* Daniel Helmick > *Cc:* [email protected] > *Subject:* Re: [etherlab-users] e1000e driver still not working with > 3.2 kernel with latest stable-1.5 branch? > > > > Hello Daniel, > > I am using this combination for a while now, with 32- and 64-bit > versions of the 3.2er Debian RT-Kernel. If there is a EtherCAT device > connected to the computer, the driver works fine. > There are two issues in this driver version, if there are no EtherCAT > devices connected. The first, the one you mentioned here, is when the > EtherCAT Master starts up with no device connected, then the > network-adapter is continously reseted until a device is connected. It > may hang the computer if no device is connected for a while. > The second issue is that when the link is plugged off, the link state > is not updated. Unfortunately, I did not have time yet to correct > these issues. > > Greetings, > Jürgen Kunz > > Am 05.02.2013 01:59, schrieb Daniel Helmick: > > Has anyone else gotten this combination of driver and kernel to work? > > Here's the /var/log/messages output when I start the ethercat master: > > [ 869.854110] EtherCAT: Master driver 1.5.1 9cdd7669dc0b > [ 869.854252] EtherCAT: 1 master waiting for devices. > [ 869.944866] e1000e 0000:04:00.0: PCI INT A disabled > [ 869.948134] ec_e1000e: EtherCAT-capable Intel(R) PRO/1000 > Network Driver - 1.5.1-k-EtherCAT > [ 869.948138] ec_e1000e: Copyright(c) 1999 - 2011 Intel Corporation. > [ 869.948202] ec_e1000e 0000:04:00.0: Disabling ASPM L0s > [ 869.948261] ec_e1000e 0000:04:00.0: PCI INT A -> GSI 17 (level, > low) -> IRQ 17 > [ 869.948530] ec_e1000e 0000:04:00.0: setting latency timer to 64 > [ 869.951386] ec_e1000e 0000:04:00.0: irq 65 for MSI/MSI-X > [ 869.951393] ec_e1000e 0000:04:00.0: irq 66 for MSI/MSI-X > [ 869.951397] ec_e1000e 0000:04:00.0: irq 67 for MSI/MSI-X > [ 870.120739] EtherCAT: Accepting 68:05:CA:10:C0:82 as main > device for master 0. > [ 870.197588] EtherCAT 0: Starting EtherCAT-IDLE thread. > [ 870.197651] ec_e1000e 0000:04:00.0: (unregistered net_device): > (PCI Express:2.5GT/s:Width x1) 68:05:ca:10:c0:82 > [ 870.197656] ec_e1000e 0000:04:00.0: (unregistered net_device): > Intel(R) PRO/1000 Network Connection > [ 870.197687] ec_e1000e 0000:04:00.0: (unregistered net_device): > MAC: 3, PHY: 8, PBA No: E46981-008 > [ 870.197825] ec_e1000e 0000:04:00.0: (unregistered net_device): > Reset adapter > [ 872.196168] ec_e1000e 0000:04:00.0: (unregistered net_device): > Reset adapter > [ 874.196169] ec_e1000e 0000:04:00.0: (unregistered net_device): > Reset adapter > [ 876.196159] ec_e1000e 0000:04:00.0: (unregistered net_device): > Reset adapter > [ 878.196162] ec_e1000e 0000:04:00.0: (unregistered net_device): > Reset adapter > > > And the reset adapter message occurs every 2 seconds until I stop > the ethercat master. > > Thanks, > Dan > > > > _______________________________________________ > > etherlab-users mailing list > > [email protected] <mailto:[email protected]> > > http://lists.etherlab.org/mailman/listinfo/etherlab-users > > > > -- > Dipl.-Inform. Jürgen Kunz > > Technische Universität Darmstadt <http://www.tu-darmstadt.de> > FG Simulation, Systemoptimierung und Robotik > <http://www.sim.tu-darmstadt.de> > Hochschulstr. 10 > 64289 Darmstadt > > Tel.: ++49 (0) 6151-16-70383 > Fax: ++49 (0) 6151-16-6648 > E-Mail: kunz(at)sim.tu-darmstadt.de > Homepage: http://www.sim.tu-darmstadt.de > -- Dipl.-Inform. Jürgen Kunz Technische Universität Darmstadt <http://www.tu-darmstadt.de> FG Simulation, Systemoptimierung und Robotik <http://www.sim.tu-darmstadt.de> Hochschulstr. 10 64289 Darmstadt Tel.: ++49 (0) 6151-16-70383 Fax: ++49 (0) 6151-16-6648 E-Mail: kunz(at)sim.tu-darmstadt.de Homepage: http://www.sim.tu-darmstadt.de
diff -r 9cdd7669dc0b devices/e1000e/netdev-3.2-ethercat.c
--- a/devices/e1000e/netdev-3.2-ethercat.c Thu Jan 10 17:36:41 2013 +0100
+++ b/devices/e1000e/netdev-3.2-ethercat.c Tue Feb 05 07:22:53 2013 +0100
@@ -2129,14 +2129,14 @@
{
struct e1000_hw *hw = &adapter->hw;
- if (adapter->ecdev)
- return;
-
ew32(IMC, ~0);
if (adapter->msix_entries)
ew32(EIAC_82574, 0);
e1e_flush();
+ if (adapter->ecdev)
+ return;
+
if (adapter->msix_entries) {
int i;
for (i = 0; i < adapter->num_vectors; i++)
@@ -3526,12 +3526,10 @@
if (!adapter->ecdev) {
napi_enable(&adapter->napi);
- }
-
- if (adapter->msix_entries)
- e1000_configure_msix(adapter);
-
- if (!adapter->ecdev) {
+
+ if (adapter->msix_entries)
+ e1000_configure_msix(adapter);
+
e1000_irq_enable(adapter);
netif_start_queue(adapter->netdev);
@@ -3862,7 +3860,7 @@
* ignore e1000e MSI messages, which means we need to test our MSI
* interrupt now
*/
- if (adapter->int_mode != E1000E_INT_MODE_LEGACY) {
+ if (!adapter->ecdev && adapter->int_mode != E1000E_INT_MODE_LEGACY) {
err = e1000_test_msi(adapter);
if (err) {
e_err("Interrupt allocation failed\n");
@@ -4513,14 +4511,14 @@
/* Link status message must follow this format */
printk(KERN_INFO "e1000e: %s NIC Link is Down\n",
adapter->netdev->name);
- if (adapter->ecdev)
+ if (adapter->ecdev) {
ecdev_set_link(adapter->ecdev, 0);
- else
+ } else {
netif_carrier_off(netdev);
- if (!adapter->ecdev && !test_bit(__E1000_DOWN,
&adapter->state))
- mod_timer(&adapter->phy_info_timer,
- round_jiffies(jiffies + 2 * HZ));
-
+ if (!test_bit(__E1000_DOWN, &adapter->state))
+ mod_timer(&adapter->phy_info_timer,
+ round_jiffies(jiffies + 2 *
HZ));
+ }
if (adapter->flags & FLAG_RX_NEEDS_RESTART)
schedule_work(&adapter->reset_task);
else
@@ -6050,7 +6048,9 @@
struct e1000_adapter *adapter = netdev_priv(netdev);
if (jiffies - adapter->ec_watchdog_jiffies >= 2 * HZ) {
- e1000_watchdog((unsigned long) adapter);
+ struct e1000_hw *hw = &adapter->hw;
+ hw->mac.get_link_status = true;
+ e1000_watchdog_task(&adapter->watchdog_task);
adapter->ec_watchdog_jiffies = jiffies;
}
@@ -6359,6 +6359,7 @@
adapter->ecdev = ecdev_offer(netdev, ec_poll, THIS_MODULE);
if (adapter->ecdev) {
+ adapter->ec_watchdog_jiffies = jiffies;
if (ecdev_open(adapter->ecdev)) {
ecdev_withdraw(adapter->ecdev);
goto err_register;
<<attachment: kunz.vcf>>
_______________________________________________ etherlab-users mailing list [email protected] http://lists.etherlab.org/mailman/listinfo/etherlab-users
