for (i = ed->branch; i < NUM_INTS; i += ed->interval) {
struct ed **prev = &ohci->periodic [i];
- u32 *prev_p = &ohci->hcca->int_table [i];
+ __le32 *prev_p = &ohci->hcca->int_table [i];
struct ed *here = *prev;
/* sorting each branch by period (slow before fast)
ed->hwNextED = *prev_p;
wmb ();
*prev = ed;
- *prev_p = cpu_to_le32p (&ed->dma);
+ *prev_p = cpu_to_le32(ed->dma);
wmb();
}
ohci->load [i] += ed->load;
for (i = ed->branch; i < NUM_INTS; i += ed->interval) {
struct ed *temp;
struct ed **prev = &ohci->periodic [i];
- u32 *prev_p = &ohci->hcca->int_table [i];
+ __le32 *prev_p = &ohci->hcca->int_table [i];
while (*prev && (temp = *prev) != ed) {
prev_p = &temp->hwNextED;
*/
if (ed->state == ED_IDLE) {
u32 info;
+ __le32 hw_info;
info = usb_pipedevice (pipe);
info |= (ep >> 1) << 7;
info |= usb_maxpacket (udev, pipe, is_out) << 16;
- info = cpu_to_le32 (info);
+ hw_info = cpu_to_le32 (info);
if (udev->speed == USB_SPEED_LOW)
- info |= ED_LOWSPEED;
+ hw_info |= ED_LOWSPEED;
/* only control transfers store pids in tds */
if (type != PIPE_CONTROL) {
- info |= is_out ? ED_OUT : ED_IN;
+ hw_info |= is_out ? ED_OUT : ED_IN;
if (type != PIPE_BULK) {
/* periodic transfers... */
if (type == PIPE_ISOCHRONOUS)
- info |= ED_ISO;
+ hw_info |= ED_ISO;
else if (interval > 32) /* iso can be bigger */
interval = 32;
ed->interval = interval;
/ 1000;
}
}
- ed->hwINFO = info;
+ ed->hwINFO = hw_info;
}
done:
cc = TD_CC_GET (tdINFO);
- /* control endpoints only have soft stalls */
- if (type != PIPE_CONTROL && cc == TD_CC_STALL)
- usb_endpoint_halt (urb->dev,
- usb_pipeendpoint (urb->pipe),
- usb_pipeout (urb->pipe));
-
/* update packet status if needed (short is normally ok) */
if (cc == TD_DATAUNDERRUN
&& !(urb->transfer_flags & URB_SHORT_NOT_OK))
struct urb *urb = td->urb;
struct ed *ed = td->ed;
struct list_head *tmp = td->td_list.next;
- u32 toggle = ed->hwHeadP & ED_C;
+ __le32 toggle = ed->hwHeadP & ED_C;
/* clear ed halt; this is the td that caused it, but keep it inactive
* until its urb->complete() has a chance to clean up.
*/
while (tmp != &ed->td_list) {
struct td *next;
- u32 info;
+ __le32 info;
next = list_entry (tmp, struct td, td_list);
tmp = next->td_list.next;
/*-------------------------------------------------------------------------*/
-/* wrap-aware logic stolen from <linux/jiffies.h> */
-#define tick_before(t1,t2) ((((s16)(t1))-((s16)(t2))) < 0)
-
/* there are some urbs/eds to unlink; called in_irq(), with HCD locked */
static void
finish_unlinks (struct ohci_hcd *ohci, u16 tick, struct pt_regs *regs)
for (last = &ohci->ed_rm_list, ed = *last; ed != NULL; ed = *last) {
struct list_head *entry, *tmp;
int completed, modified;
- u32 *prev;
+ __le32 *prev;
/* only take off EDs that the HC isn't using, accounting for
* frame counter wraps and EDs with partially retired TDs
td = list_entry (ed->td_list.next, struct td,
td_list);
- head = cpu_to_le32 (ed->hwHeadP) & TD_MASK;
+ head = le32_to_cpu (ed->hwHeadP) & TD_MASK;
/* INTR_WDH may need to clean up first */
if (td->td_dma != head)
struct td *td;
struct urb *urb;
urb_priv_t *urb_priv;
- u32 savebits;
+ __le32 savebits;
td = list_entry (entry, struct td, td_list);
urb = td->urb;