fixed a few bugs but still no go.

Seem to have problems with global variables?
This commit is contained in:
Markus Fröschle
2013-11-04 20:58:57 +00:00
parent d14bfd1cf2
commit 70365f08e4
7 changed files with 78 additions and 68 deletions

View File

@@ -446,26 +446,6 @@ static ed_t * ep_add_ed(ohci_t * ohci, struct usb_device * usb_dev, uint32_t pip
/* we need more TDs than EDs */
#define NUM_TD 64
/* pointers to aligned storage */
extern td_t *ptd;
/* TDs ... */
static inline struct td *td_alloc(struct usb_device *usb_dev)
{
int i;
struct td *td;
td = NULL;
for (i = 0; i < NUM_TD; i++)
{
if (ptd[i].usb_dev == NULL)
{
td = &ptd[i];
td->usb_dev = usb_dev;
break;
}
}
return td;
}
static inline void ed_free(struct ed *ed)
{

View File

@@ -228,7 +228,7 @@ typedef struct
* this is how the lowlevel part communicate with the outer world
*/
int ohci_usb_lowlevel_init(long handle, const struct pci_device_id *ent, void **priv);
int ohci_usb_lowlevel_init(uint16_t handle, const struct pci_device_id *ent, void **priv);
int ohci_usb_lowlevel_stop(void *priv);
int ohci_submit_bulk_msg(struct usb_device *dev, uint32_t pipe, void *buffer, int transfer_len);
int ohci_submit_control_msg(struct usb_device *dev, uint32_t pipe, void *buffer, int transfer_len, struct devrequest *setup);
@@ -270,7 +270,7 @@ void usb_mem_stop(void);
/* routines */
USB_COOKIE *usb_get_cookie(long id);
void usb_error_msg(const char *const fmt, ... );
int usb_init(long handle, const struct pci_device_id *ent); /* initialize the USB Controller */
int usb_init(uint16_t handle, const struct pci_device_id *ent); /* initialize the USB Controller */
int usb_stop(void); /* stop the USB Controller */
int usb_set_protocol(struct usb_device *dev, int ifnum, int protocol);