Commit 306aed1f authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

unmount and unload before resetting vsc3304

parent c9553bd4
...@@ -241,6 +241,10 @@ def reload_driver(): ...@@ -241,6 +241,10 @@ def reload_driver():
return result return result
def unmount_unload_disconnect():
unload_ahci_elphel_driver()
sata.vsc3304.disconnect_all()
mem = x393_mem.X393Mem(0,0,1) mem = x393_mem.X393Mem(0,0,1)
sata = x393sata.x393sata() # 1,0,"10389B") sata = x393sata.x393sata() # 1,0,"10389B")
...@@ -251,19 +255,19 @@ else: ...@@ -251,19 +255,19 @@ else:
if cmd == "set_zynq_ssd": if cmd == "set_zynq_ssd":
sata.vsc3304.disconnect_all() unmount_unload_disconnect()
sata.set_zynq_ssd() sata.set_zynq_ssd()
reset_device() reset_device()
elif cmd == "set_zynq_esata": elif cmd == "set_zynq_esata":
sata.vsc3304.disconnect_all() unmount_unload_disconnect()
sata.set_zynq_esata() sata.set_zynq_esata()
reset_device() reset_device()
elif cmd == "set_zynq_ssata": elif cmd == "set_zynq_ssata":
sata.vsc3304.disconnect_all() unmount_unload_disconnect()
sata.set_zynq_ssata() sata.set_zynq_ssata()
reset_device() reset_device()
elif cmd == "set_esata_ssd": elif cmd == "set_esata_ssd":
sata.vsc3304.disconnect_all() unmount_unload_disconnect()
sata.set_esata_ssd() sata.set_esata_ssd()
reset_device() reset_device()
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment