/* search for the right schedule branch to use for a periodic ed. *doessomeloadbalancing;returnsthebranch,ornegativeerrno.
*/ staticint balance (struct ohci_hcd *ohci, int interval, int load)
{ int i, branch = -ENOSPC;
/* iso periods can be huge; iso tds specify frame numbers */ if (interval > NUM_INTS)
interval = NUM_INTS;
/* search for the least loaded schedule branch of that period *thathasenoughbandwidthleftunreserved.
*/ for (i = 0; i < interval ; i++) { if (branch < 0 || ohci->load [branch] > ohci->load [i]) { int j;
/* usb 1.1 says 90% of one frame */ for (j = i; j < NUM_INTS; j += interval) { if ((ohci->load [j] + load) > 900) break;
} if (j < NUM_INTS) continue;
branch = i;
}
} return branch;
}
/* both iso and interrupt requests have periods; this routine puts them *intothescheduletreeintheapppropriateplace.mostisodevicesuse *1msecperiods,butthat'snotrequired.
*/ staticvoid periodic_link (struct ohci_hcd *ohci, struct ed *ed)
{ unsigned i;
for (i = ed->branch; i < NUM_INTS; i += ed->interval) { struct ed **prev = &ohci->periodic [i];
__hc32 *prev_p = &ohci->hcca->int_table [i]; struct ed *here = *prev;
/* sorting each branch by period (slow before fast) *letsussharethefasterpartsofthetree. *(plusmaybe:putinterruptedsbeforeiso)
*/ while (here && ed != here) { if (ed->interval > here->interval) break;
prev = &here->ed_next;
prev_p = &here->hwNextED;
here = *prev;
} if (ed != here) {
ed->ed_next = here; if (here)
ed->hwNextED = *prev_p;
wmb ();
*prev = ed;
*prev_p = cpu_to_hc32(ohci, ed->dma);
wmb();
}
ohci->load [i] += ed->load;
}
ohci_to_hcd(ohci)->self.bandwidth_allocated += ed->load / ed->interval;
}
/* link an ed into one of the HC chains */
staticint ed_schedule (struct ohci_hcd *ohci, struct ed *ed)
{ int branch;
/* scan the periodic table to find and unlink this ED */ staticvoid periodic_unlink (struct ohci_hcd *ohci, struct ed *ed)
{ int i;
for (i = ed->branch; i < NUM_INTS; i += ed->interval) { struct ed *temp; struct ed **prev = &ohci->periodic [i];
__hc32 *prev_p = &ohci->hcca->int_table [i];
/* unlink an ed from one of the HC chains. *justthelinktotheedisunlinked. *thelinkfromtheedstillpointstoanotheroperationaledor0 *sotheHCcaneventuallyfinishtheprocessingoftheunlinkeded *(assumingitalreadystartedthat,whichneedn'tbetrue). * *ED_UNLINKisatransientstate:theHCmaystillseethisED,butsoon *itwon't.ED_SKIPmeanstheHCwillfinishitscurrenttransaction, *butwon'tstartanythingnew.TheTDqueuemaystillgrow;device *driversdon'tknowaboutthisHCD-internalstate. * *WhentheHCcan'tseetheED,somethingchangesED_UNLINKtooneof: * *-ED_OPER:whenthere'sanyrequestqueued,theEDgetsrescheduled *immediately.HCshouldbeworkingonthem. * *-ED_IDLE:whenthere'snoTDqueueortheHCisn'trunning. * *Whenfinish_unlinks()runslater,afterSOFinterrupt,itwilloften *completeoneormoreURBunlinksbeforemakingthatstatechange.
*/ staticvoid ed_deschedule (struct ohci_hcd *ohci, struct ed *ed)
{
ed->hwINFO |= cpu_to_hc32 (ohci, ED_SKIP);
wmb ();
ed->state = ED_UNLINK;
/* To deschedule something from the control or bulk list, just *clearCLE/BLEandwait.There'snosafewaytoscruboutlist *head/currentregistersuntillater,and"later"isn'tvery *tightlyspecified.Figure6-5andSection6.4.2.2showhow *theHCisreadingtheEDqueues(whilewemodifythem). * *Fornow,ed_schedule()is"later".Itmightbegoodparanoia *toscrubthoseregistersinfinish_unlinks(),incaseofbugs *thatmaketheHCtrytousethem.
*/ switch (ed->type) { case PIPE_CONTROL: /* remove ED from the HC's list: */ if (ed->ed_prev == NULL) { if (!ed->hwNextED) {
ohci->hc_control &= ~OHCI_CTRL_CLE;
ohci_writel (ohci, ohci->hc_control,
&ohci->regs->control); // a ohci_readl() later syncs CLE with the HC
} else
ohci_writel (ohci,
hc32_to_cpup (ohci, &ed->hwNextED),
&ohci->regs->ed_controlhead);
} else {
ed->ed_prev->ed_next = ed->ed_next;
ed->ed_prev->hwNextED = ed->hwNextED;
} /* remove ED from the HCD's list: */ if (ohci->ed_controltail == ed) {
ohci->ed_controltail = ed->ed_prev; if (ohci->ed_controltail)
ohci->ed_controltail->ed_next = NULL;
} elseif (ed->ed_next) {
ed->ed_next->ed_prev = ed->ed_prev;
} break;
case PIPE_BULK: /* remove ED from the HC's list: */ if (ed->ed_prev == NULL) { if (!ed->hwNextED) {
ohci->hc_control &= ~OHCI_CTRL_BLE;
ohci_writel (ohci, ohci->hc_control,
&ohci->regs->control); // a ohci_readl() later syncs BLE with the HC
} else
ohci_writel (ohci,
hc32_to_cpup (ohci, &ed->hwNextED),
&ohci->regs->ed_bulkhead);
} else {
ed->ed_prev->ed_next = ed->ed_next;
ed->ed_prev->hwNextED = ed->hwNextED;
} /* remove ED from the HCD's list: */ if (ohci->ed_bulktail == ed) {
ohci->ed_bulktail = ed->ed_prev; if (ohci->ed_bulktail)
ohci->ed_bulktail->ed_next = NULL;
} elseif (ed->ed_next) {
ed->ed_next->ed_prev = ed->ed_prev;
} break;
// case PIPE_INTERRUPT: // case PIPE_ISOCHRONOUS: default:
periodic_unlink (ohci, ed); break;
}
}
/* get and maybe (re)init an endpoint. init _should_ be done only as part *ofenumeration,usb_set_configuration()orusb_set_interface().
*/ staticstruct ed *ed_get ( struct ohci_hcd *ohci, struct usb_host_endpoint *ep, struct usb_device *udev, unsignedint pipe, int interval
) { struct ed *ed; unsignedlong flags;
spin_lock_irqsave (&ohci->lock, flags);
ed = ep->hcpriv; if (!ed) { struct td *td; int is_out;
u32 info;
ed = ed_alloc (ohci, GFP_ATOMIC); if (!ed) { /* out of memory */ goto done;
}
/* dummy td; end of td list for ed */
td = td_alloc (ohci, GFP_ATOMIC); if (!td) { /* out of memory */
ed_free (ohci, ed);
ed = NULL; goto done;
}
ed->dummy = td;
ed->hwTailP = cpu_to_hc32 (ohci, td->td_dma);
ed->hwHeadP = ed->hwTailP; /* ED_C, ED_H zeroed */
ed->state = ED_IDLE;
/* request unlinking of an endpoint from an operational HC. *puttheepontherm_list *realworkisdoneatthenextstartframe(SF)hardwareinterrupt *callerguaranteesHCDisrunning,sohardwareaccessissafe, *andthated->stateisED_OPER
*/ staticvoid start_ed_unlink (struct ohci_hcd *ohci, struct ed *ed)
{
ed->hwINFO |= cpu_to_hc32 (ohci, ED_DEQUEUE);
ed_deschedule (ohci, ed);
/* rm_list is just singly linked, for simplicity */
ed->ed_next = ohci->ed_rm_list;
ed->ed_prev = NULL;
ohci->ed_rm_list = ed;
/* enable SOF interrupt */
ohci_writel (ohci, OHCI_INTR_SF, &ohci->regs->intrstatus);
ohci_writel (ohci, OHCI_INTR_SF, &ohci->regs->intrenable); // flush those writes, and get latest HCCA contents
(void) ohci_readl (ohci, &ohci->regs->control);
/* SF interrupt might get delayed; record the frame counter value that *indicateswhentheHCisn'tlookingatit,soconcurrentunlinks *behave.frame_nowrapsevery2^16msec,andchangesrightbefore *SFistriggered.
*/
ed->tick = ohci_frame_no(ohci) + 1;
/* enqueue next TD for this URB (OHCI spec 5.2.8.2) */
staticvoid
td_fill (struct ohci_hcd *ohci, u32 info,
dma_addr_t data, int len, struct urb *urb, int index)
{ struct td *td, *td_pt; struct urb_priv *urb_priv = urb->hcpriv; int is_iso = info & TD_ISO; int hash;
// ASSERT (index < urb_priv->length);
/* aim for only one interrupt per urb. mostly applies to control *andiso;otherurbsrarelyneedmorethanoneTDperurb. *thisway,onlyfinaltds(oroneswithanerror)causeIRQs. *atleastimmediately;useDI=6incaseanycontrolrequestis *temptedtodiepartwaythrough.(andtoforcethehctoflush *itsdonelistsoonish,evenonunlinkpaths.) * *NOTE:coulddelayinterruptsevenforthelastTD,andgetfewer *interrupts...increasingper-urblatencybysharinginterrupts. *Driversthatqueuebulkurbsmayrequestthatbehavior.
*/ if (index != (urb_priv->length - 1)
|| (urb->transfer_flags & URB_NO_INTERRUPT))
info |= TD_DI_SET (6);
/* use this td as the next dummy */
td_pt = urb_priv->td [index];
/* fill the old dummy TD */
td = urb_priv->td [index] = urb_priv->ed->dummy;
urb_priv->ed->dummy = td_pt;
td->ed = urb_priv->ed;
td->next_dl_td = NULL;
td->index = index;
td->urb = urb;
td->data_dma = data; if (!len)
data = 0;
/* Prepare all TDs of a transfer, and queue them onto the ED. *CallerguaranteesHCisactive. *UsuallytheEDisalreadyontheschedule,soTDsmightbe *processedassoonasthey'requeued.
*/ staticvoid td_submit_urb ( struct ohci_hcd *ohci, struct urb *urb
) { struct urb_priv *urb_priv = urb->hcpriv; struct device *dev = ohci_to_hcd(ohci)->self.controller;
dma_addr_t data; int data_len = urb->transfer_buffer_length; int cnt = 0;
u32 info = 0; int is_out = usb_pipeout (urb->pipe); int periodic = 0; int i, this_sg_len, n; struct scatterlist *sg;
/* OHCI handles the bulk/interrupt data toggles itself. We just *usethedevicetogglebitsforresetting,andrelyonthefact *thatresettingtoggleismeaninglessiftheendpointisactive.
*/ if (!usb_gettoggle (urb->dev, usb_pipeendpoint (urb->pipe), is_out)) {
usb_settoggle (urb->dev, usb_pipeendpoint (urb->pipe),
is_out, 1);
urb_priv->ed->hwHeadP &= ~cpu_to_hc32 (ohci, ED_C);
}
list_add (&urb_priv->pending, &ohci->pending);
i = urb->num_mapped_sgs; if (data_len > 0 && i > 0) {
sg = urb->sg;
data = sg_dma_address(sg);
/* *urb->transfer_buffer_lengthmaybesmallerthanthe *sizeofthescatterlist(orviceversa)
*/
this_sg_len = min_t(int, sg_dma_len(sg), data_len);
} else {
sg = NULL; if (data_len)
data = urb->transfer_dma; else
data = 0;
this_sg_len = data_len;
}
/* NOTE: TD_CC is set so we can tell which TDs the HC processed by *usingTD_CC_GET,aswellasbyseeingthemonthedonelist. *(CC=NotAccessed...0x0F,or0x0EinPSWsforISO.)
*/ switch (urb_priv->ed->type) {
/* Bulk and interrupt are identical except for where in the schedule *theirEDslive.
*/ case PIPE_INTERRUPT: /* ... and periodic urbs have extra accounting */
periodic = ohci_to_hcd(ohci)->self.bandwidth_int_reqs++ == 0
&& ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs == 0;
fallthrough; case PIPE_BULK:
info = is_out
? TD_T_TOGGLE | TD_CC | TD_DP_OUT
: TD_T_TOGGLE | TD_CC | TD_DP_IN; /* TDs _could_ transfer up to 8K each */ for (;;) {
n = min(this_sg_len, 4096);
/* maybe avoid ED halt on final TD short read */ if (n >= data_len || (i == 1 && n >= this_sg_len)) { if (!(urb->transfer_flags & URB_SHORT_NOT_OK))
info |= TD_R;
}
td_fill(ohci, info, data, n, urb, cnt);
this_sg_len -= n;
data_len -= n;
data += n;
cnt++;
/* ISO has no retransmit, so no toggle; and it uses special TDs. *EachTDcouldhandlemultipleconsecutiveframes(interval1); *wecouldoftenreducethenumberofTDshere.
*/ case PIPE_ISOCHRONOUS: for (cnt = urb_priv->td_cnt; cnt < urb->number_of_packets;
cnt++) { int frame = urb->start_frame;
// FIXME scheduling should handle frame counter // roll-around ... exotic case (and OHCI has // a 2^16 iso range, vs other HCs max of 2^10)
frame += cnt * urb->interval;
frame &= 0xffff;
td_fill (ohci, TD_CC | TD_ISO | frame,
data + urb->iso_frame_desc [cnt].offset,
urb->iso_frame_desc [cnt].length, urb, cnt);
} if (ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs == 0) { if (quirk_amdiso(ohci))
usb_amd_quirk_pll_disable(); if (quirk_amdprefetch(ohci))
sb800_prefetch(dev, 1);
}
periodic = ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs++ == 0
&& ohci_to_hcd(ohci)->self.bandwidth_int_reqs == 0; break;
}
/* start periodic dma if needed */ if (periodic) {
wmb ();
ohci->hc_control |= OHCI_CTRL_PLE|OHCI_CTRL_IE;
ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
}
/* calculate transfer length/status and update the urb */ staticint td_done(struct ohci_hcd *ohci, struct urb *urb, struct td *td)
{
u32 tdINFO = hc32_to_cpup (ohci, &td->hwINFO); int cc = 0; int status = -EINPROGRESS;
list_del (&td->td_list);
/* ISO ... drivers see per-TD length/status */ if (tdINFO & TD_ISO) {
u16 tdPSW = ohci_hwPSW(ohci, td, 0); int dlen = 0;
/* NOTE: assumes FC in tdINFO == 0, and that *onlythefirstof0..MAXPSWpswsisused.
*/
cc = (tdPSW >> 12) & 0xF; if (tdINFO & TD_CC) /* hc didn't touch? */ return status;
if (usb_pipeout (urb->pipe))
dlen = urb->iso_frame_desc [td->index].length; else { /* short reads are always OK for ISO */ if (cc == TD_DATAUNDERRUN)
cc = TD_CC_NOERROR;
dlen = tdPSW & 0x3ff;
}
urb->actual_length += dlen;
urb->iso_frame_desc [td->index].actual_length = dlen;
urb->iso_frame_desc [td->index].status = cc_to_error [cc];
if (cc != TD_CC_NOERROR)
ohci_dbg(ohci, "urb %p iso td %p (%d) len %d cc %d\n",
urb, td, 1 + td->index, dlen, cc);
/* BULK, INT, CONTROL ... drivers see aggregate length/status, *exceptthat"setup"bytesaren'tcountedand"short"transfers *mightnotbereportedaserrors.
*/
} else { int type = usb_pipetype (urb->pipe);
u32 tdBE = hc32_to_cpup (ohci, &td->hwBE);
cc = TD_CC_GET (tdINFO);
/* update packet status if needed (short is normally ok) */ if (cc == TD_DATAUNDERRUN
&& !(urb->transfer_flags & URB_SHORT_NOT_OK))
cc = TD_CC_NOERROR; if (cc != TD_CC_NOERROR && cc < 0x0E)
status = cc_to_error[cc];
/* clear ed halt; this is the td that caused it, but keep it inactive *untilitsurb->complete()hasachancetocleanup.
*/
ed->hwINFO |= cpu_to_hc32 (ohci, ED_SKIP);
wmb ();
ed->hwHeadP &= ~cpu_to_hc32 (ohci, ED_H);
/* Get rid of all later tds from this urb. We don't have *tobecareful:noerrorsandnothingwastransferred. *Alsopatchtheedsoitlooksasifthosetdscompletednormally.
*/ while (tmp != &ed->td_list) { struct td *next;
next = list_entry (tmp, struct td, td_list);
tmp = next->td_list.next;
if (next->urb != urb) break;
/* NOTE: if multi-td control DATA segments get supported, *thisurbhadoneofthem,thistdwasn'tthelasttd *inthatsegment(TD_Rclear),thisedhaltedbecause *ofashortread,_and_URB_SHORT_NOT_OKisclear... *thenweneedtoleavethecontrolSTATUSpacketqueued *andclearED_SKIP.
*/
/* help for troubleshooting: report anything that *looksodd...thatdoesn'tincludeprotocolstalls *(ormaybesomeotherthings)
*/ switch (cc) { case TD_DATAUNDERRUN: if ((urb->transfer_flags & URB_SHORT_NOT_OK) == 0) break;
fallthrough; case TD_CC_STALL: if (usb_pipecontrol (urb->pipe)) break;
fallthrough; default:
ohci_dbg (ohci, "urb %p path %s ep%d%s %08x cc %d --> status %d\n",
urb, urb->dev->devpath,
usb_pipeendpoint (urb->pipe),
usb_pipein (urb->pipe) ? "in" : "out",
hc32_to_cpu (ohci, td->hwINFO),
cc, cc_to_error [cc]);
}
}
/* Add a TD to the done list */ staticvoid add_to_done_list(struct ohci_hcd *ohci, struct td *td)
{ struct td *td2, *td_prev; struct ed *ed;
if (td->next_dl_td) return; /* Already on the list */
/* Add all the TDs going back until we reach one that's on the list */
ed = td->ed;
td2 = td_prev = td;
list_for_each_entry_continue_reverse(td2, &ed->td_list, td_list) { if (td2->next_dl_td) break;
td2->next_dl_td = td_prev;
td_prev = td2;
}
if (ohci->dl_end)
ohci->dl_end->next_dl_td = td_prev; else
ohci->dl_start = td_prev;
/* Did we just add the latest pending TD? */
td2 = ed->pending_td; if (td2 && td2->next_dl_td)
ed->pending_td = NULL;
}
/* Get the entries on the hardware done queue and put them on our list */ staticvoid update_done_list(struct ohci_hcd *ohci)
{
u32 td_dma; struct td *td = NULL;
/* there are some urbs/eds to unlink; called in_irq(), with HCD locked */ staticvoid finish_unlinks(struct ohci_hcd *ohci)
{ unsigned tick = ohci_frame_no(ohci); struct ed *ed, **last;
rescan_all: for (last = &ohci->ed_rm_list, ed = *last; ed != NULL; ed = *last) { struct list_head *entry, *tmp; int completed, modified;
__hc32 *prev;
/* only take off EDs that the HC isn't using, accounting for *framecounterwrapsandEDswithpartiallyretiredTDs
*/ if (likely(ohci->rh_state == OHCI_RH_RUNNING) &&
tick_before(tick, ed->tick)) {
skip_ed:
last = &ed->ed_next; continue;
} if (!list_empty(&ed->td_list)) { struct td *td;
u32 head;
/* INTR_WDH may need to clean up first */
head = hc32_to_cpu(ohci, ed->hwHeadP) & TD_MASK; if (td->td_dma != head &&
ohci->rh_state == OHCI_RH_RUNNING) goto skip_ed;
/* Don't mess up anything already on the done list */ if (td->next_dl_td) goto skip_ed;
}
/* ED's now officially unlinked, hc doesn't see */
ed->hwHeadP &= ~cpu_to_hc32(ohci, ED_H);
ed->hwNextED = 0;
wmb();
ed->hwINFO &= ~cpu_to_hc32(ohci, ED_SKIP | ED_DEQUEUE);
/* reentrancy: if we drop the schedule lock, someone might *havemodifiedthislist.normallyit'sjustprepending *entries(whichwe'dignore),butparanoiawon'thurt.
*/
*last = ed->ed_next;
ed->ed_next = NULL;
modified = 0;
/* unlink urbs as requested, but rescan the list after *wecallacompletionsinceitmighthaveunlinked *another(earlier)urb * *Whenwegethere,theHCdoesn'tseethised.Butit *mustnotberescheduleduntilallcompletedURBshave *beengivenbacktothedriver.
*/
rescan_this:
completed = 0;
prev = &ed->hwHeadP;
list_for_each_safe (entry, tmp, &ed->td_list) { struct td *td; struct urb *urb;
urb_priv_t *urb_priv;
__hc32 savebits;
u32 tdINFO;
/* If this was unlinked, the TD may not have been *retired...somanuallysavethedatatoggle. *Thecontrollerignoresthevaluewesavefor *controlandISOendpoints.
*/
tdINFO = hc32_to_cpup(ohci, &td->hwINFO); if ((tdINFO & TD_T) == TD_T_DATA0)
ed->hwHeadP &= ~cpu_to_hc32(ohci, ED_C); elseif ((tdINFO & TD_T) == TD_T_DATA1)
ed->hwHeadP |= cpu_to_hc32(ohci, ED_C);
/* HC may have partly processed this TD */
td_done (ohci, urb, td);
urb_priv->td_cnt++;
/* if URB is done, clean up */ if (urb_priv->td_cnt >= urb_priv->length) {
modified = completed = 1;
finish_urb(ohci, urb, 0);
}
} if (completed && !list_empty (&ed->td_list)) goto rescan_this;
/* *IfnoTDsarequeued,EDisnowidle. *Otherwise,iftheHCisrunning,reschedule. *IftheHCisn'trunning,addEDbacktothe *startofthelistforlaterprocessing.
*/ if (list_empty(&ed->td_list)) {
ed->state = ED_IDLE;
list_del(&ed->in_use_list);
} elseif (ohci->rh_state == OHCI_RH_RUNNING) {
ed_schedule(ohci, ed);
} else {
ed->ed_next = ohci->ed_rm_list;
ohci->ed_rm_list = ed; /* Don't loop on the same ED */ if (last == &ohci->ed_rm_list)
last = &ed->ed_next;
}
if (modified) goto rescan_all;
}
/* maybe reenable control and bulk lists */ if (ohci->rh_state == OHCI_RH_RUNNING && !ohci->ed_rm_list) {
u32 command = 0, control = 0;
if (ohci->ed_controltail) {
command |= OHCI_CLF; if (quirk_zfmicro(ohci))
mdelay(1); if (!(ohci->hc_control & OHCI_CTRL_CLE)) {
control |= OHCI_CTRL_CLE;
ohci_writel (ohci, 0,
&ohci->regs->ed_controlcurrent);
}
} if (ohci->ed_bulktail) {
command |= OHCI_BLF; if (quirk_zfmicro(ohci))
mdelay(1); if (!(ohci->hc_control & OHCI_CTRL_BLE)) {
control |= OHCI_CTRL_BLE;
ohci_writel (ohci, 0,
&ohci->regs->ed_bulkcurrent);
}
}
/* CLE/BLE to enable, CLF/BLF to (maybe) kickstart */ if (control) {
ohci->hc_control |= control; if (quirk_zfmicro(ohci))
mdelay(1);
ohci_writel (ohci, ohci->hc_control,
&ohci->regs->control);
} if (command) { if (quirk_zfmicro(ohci))
mdelay(1);
ohci_writel (ohci, command, &ohci->regs->cmdstatus);
}
}
}
/* Take back a TD from the host controller */ staticvoid takeback_td(struct ohci_hcd *ohci, struct td *td)
{ struct urb *urb = td->urb;
urb_priv_t *urb_priv = urb->hcpriv; struct ed *ed = td->ed; int status;
/* update URB's length and status from TD */
status = td_done(ohci, urb, td);
urb_priv->td_cnt++;
/* If all this urb's TDs are done, call complete() */ if (urb_priv->td_cnt >= urb_priv->length)
finish_urb(ohci, urb, status);
/* clean schedule: unlink EDs that are no longer busy */ if (list_empty(&ed->td_list)) { if (ed->state == ED_OPER)
start_ed_unlink(ohci, ed);
/* ... reenabling halted EDs only after fault cleanup */
} elseif ((ed->hwINFO & cpu_to_hc32(ohci, ED_SKIP | ED_DEQUEUE))
== cpu_to_hc32(ohci, ED_SKIP)) {
td = list_entry(ed->td_list.next, struct td, td_list); if (!(td->hwINFO & cpu_to_hc32(ohci, TD_DONE))) {
ed->hwINFO &= ~cpu_to_hc32(ohci, ED_SKIP); /* ... hc may need waking-up */ switch (ed->type) { case PIPE_CONTROL:
ohci_writel(ohci, OHCI_CLF,
&ohci->regs->cmdstatus); break; case PIPE_BULK:
ohci_writel(ohci, OHCI_BLF,
&ohci->regs->cmdstatus); break;
}
}
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.