LibXenon
Bare-metal Xbox 360 homebrew library
Loading...
Searching...
No Matches
Macros | Functions | Variables
ehci.c File Reference
#include "ehci-mem.c"
#include "usbstorage.h"
#include "usb2.c"
#include "usbstorage.c"
Include dependency graph for ehci.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EHCI_TUNE_CERR   0 /* 0-3 qtd retries; 0 == don't stop */ /* by Hermes: i have replaced 3 by 0 and now it don�t hang when i extract the device*/
 
#define EHCI_TUNE_RL_HS   4 /* nak throttle; see 4.9 */
 
#define EHCI_TUNE_RL_TT   0
 
#define EHCI_TUNE_MULT_HS   1 /* 1-3 transactions/uframe; 4.10.3 */
 
#define EHCI_TUNE_MULT_TT   1
 
#define EHCI_TUNE_FLS   2 /* (small) 256 frame schedule */
 
#define INTR_MASK   (STS_IAA | STS_FATAL | STS_PCD | STS_ERR | STS_INT)
 
#define hb_mult(wMaxPacketSize)   (1 + (((wMaxPacketSize) >> 11) & 0x03))
 
#define max_packet(wMaxPacketSize)   ((wMaxPacketSize) & 0x07ff)
 
#define g_ehci   #error
 

Functions

void debug_qtds (struct ehci_hcd *ehci)
 
void dump_qh (struct ehci_hcd *ehci, struct ehci_qh *qh)
 
struct ehci_qtdqh_urb_transaction (struct ehci_hcd *ehci, struct ehci_urb *urb)
 
int ehci_do_urb (struct ehci_hcd *ehci, struct ehci_device *dev, struct ehci_urb *urb)
 
s32 ehci_control_message (struct ehci_hcd *ehci, struct ehci_device *dev, u8 bmRequestType, u8 bmRequest, u16 wValue, u16 wIndex, u16 wLength, void *buf)
 
s32 ehci_bulk_message (struct ehci_hcd *ehci, struct ehci_device *dev, u8 bEndpoint, u16 wLength, void *rpData)
 
int ehci_reset_port_old (struct ehci_hcd *ehci, int port)
 
void ehci_adquire_port (struct ehci_hcd *ehci, int port)
 
int ehci_reset_usb_port (struct ehci_hcd *ehci, int port)
 
int ehci_init_port (struct ehci_hcd *ehci, int port)
 
int ehci_reset_port (struct ehci_hcd *ehci, int port)
 
int ehci_reset_port2 (struct ehci_hcd *ehci, int port)
 
int ehci_reset_device (struct ehci_hcd *ehci, struct ehci_device *dev)
 
int ehci_discover (struct ehci_hcd *ehci)
 
int ehci_release_ports (struct ehci_hcd *ehci)
 
int ehci_open_device (struct ehci_hcd *ehci, int vid, int pid, int fd)
 
int ehci_close_device (struct ehci_device *dev)
 
void * ehci_fd_to_dev (struct ehci_hcd *ehci, int fd)
 
int ehci_get_device_list (struct ehci_hcd *ehci, u8 maxdev, u8 b0, u8 *num, u16 *buf)
 

Variables

int unplug_device = 0
 
int handshake_mode = 0
 
u32 usb_timeout = 1000 * 1000
 

Macro Definition Documentation

◆ EHCI_TUNE_CERR

#define EHCI_TUNE_CERR   0 /* 0-3 qtd retries; 0 == don't stop */ /* by Hermes: i have replaced 3 by 0 and now it don�t hang when i extract the device*/

Definition at line 31 of file ehci.c.

◆ EHCI_TUNE_FLS

#define EHCI_TUNE_FLS   2 /* (small) 256 frame schedule */

Definition at line 36 of file ehci.c.

◆ EHCI_TUNE_MULT_HS

#define EHCI_TUNE_MULT_HS   1 /* 1-3 transactions/uframe; 4.10.3 */

Definition at line 34 of file ehci.c.

◆ EHCI_TUNE_MULT_TT

#define EHCI_TUNE_MULT_TT   1

Definition at line 35 of file ehci.c.

◆ EHCI_TUNE_RL_HS

#define EHCI_TUNE_RL_HS   4 /* nak throttle; see 4.9 */

Definition at line 32 of file ehci.c.

◆ EHCI_TUNE_RL_TT

#define EHCI_TUNE_RL_TT   0

Definition at line 33 of file ehci.c.

◆ g_ehci

#define g_ehci   #error

Definition at line 1046 of file ehci.c.

◆ hb_mult

#define hb_mult (   wMaxPacketSize)    (1 + (((wMaxPacketSize) >> 11) & 0x03))

Definition at line 323 of file ehci.c.

◆ INTR_MASK

#define INTR_MASK   (STS_IAA | STS_FATAL | STS_PCD | STS_ERR | STS_INT)

Definition at line 162 of file ehci.c.

◆ max_packet

#define max_packet (   wMaxPacketSize)    ((wMaxPacketSize) & 0x07ff)

Definition at line 325 of file ehci.c.

Function Documentation

◆ debug_qtds()

void debug_qtds ( struct ehci_hcd ehci)

Definition at line 108 of file ehci.c.

◆ dump_qh()

void dump_qh ( struct ehci_hcd ehci,
struct ehci_qh qh 
)

Definition at line 122 of file ehci.c.

◆ ehci_adquire_port()

void ehci_adquire_port ( struct ehci_hcd ehci,
int  port 
)

Definition at line 778 of file ehci.c.

◆ ehci_bulk_message()

s32 ehci_bulk_message ( struct ehci_hcd ehci,
struct ehci_device dev,
u8  bEndpoint,
u16  wLength,
void *  rpData 
)

Definition at line 682 of file ehci.c.

◆ ehci_close_device()

int ehci_close_device ( struct ehci_device dev)

Definition at line 1028 of file ehci.c.

◆ ehci_control_message()

s32 ehci_control_message ( struct ehci_hcd ehci,
struct ehci_device dev,
u8  bmRequestType,
u8  bmRequest,
u16  wValue,
u16  wIndex,
u16  wLength,
void *  buf 
)

Definition at line 651 of file ehci.c.

◆ ehci_discover()

int ehci_discover ( struct ehci_hcd ehci)

Definition at line 984 of file ehci.c.

◆ ehci_do_urb()

int ehci_do_urb ( struct ehci_hcd ehci,
struct ehci_device dev,
struct ehci_urb urb 
)

Definition at line 504 of file ehci.c.

◆ ehci_fd_to_dev()

void * ehci_fd_to_dev ( struct ehci_hcd ehci,
int  fd 
)

Definition at line 1034 of file ehci.c.

◆ ehci_get_device_list()

int ehci_get_device_list ( struct ehci_hcd ehci,
u8  maxdev,
u8  b0,
u8 num,
u16 buf 
)

Definition at line 1048 of file ehci.c.

◆ ehci_init_port()

int ehci_init_port ( struct ehci_hcd ehci,
int  port 
)

Definition at line 862 of file ehci.c.

◆ ehci_open_device()

int ehci_open_device ( struct ehci_hcd ehci,
int  vid,
int  pid,
int  fd 
)

Definition at line 1013 of file ehci.c.

◆ ehci_release_ports()

int ehci_release_ports ( struct ehci_hcd ehci)

Definition at line 998 of file ehci.c.

◆ ehci_reset_device()

int ehci_reset_device ( struct ehci_hcd ehci,
struct ehci_device dev 
)

Definition at line 979 of file ehci.c.

◆ ehci_reset_port()

int ehci_reset_port ( struct ehci_hcd ehci,
int  port 
)

Definition at line 959 of file ehci.c.

◆ ehci_reset_port2()

int ehci_reset_port2 ( struct ehci_hcd ehci,
int  port 
)

Definition at line 966 of file ehci.c.

◆ ehci_reset_port_old()

int ehci_reset_port_old ( struct ehci_hcd ehci,
int  port 
)

Definition at line 697 of file ehci.c.

◆ ehci_reset_usb_port()

int ehci_reset_usb_port ( struct ehci_hcd ehci,
int  port 
)

Definition at line 799 of file ehci.c.

◆ qh_urb_transaction()

struct ehci_qtd * qh_urb_transaction ( struct ehci_hcd ehci,
struct ehci_urb urb 
)

Definition at line 373 of file ehci.c.

Variable Documentation

◆ handshake_mode

int handshake_mode = 0

Definition at line 166 of file ehci.c.

◆ unplug_device

int unplug_device = 0

Definition at line 160 of file ehci.c.

◆ usb_timeout

u32 usb_timeout = 1000 * 1000

Definition at line 502 of file ehci.c.