diff --git a/voltha/adapters/brcm_openomci_onu/brcm_openomci_onu_handler.py b/voltha/adapters/brcm_openomci_onu/brcm_openomci_onu_handler.py
index b561feb..a9b7614 100644
--- a/voltha/adapters/brcm_openomci_onu/brcm_openomci_onu_handler.py
+++ b/voltha/adapters/brcm_openomci_onu/brcm_openomci_onu_handler.py
@@ -492,6 +492,8 @@
         self.tx_id += 1
         return self.tx_id
 
+    # TODO: Actually conform to or create a proper interface.
+    # this and the other functions called from the olt arent very clear.
     def create_interface(self, data):
         self.log.debug('function-entry', data=data)
         self._onu_indication = data
@@ -625,6 +627,7 @@
                 self.disable_ports(device)
                 device.oper_status = OperStatus.UNKNOWN
                 device.connect_status = ConnectStatus.UNREACHABLE
+                device.reason = "openomci-admin-lock"
                 self.adapter_agent.update_device(device)
 
             # lock all the unis
@@ -859,28 +862,30 @@
         else:
             self.log.info('device-info-already-loaded', in_sync=in_sync, already_loaded=self._dev_info_loaded)
 
-        def success(_results):
-            self.log.info('mib-download-success', _results=_results)
-            device = self.adapter_agent.get_device(self.device_id)
-            device.reason = 'initial-mib-downloaded'
-            device.oper_status = OperStatus.ACTIVE
-            device.connect_status = ConnectStatus.REACHABLE
-            self.enable_ports(device)
-            self.adapter_agent.update_device(device)
-            self._mib_download_task = None
+        if device.admin_state == AdminState.ENABLED:
+            def success(_results):
+                self.log.info('mib-download-success', _results=_results)
+                device = self.adapter_agent.get_device(self.device_id)
+                device.reason = 'initial-mib-downloaded'
+                device.oper_status = OperStatus.ACTIVE
+                device.connect_status = ConnectStatus.REACHABLE
+                self.enable_ports(device)
+                self.adapter_agent.update_device(device)
+                self._mib_download_task = None
 
-        def failure(_reason):
-            self.log.info('mib-download-failure', _reason=_reason)
-            # TODO: test this.  also verify i can add this task this way
+            def failure(_reason):
+                self.log.info('mib-download-failure', _reason=_reason)
+                # TODO: test this.  also verify i can add this task this way
+                self._mib_download_task = BrcmMibDownloadTask(self.omci_agent, self)
+                self._deferred = self._onu_omci_device.task_runner.queue_task(self._mib_download_task)
+
+            self.log.info('downloading-initial-mib-configuration')
             self._mib_download_task = BrcmMibDownloadTask(self.omci_agent, self)
             self._deferred = self._onu_omci_device.task_runner.queue_task(self._mib_download_task)
-
-        self.log.info('downloading-initial-mib-configuration')
-        self._mib_download_task = BrcmMibDownloadTask(self.omci_agent, self)
-        self._deferred = self._onu_omci_device.task_runner.queue_task(self._mib_download_task)
-        self._deferred.addCallbacks(success, failure)
-
-
+            self._deferred.addCallbacks(success, failure)
+        else:
+            self.log.info('admin-down-disabling')
+            self.disable(device)
 
     def check_status_and_state(self, results, operation=''):
         self.log.debug('function-entry')
diff --git a/voltha/adapters/brcm_openomci_onu/omci/brcm_uni_lock_task.py b/voltha/adapters/brcm_openomci_onu/omci/brcm_uni_lock_task.py
index 6866cba..2a12eda 100644
--- a/voltha/adapters/brcm_openomci_onu/omci/brcm_uni_lock_task.py
+++ b/voltha/adapters/brcm_openomci_onu/omci/brcm_uni_lock_task.py
@@ -17,6 +17,7 @@
 from twisted.internet import reactor
 from twisted.internet.defer import inlineCallbacks, failure, returnValue
 from voltha.extensions.omci.omci_defs import ReasonCodes, EntityOperations
+from voltha.extensions.omci.omci_me import OntGFrame
 from voltha.extensions.omci.omci_me import PptpEthernetUniFrame
 
 RC = ReasonCodes
@@ -85,6 +86,22 @@
         try:
             state = 1 if self._lock else 0
 
+            # lock the whole ont and all the pptp.  some onu dont causing odd behavior.
+            msg = OntGFrame(attributes={'administrative_state': state})
+            frame = msg.set()
+            self.log.debug('openomci-msg', msg=msg)
+            results = yield self._device.omci_cc.send(frame)
+            self.stop_if_not_running()
+
+            status = results.fields['omci_message'].fields['success_code']
+            self.log.info('response-status', status=status)
+
+            # Success?
+            if status in (RC.Success.value, RC.InstanceExists):
+                self.log.debug('set-lock-ontg', lock=self._lock)
+            else:
+                self.log.warn('cannot-set-lock-ontg', lock=self._lock)
+
             pptp = self._config.pptp_entities
 
             for key, value in pptp.iteritems():
