pub fn link_device_to_upstream(&self, down: Arc<dyn IPciNode>, up: Weak<dyn IPciNode>) {
        let _guard = self.bus_topology.lock();
        let dev = down.device();
        dev.set_upstream(up.clone());
        let up = up.upgrade().unwrap().as_upstream().unwrap();
        up.set_downstream(
            dev.dev_id() * PCI_MAX_FUNCTIONS_PER_DEVICE + dev.func_id(),
            Some(down.clone()),
        );
    }
/// Link a device to an upstream node.
Link a device to an upstream node.
Link a device to an upstream node .
pub fn link_device_to_upstream(&self, down: Arc<dyn IPciNode>, up: Weak<dyn IPciNode>) {
        let _guard = self.bus_topology.lock();
        let dev = down.device();
        dev.set_upstream(up.clone());
        let up = up.upgrade().unwrap().as_upstream().unwrap();
        up.set_downstream(
            dev.dev_id() * PCI_MAX_FUNCTIONS_PER_DEVICE + dev.func_id(),
            Some(down.clone()),
        );
    }
pub fn link_device_to_upstream ( & self , down : Arc < dyn IPciNode > , up : Weak < dyn IPciNode > ) { let _guard = self . bus_topology . lock ( ) ; let dev = down . device ( ) ; dev . set_upstream ( up . clone ( ) ) ; let up = up . upgrade ( ) . unwrap ( ) . as_upstream ( ) . unwrap ( ) ; up . set_downstream ( dev . dev_id ( ) * PCI_MAX_FUNCTIONS_PER_DEVICE + dev . func_id ( ) , Some ( down . clone ( ) ) , ) ; }
Link a device to an upstream node.
Link a device to an upstream node .
&self
down
Arc<dyn IPciNode>
up
Weak<dyn IPciNode>
&self
down
Arc<dyn IPciNode>
up
Weak<dyn IPciNode>