reorders the sequence when the device is detached.  After detaching the interface is completed then it'll process other parts to avoid a race condition.
reorders the sequence when the device is detached.  After detaching the
interface is completed then it'll process other parts to avoid a race
condition.

Pointed by:	jhb

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase