script/ethercat.sh
changeset 325 7833cf70c4f2
parent 324 9aa51cbdbfae
child 360 a7a8ed41b50a
equal deleted inserted replaced
324:9aa51cbdbfae 325:7833cf70c4f2
   161 				EOE_INTERFACES=0
   161 				EOE_INTERFACES=0
   162 			fi
   162 			fi
   163 		fi
   163 		fi
   164 
   164 
   165 	    # unload conflicting modules at first
   165 	    # unload conflicting modules at first
   166 		for mod in 8139too 8139cp; do
   166 		for mod in 8139too; do
   167 			if lsmod | grep "^$mod " > /dev/null; then
   167 			if lsmod | grep "^$mod " > /dev/null; then
   168 				if ! rmmod $mod; then
   168 				if ! rmmod $mod; then
   169 					/bin/false
   169 					/bin/false
   170 					rc_status -v
   170 					rc_status -v
   171 					rc_exit
   171 					rc_exit
   173 			fi
   173 			fi
   174 		done
   174 		done
   175 
   175 
   176 	    # load master module
   176 	    # load master module
   177 		if ! modprobe ec_master ec_eoeif_count=$EOE_INTERFACES; then
   177 		if ! modprobe ec_master ec_eoeif_count=$EOE_INTERFACES; then
       
   178 			modprobe 8139too
   178 			/bin/false
   179 			/bin/false
   179 			rc_status -v
   180 			rc_status -v
   180 			rc_exit
   181 			rc_exit
   181 		fi
   182 		fi
   182 
   183 
   183         # load device module
   184         # load device module
   184 		if ! modprobe ec_8139too ec_device_index=$DEVICE_INDEX; then
   185 		if ! modprobe ec_8139too ec_device_index=$DEVICE_INDEX; then
       
   186 			rmmod ec_master
       
   187 			modprobe 8139too
   185 			/bin/false
   188 			/bin/false
   186 			rc_status -v
   189 			rc_status -v
   187 			rc_exit
   190 			rc_exit
   188 		fi
   191 		fi
   189 
   192