devices/e1000/e1000_main-3.0-ethercat.c
branchstable-1.5
changeset 2582 87e502828b3f
parent 2471 fc64a4b1ec1a
equal deleted inserted replaced
2581:d94281cb835a 2582:87e502828b3f
  1207 	e1000_reset(adapter);
  1207 	e1000_reset(adapter);
  1208 
  1208 
  1209  	// offer device to EtherCAT master module
  1209  	// offer device to EtherCAT master module
  1210 	adapter->ecdev = ecdev_offer(netdev, ec_poll, THIS_MODULE);
  1210 	adapter->ecdev = ecdev_offer(netdev, ec_poll, THIS_MODULE);
  1211 	if (adapter->ecdev) {
  1211 	if (adapter->ecdev) {
  1212 		if (ecdev_open(adapter->ecdev)) {
  1212 		err = ecdev_open(adapter->ecdev);
       
  1213 		if (err) {
  1213 			ecdev_withdraw(adapter->ecdev);
  1214 			ecdev_withdraw(adapter->ecdev);
  1214 			goto err_register;
  1215 			goto err_register;
  1215 		}
  1216 		}
  1216 	} else {
  1217 	} else {
  1217 		strcpy(netdev->name, "eth%d");
  1218 		strcpy(netdev->name, "eth%d");