KolibriOS kernel
hccommon.inc File Reference

Functions

void usb_init_controller ()
 Initializes one controller, called by usb_init for every controller. eax -> PCIDEV structure for the device. More...
 
void get_phys_addr ()
 Helper function, calculates physical address including offset in page. More...
 
void usb_subscribe_control ()
 Put the given control/bulk pipe in the wait list; called when the pipe structure is changed and a possible hardware cache needs to be synchronized. When it will be known that the cache is updated, usb_subscription_done procedure will be called. More...
 
void usb_subscribe_periodic ()
 Same as usb_subscribe_control, but for interrupt/isochronous pipe. More...
 
void usb_subscription_done ()
 Called after synchronization of hardware cache with software changes. Continues process of device enumeration based on when it was delayed due to call to usb_subscribe_control. More...
 
void usb_test_pending_port ()
 This function is called when a new device has either passed or failed first stages of configuration, so the next device can enter configuration process. More...
 
void usb_disconnect_stage2 ()
 This procedure is regularly called from controller-specific ProcessDeferred, it checks whether there are disconnected events and if so, process them. More...
 
void usb_device_disconnected ()
 Initial stage of disconnect processing: called when device is disconnected. More...
 
void usb_process_wait_lists ()
 Called from controller-specific ProcessDeferred, processes wait-pipe-done notifications, returns whether there are more items in wait queues. in: esi -> usb_controller out: eax = bitmask of pipe types with non-empty wait queue. More...
 
void usb_process_one_wait_list ()
 Helper procedure for usb_process_wait_lists; does the same for one wait queue. in: esi -> usb_controller, edx=0 for *Async, edx=4 for *Periodic list out: CF = issue new request. More...
 
void usb_find_ehci_companion ()
 Called from USB1 controller-specific initialization. Finds EHCI companion controller for given USB1 controller. in: bl = PCI device:function for USB1 controller, bh = PCI bus out: eax -> usb_controller for EHCI companion. More...
 
void usb_get_tt ()
 Find Transaction Translator hub and port for the given device. in: edx = parent hub for the device, ecx = port for the device out: edx = TT hub for the device, ecx = TT port for the device. More...
 

Variables

label usb_hc_func
 USB HC support: some functions interesting only for *HCI-drivers. More...
 

Function Documentation

◆ get_phys_addr()

void get_phys_addr ( )

Helper function, calculates physical address including offset in page.

Source
bus/usb/hccommon.inc:115

◆ usb_device_disconnected()

void usb_device_disconnected ( )

Initial stage of disconnect processing: called when device is disconnected.

Source
bus/usb/hccommon.inc:193

◆ usb_disconnect_stage2()

void usb_disconnect_stage2 ( )

This procedure is regularly called from controller-specific ProcessDeferred, it checks whether there are disconnected events and if so, process them.

Source
bus/usb/hccommon.inc:177

◆ usb_find_ehci_companion()

void usb_find_ehci_companion ( )

Called from USB1 controller-specific initialization. Finds EHCI companion controller for given USB1 controller. in: bl = PCI device:function for USB1 controller, bh = PCI bus out: eax -> usb_controller for EHCI companion.

Source
bus/usb/hccommon.inc:307

◆ usb_get_tt()

void usb_get_tt ( )

Find Transaction Translator hub and port for the given device. in: edx = parent hub for the device, ecx = port for the device out: edx = TT hub for the device, ecx = TT port for the device.

Source
bus/usb/hccommon.inc:333

◆ usb_init_controller()

void usb_init_controller ( )

Initializes one controller, called by usb_init for every controller. eax -> PCIDEV structure for the device.

Source
bus/usb/hccommon.inc:39

◆ usb_process_one_wait_list()

void usb_process_one_wait_list ( )

Helper procedure for usb_process_wait_lists; does the same for one wait queue. in: esi -> usb_controller, edx=0 for *Async, edx=4 for *Periodic list out: CF = issue new request.

Source
bus/usb/hccommon.inc:245

◆ usb_process_wait_lists()

void usb_process_wait_lists ( )

Called from controller-specific ProcessDeferred, processes wait-pipe-done notifications, returns whether there are more items in wait queues. in: esi -> usb_controller out: eax = bitmask of pipe types with non-empty wait queue.

Source
bus/usb/hccommon.inc:219

◆ usb_subscribe_control()

void usb_subscribe_control ( )

Put the given control/bulk pipe in the wait list; called when the pipe structure is changed and a possible hardware cache needs to be synchronized. When it will be known that the cache is updated, usb_subscription_done procedure will be called.

Source
bus/usb/hccommon.inc:129

◆ usb_subscribe_periodic()

void usb_subscribe_periodic ( )

Same as usb_subscribe_control, but for interrupt/isochronous pipe.

Source
bus/usb/hccommon.inc:140

◆ usb_subscription_done()

void usb_subscription_done ( )

Called after synchronization of hardware cache with software changes. Continues process of device enumeration based on when it was delayed due to call to usb_subscribe_control.

Source
bus/usb/hccommon.inc:153

◆ usb_test_pending_port()

void usb_test_pending_port ( )

This function is called when a new device has either passed or failed first stages of configuration, so the next device can enter configuration process.

Source
bus/usb/hccommon.inc:163

Variable Documentation

◆ usb_hc_func

label usb_hc_func

USB HC support: some functions interesting only for *HCI-drivers.

Source
bus/usb/hccommon.inc:15