PERFORCE change 127071 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Mon Oct 1 12:08:17 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=127071
Change 127071 by hselasky at hselasky_laptop001 on 2007/10/01 19:08:00
Style change (see "man style"):
- space after "if|while|for|return|switch"
Done by the help of the following script kernel
and the Norwegian character "ø":
[ -f src/$F ] && (cat src/$F | \
sed -E -e "s/[ ](if|while|for|return|switch)[(]/&ø/g" | \
sed -e "s/[(]ø/ (/g" > temp) && ((diff -u src/$F temp > /dev/null) || \
(cp temp src/$F))
Affected files ...
.. //depot/projects/usb/src/sys/dev/sound/pcm/mixer.c#7 edit
.. //depot/projects/usb/src/sys/dev/sound/usb/uaudio.c#17 edit
.. //depot/projects/usb/src/sys/dev/usb/ehci.c#43 edit
.. //depot/projects/usb/src/sys/dev/usb/ehci_pci.c#21 edit
.. //depot/projects/usb/src/sys/dev/usb/if_aue.c#30 edit
.. //depot/projects/usb/src/sys/dev/usb/if_axe.c#31 edit
.. //depot/projects/usb/src/sys/dev/usb/if_cdce.c#24 edit
.. //depot/projects/usb/src/sys/dev/usb/if_cue.c#26 edit
.. //depot/projects/usb/src/sys/dev/usb/if_kue.c#28 edit
.. //depot/projects/usb/src/sys/dev/usb/if_rum.c#9 edit
.. //depot/projects/usb/src/sys/dev/usb/if_ural.c#33 edit
.. //depot/projects/usb/src/sys/dev/usb/ohci.c#33 edit
.. //depot/projects/usb/src/sys/dev/usb/ohci_pci.c#21 edit
.. //depot/projects/usb/src/sys/dev/usb/uark.c#7 edit
.. //depot/projects/usb/src/sys/dev/usb/ubsa.c#23 edit
.. //depot/projects/usb/src/sys/dev/usb/ucom.c#19 edit
.. //depot/projects/usb/src/sys/dev/usb/ucycom.c#17 edit
.. //depot/projects/usb/src/sys/dev/usb/udbp.c#13 edit
.. //depot/projects/usb/src/sys/dev/usb/ufoma.c#23 edit
.. //depot/projects/usb/src/sys/dev/usb/uftdi.c#21 edit
.. //depot/projects/usb/src/sys/dev/usb/ugen.c#23 edit
.. //depot/projects/usb/src/sys/dev/usb/uhci.c#35 edit
.. //depot/projects/usb/src/sys/dev/usb/uhci_pci.c#20 edit
.. //depot/projects/usb/src/sys/dev/usb/uhub.c#17 edit
.. //depot/projects/usb/src/sys/dev/usb/uipaq.c#7 edit
.. //depot/projects/usb/src/sys/dev/usb/ulpt.c#23 edit
.. //depot/projects/usb/src/sys/dev/usb/umass.c#23 edit
.. //depot/projects/usb/src/sys/dev/usb/umct.c#17 edit
.. //depot/projects/usb/src/sys/dev/usb/umodem.c#26 edit
.. //depot/projects/usb/src/sys/dev/usb/ums.c#23 edit
.. //depot/projects/usb/src/sys/dev/usb/uplcom.c#24 edit
.. //depot/projects/usb/src/sys/dev/usb/urio.c#13 edit
.. //depot/projects/usb/src/sys/dev/usb/usb.c#19 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_cdev.c#16 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_hid.c#6 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_requests.c#8 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_subr.c#45 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#32 edit
.. //depot/projects/usb/src/sys/dev/usb/uvisor.c#19 edit
.. //depot/projects/usb/src/sys/dev/usb/uvscom.c#24 edit
.. //depot/projects/usb/src/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c#15 edit
.. //depot/projects/usb/src/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c#10 edit
Differences ...
==== //depot/projects/usb/src/sys/dev/sound/pcm/mixer.c#7 (text+ko) ====
@@ -129,12 +129,12 @@
#define MIXER_SET_UNLOCK(x, y) do { \
if ((y) != 0) \
snd_mtxunlock((x)->lock); \
-} while(0)
+} while (0)
#define MIXER_SET_LOCK(x, y) do { \
if ((y) != 0) \
snd_mtxlock((x)->lock); \
-} while(0)
+} while (0)
static int
mixer_set_softpcmvol(struct snd_mixer *m, struct snddev_info *d,
==== //depot/projects/usb/src/sys/dev/sound/usb/uaudio.c#17 (text+ko) ====
@@ -925,7 +925,7 @@
id = (void *)desc;
- if(id->bInterfaceNumber != lastidx) {
+ if (id->bInterfaceNumber != lastidx) {
lastidx = id->bInterfaceNumber;
curidx++;
alt_index = 0;
@@ -2051,7 +2051,7 @@
uaudio_mixer_add_ctl(sc, &mix);
}
- switch(ptype) {
+ switch (ptype) {
case UPDOWNMIX_PROCESS:
uaudio_mixer_add_processing_updown(sc, iot, id);
break;
@@ -2591,7 +2591,7 @@
return SOUND_MIXER_IMIX;
}
- while(uat->terminal_type) {
+ while (uat->terminal_type) {
if (uat->terminal_type == terminal_type) {
break;
}
@@ -2618,7 +2618,7 @@
return (root + n);
}
}
- } while(n--);
+ } while (n--);
return NULL;
}
@@ -2636,7 +2636,7 @@
return (root + n);
}
}
- } while(n--);
+ } while (n--);
return NULL;
}
@@ -2745,7 +2745,7 @@
iot->usr.bit_output[j/8] |= (1 << (j % 8));
}
}
- } while(j--);
+ } while (j--);
return;
}
@@ -2832,7 +2832,7 @@
i = ID_max;
do {
uaudio_mixer_find_inputs_sub(iot, &i, 1, &((iot+i)->usr));
- } while(i--);
+ } while (i--);
/*
* determine outputs for
@@ -2841,7 +2841,7 @@
i = ID_max;
do {
uaudio_mixer_find_outputs_sub(iot, i, ID_max, &((iot+i)->usr));
- } while(i--);
+ } while (i--);
/* set "id_max" and "root" */
@@ -2849,7 +2849,7 @@
do {
(iot + i)->usr.id_max = ID_max;
(iot + i)->root = iot;
- } while(i--);
+ } while (i--);
#ifdef USB_DEBUG
i = ID_max;
@@ -2924,7 +2924,7 @@
if (iot[i].usr.bit_input[j/8] & (1 << (j % 8))) {
DPRINTF(0, " -- ID=%d\n", j);
}
- } while(j--);
+ } while (j--);
DPRINTF(0, "Outputs from this ID are:\n");
@@ -2933,9 +2933,9 @@
if (iot[i].usr.bit_output[j/8] & (1 << (j % 8))) {
DPRINTF(0, " -- ID=%d\n", j);
}
- } while(j--);
+ } while (j--);
- } while(i--);
+ } while (i--);
#endif
/*
@@ -2993,7 +2993,7 @@
break;
}
- } while(i--);
+ } while (i--);
done:
if (iot) {
==== //depot/projects/usb/src/sys/dev/usb/ehci.c#43 (text+ko) ====
@@ -89,8 +89,8 @@
static void
ehci_dump_sqh(ehci_qh_t *sqh);
#else
-#define DPRINTF(x) do { } while(0)
-#define DPRINTFN(n,x) do { } while(0)
+#define DPRINTF(x) do { } while (0)
+#define DPRINTFN(n,x) do { } while (0)
#endif
#define EHCI_INTR_ENDPT 1
@@ -151,7 +151,7 @@
CALLOUT_RETURNUNLOCKED);
#ifdef USB_DEBUG
- if(ehcidebug > 2)
+ if (ehcidebug > 2)
{
ehci_dump_regs(sc);
}
@@ -170,7 +170,7 @@
cparams = EREAD4(sc, EHCI_HCCPARAMS);
DPRINTF(("cparams=0x%x\n", cparams));
- if(EHCI_HCC_64BIT(cparams))
+ if (EHCI_HCC_64BIT(cparams))
{
DPRINTF(("HCC uses 64-bit structures\n"));
@@ -185,11 +185,11 @@
EOWRITE4(sc, EHCI_USBCMD, 0); /* Halt controller */
DELAY(1000*1);
EOWRITE4(sc, EHCI_USBCMD, EHCI_CMD_HCRESET);
- for(i = 0; i < 100; i++)
+ for (i = 0; i < 100; i++)
{
DELAY(1000*1);
hcr = EOREAD4(sc, EHCI_USBCMD) & EHCI_CMD_HCRESET;
- if(!hcr)
+ if (!hcr)
{
break;
}
@@ -208,7 +208,7 @@
* 2: 256*4 bytes
* 3: unknown
*/
- if(EHCI_CMD_FLS(EOREAD4(sc, EHCI_USBCMD)) == 3)
+ if (EHCI_CMD_FLS(EOREAD4(sc, EHCI_USBCMD)) == 3)
{
device_printf(sc->sc_bus.bdev, "invalid frame-list-size\n");
err = USBD_IOERROR;
@@ -222,7 +222,7 @@
usbd_page_dma_exit(&(sc->sc_hw_page));
- for(i = 0; i < EHCI_VIRTUAL_FRAMELIST_COUNT; i++)
+ for (i = 0; i < EHCI_VIRTUAL_FRAMELIST_COUNT; i++)
{
hw_ptr->intr_start[i].qh_self =
htole32(SC_HW_PHYSADDR(sc,intr_start[i])|EHCI_LINK_QH);
@@ -252,10 +252,10 @@
* powers of 2 times 1ms
*/
bit = EHCI_VIRTUAL_FRAMELIST_COUNT/2;
- while(bit)
+ while (bit)
{
x = bit;
- while(x & bit)
+ while (x & bit)
{
y = (x ^ bit)|(bit/2);
@@ -272,7 +272,7 @@
/* the last (1ms) QH terminates */
hw_ptr->intr_start[0].qh_link = htole32(EHCI_LINK_TERMINATE);
- for(i = 0; i < EHCI_VIRTUAL_FRAMELIST_COUNT; i++)
+ for (i = 0; i < EHCI_VIRTUAL_FRAMELIST_COUNT; i++)
{
/* initialize full speed isochronous */
@@ -312,7 +312,7 @@
* pframes -> high speed isochronous ->
* full speed isochronous -> interrupt QH's
*/
- for(i = 0; i < EHCI_FRAMELIST_COUNT; i++)
+ for (i = 0; i < EHCI_FRAMELIST_COUNT; i++)
{
hw_ptr->pframes[i] = hw_ptr->isoc_hs_start
[i & (EHCI_VIRTUAL_FRAMELIST_COUNT-1)].itd_self;
@@ -349,7 +349,7 @@
usbd_page_dma_enter(&(sc->sc_hw_page));
#ifdef USB_DEBUG
- if(ehcidebug)
+ if (ehcidebug)
{
ehci_dump_sqh(&(hw_ptr->async_start));
}
@@ -373,11 +373,11 @@
/* Take over port ownership */
EOWRITE4(sc, EHCI_CONFIGFLAG, EHCI_CONF_CF);
- for(i = 0; i < 100; i++)
+ for (i = 0; i < 100; i++)
{
DELAY(1000*1);
hcr = EOREAD4(sc, EHCI_USBSTS) & EHCI_STS_HCH;
- if(!hcr)
+ if (!hcr)
{
break;
}
@@ -431,10 +431,10 @@
mtx_lock(&sc->sc_bus.mtx);
- for(i = 1; i <= sc->sc_noport; i++)
+ for (i = 1; i <= sc->sc_noport; i++)
{
cmd = EOREAD4(sc, EHCI_PORTSC(i));
- if(((cmd & EHCI_PS_PO) == 0) &&
+ if (((cmd & EHCI_PS_PO) == 0) &&
((cmd & EHCI_PS_PE) == EHCI_PS_PE))
{
EOWRITE4(sc, EHCI_PORTSC(i),
@@ -447,12 +447,12 @@
cmd = sc->sc_cmd & ~(EHCI_CMD_ASE | EHCI_CMD_PSE);
EOWRITE4(sc, EHCI_USBCMD, cmd);
- for(i = 0; i < 100; i++)
+ for (i = 0; i < 100; i++)
{
hcr = EOREAD4(sc, EHCI_USBSTS) &
(EHCI_STS_ASS | EHCI_STS_PSS);
- if(hcr == 0)
+ if (hcr == 0)
{
break;
}
@@ -460,7 +460,7 @@
DELAY(1000*1);
}
- if(hcr != 0)
+ if (hcr != 0)
{
device_printf(sc->sc_bus.bdev, "reset timeout\n");
}
@@ -506,10 +506,10 @@
EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs);
hcr = 0;
- for(i = 1; i <= sc->sc_noport; i++)
+ for (i = 1; i <= sc->sc_noport; i++)
{
cmd = EOREAD4(sc, EHCI_PORTSC(i));
- if(((cmd & EHCI_PS_PO) == 0) &&
+ if (((cmd & EHCI_PS_PO) == 0) &&
((cmd & EHCI_PS_SUSP) == EHCI_PS_SUSP))
{
EOWRITE4(sc, EHCI_PORTSC(i),
@@ -518,14 +518,14 @@
}
}
- if(hcr)
+ if (hcr)
{
DELAY(1000*USB_RESUME_WAIT);
- for(i = 1; i <= sc->sc_noport; i++)
+ for (i = 1; i <= sc->sc_noport; i++)
{
cmd = EOREAD4(sc, EHCI_PORTSC(i));
- if(((cmd & EHCI_PS_PO) == 0) &&
+ if (((cmd & EHCI_PS_PO) == 0) &&
((cmd & EHCI_PS_SUSP) == EHCI_PS_SUSP))
{
EOWRITE4(sc, EHCI_PORTSC(i),
@@ -536,17 +536,17 @@
EOWRITE4(sc, EHCI_USBCMD, sc->sc_cmd);
- for(i = 0; i < 100; i++)
+ for (i = 0; i < 100; i++)
{
hcr = EOREAD4(sc, EHCI_USBSTS) & EHCI_STS_HCH;
- if(hcr != EHCI_STS_HCH)
+ if (hcr != EHCI_STS_HCH)
{
break;
}
DELAY(1000*1);
}
- if(hcr == EHCI_STS_HCH)
+ if (hcr == EHCI_STS_HCH)
{
device_printf(sc->sc_bus.bdev, "config timeout\n");
}
@@ -583,62 +583,62 @@
i = EOREAD4(sc, EHCI_USBCMD);
printf("cmd=0x%08x\n", i);
- if(i & EHCI_CMD_ITC_1)
+ if (i & EHCI_CMD_ITC_1)
printf(" EHCI_CMD_ITC_1\n");
- if(i & EHCI_CMD_ITC_2)
+ if (i & EHCI_CMD_ITC_2)
printf(" EHCI_CMD_ITC_2\n");
- if(i & EHCI_CMD_ITC_4)
+ if (i & EHCI_CMD_ITC_4)
printf(" EHCI_CMD_ITC_4\n");
- if(i & EHCI_CMD_ITC_8)
+ if (i & EHCI_CMD_ITC_8)
printf(" EHCI_CMD_ITC_8\n");
- if(i & EHCI_CMD_ITC_16)
+ if (i & EHCI_CMD_ITC_16)
printf(" EHCI_CMD_ITC_16\n");
- if(i & EHCI_CMD_ITC_32)
+ if (i & EHCI_CMD_ITC_32)
printf(" EHCI_CMD_ITC_32\n");
- if(i & EHCI_CMD_ITC_64)
+ if (i & EHCI_CMD_ITC_64)
printf(" EHCI_CMD_ITC_64\n");
- if(i & EHCI_CMD_ASPME)
+ if (i & EHCI_CMD_ASPME)
printf(" EHCI_CMD_ASPME\n");
- if(i & EHCI_CMD_ASPMC)
+ if (i & EHCI_CMD_ASPMC)
printf(" EHCI_CMD_ASPMC\n");
- if(i & EHCI_CMD_LHCR)
+ if (i & EHCI_CMD_LHCR)
printf(" EHCI_CMD_LHCR\n");
- if(i & EHCI_CMD_IAAD)
+ if (i & EHCI_CMD_IAAD)
printf(" EHCI_CMD_IAAD\n");
- if(i & EHCI_CMD_ASE)
+ if (i & EHCI_CMD_ASE)
printf(" EHCI_CMD_ASE\n");
- if(i & EHCI_CMD_PSE)
+ if (i & EHCI_CMD_PSE)
printf(" EHCI_CMD_PSE\n");
- if(i & EHCI_CMD_FLS_M)
+ if (i & EHCI_CMD_FLS_M)
printf(" EHCI_CMD_FLS_M\n");
- if(i & EHCI_CMD_HCRESET)
+ if (i & EHCI_CMD_HCRESET)
printf(" EHCI_CMD_HCRESET\n");
- if(i & EHCI_CMD_RS)
+ if (i & EHCI_CMD_RS)
printf(" EHCI_CMD_RS\n");
i = EOREAD4(sc, EHCI_USBSTS);
printf("sts=0x%08x\n", i);
- if(i & EHCI_STS_ASS)
+ if (i & EHCI_STS_ASS)
printf(" EHCI_STS_ASS\n");
- if(i & EHCI_STS_PSS)
+ if (i & EHCI_STS_PSS)
printf(" EHCI_STS_PSS\n");
- if(i & EHCI_STS_REC)
+ if (i & EHCI_STS_REC)
printf(" EHCI_STS_REC\n");
- if(i & EHCI_STS_HCH)
+ if (i & EHCI_STS_HCH)
printf(" EHCI_STS_HCH\n");
- if(i & EHCI_STS_IAA)
+ if (i & EHCI_STS_IAA)
printf(" EHCI_STS_IAA\n");
- if(i & EHCI_STS_HSE)
+ if (i & EHCI_STS_HSE)
printf(" EHCI_STS_HSE\n");
- if(i & EHCI_STS_FLR)
+ if (i & EHCI_STS_FLR)
printf(" EHCI_STS_FLR\n");
- if(i & EHCI_STS_PCD)
+ if (i & EHCI_STS_PCD)
printf(" EHCI_STS_PCD\n");
- if(i & EHCI_STS_ERRINT)
+ if (i & EHCI_STS_ERRINT)
printf(" EHCI_STS_ERRINT\n");
- if(i & EHCI_STS_INT)
+ if (i & EHCI_STS_INT)
printf(" EHCI_STS_INT\n");
printf("ien=0x%08x\n",
@@ -648,7 +648,7 @@
EOREAD4(sc, EHCI_CTRLDSSEGMENT),
EOREAD4(sc, EHCI_PERIODICLISTBASE),
EOREAD4(sc, EHCI_ASYNCLISTADDR));
- for(i = 1; i <= sc->sc_noport; i++)
+ for (i = 1; i <= sc->sc_noport; i++)
{
printf("port %d status=0x%08x\n", i,
EOREAD4(sc, EHCI_PORTSC(i)));
@@ -701,12 +701,12 @@
(s & EHCI_QTD_SPLITXSTATE) ? "-SPLIT" : "",
(s & EHCI_QTD_PINGSTATE) ? "-PING" : "");
- for(s = 0; s < 5; s++)
+ for (s = 0; s < 5; s++)
{
printf(" buffer[%d]=0x%08x\n", s,
le32toh(qtd->qtd_buffer[s]));
}
- for(s = 0; s < 5; s++)
+ for (s = 0; s < 5; s++)
{
printf(" buffer_hi[%d]=0x%08x\n", s,
le32toh(qtd->qtd_buffer_hi[s]));
@@ -733,11 +733,11 @@
uint8_t stop;
stop = 0;
- for(i = 0; sqtd && (i < 20) && !stop; sqtd = sqtd->obj_next, i++)
+ for (i = 0; sqtd && (i < 20) && !stop; sqtd = sqtd->obj_next, i++)
{
stop = ehci_dump_sqtd(sqtd);
}
- if(sqtd)
+ if (sqtd)
{
printf("dump aborted, too many TDs\n");
}
@@ -868,13 +868,13 @@
itd = sc->sc_isoc_hs_p_last[pos];
sitd = sc->sc_isoc_fs_p_last[pos];
- while(itd && max && max--)
+ while (itd && max && max--)
{
ehci_dump_itd(itd);
itd = itd->prev;
}
- while(sitd && max && max--)
+ while (sitd && max && max--)
{
ehci_dump_sitd(sitd);
sitd = sitd->prev;
@@ -909,7 +909,7 @@
usbd_page_dma_enter(last->page);
- return(std);
+ return (std);
}
#define EHCI_APPEND_HS_TD(std,last) (last) = _ehci_append_hs_td(std,last)
@@ -938,7 +938,7 @@
usbd_page_dma_enter(last->page);
- return(std);
+ return (std);
}
#define EHCI_APPEND_QH(sqh,last) (last) = _ehci_append_qh(sqh,last)
@@ -969,13 +969,13 @@
usbd_page_dma_enter(last->page);
#ifdef USB_DEBUG
- if(ehcidebug > 5)
+ if (ehcidebug > 5)
{
printf("%s:\n", __FUNCTION__);
ehci_dump_sqh(sqh);
}
#endif
- return(sqh);
+ return (sqh);
}
#define EHCI_REMOVE_FS_TD(std,last) (last) = _ehci_remove_fs_td(std,last)
@@ -993,13 +993,13 @@
usbd_page_dma_enter(std->prev->page);
- if(std->next)
+ if (std->next)
{
usbd_page_dma_exit(std->next->page);
std->next->prev = std->prev;
usbd_page_dma_enter(std->next->page);
}
- return((last == std) ? std->prev : last);
+ return ((last == std) ? std->prev : last);
}
#define EHCI_REMOVE_HS_TD(std,last) (last) = _ehci_remove_hs_td(std,last)
@@ -1017,13 +1017,13 @@
usbd_page_dma_enter(std->prev->page);
- if(std->next)
+ if (std->next)
{
usbd_page_dma_exit(std->next->page);
std->next->prev = std->prev;
usbd_page_dma_enter(std->next->page);
}
- return((last == std) ? std->prev : last);
+ return ((last == std) ? std->prev : last);
}
#define EHCI_REMOVE_QH(sqh,last) (last) = _ehci_remove_qh(sqh,last)
@@ -1035,7 +1035,7 @@
/* (sc->sc_bus.mtx) must be locked */
/* only remove if not removed from a queue */
- if(sqh->prev)
+ if (sqh->prev)
{
usbd_page_dma_exit(sqh->prev->page);
@@ -1044,7 +1044,7 @@
usbd_page_dma_enter(sqh->prev->page);
- if(sqh->next)
+ if (sqh->next)
{
usbd_page_dma_exit(sqh->next->page);
sqh->next->prev = sqh->prev;
@@ -1066,7 +1066,7 @@
sqh->prev = 0;
}
- return(last);
+ return (last);
}
static usbd_status
@@ -1243,7 +1243,7 @@
uint32_t status;
- if(xfer->usb_thread != ctd)
+ if (xfer->usb_thread != ctd)
{
/* cannot call this transfer
* back due to locking !
@@ -1253,7 +1253,7 @@
DPRINTFN(12, ("xfer=%p checking transfer\n", xfer));
- if(methods == &ehci_device_isoc_fs_methods)
+ if (methods == &ehci_device_isoc_fs_methods)
{
ehci_sitd_t *td = xfer->td_transfer_last;
@@ -1270,7 +1270,7 @@
goto transferred;
}
}
- else if(methods == &ehci_device_isoc_hs_methods)
+ else if (methods == &ehci_device_isoc_hs_methods)
{
ehci_itd_t *td = xfer->td_transfer_last;
@@ -1406,12 +1406,12 @@
* we need to squelch the unwanted interrupts until we're
* ready for them.
*/
- if(sc->sc_bus.bdev == NULL)
+ if (sc->sc_bus.bdev == NULL)
{
goto done;
}
- if(ctd)
+ if (ctd)
{
/* the poll thread should not read
* any status registers that will
@@ -1426,7 +1426,7 @@
device_get_nameunit(sc->sc_bus.bdev)));
#ifdef USB_DEBUG
- if(ehcidebug > 15)
+ if (ehcidebug > 15)
{
DPRINTF(("%s\n", device_get_nameunit(sc->sc_bus.bdev)));
ehci_dump_regs(sc);
@@ -1434,13 +1434,13 @@
#endif
status = EHCI_STS_INTRS(EOREAD4(sc, EHCI_USBSTS));
- if(status == 0)
+ if (status == 0)
{
/* the interrupt was not for us */
goto done;
}
- if(!(status & sc->sc_eintrs))
+ if (!(status & sc->sc_eintrs))
{
goto done;
}
@@ -1449,13 +1449,13 @@
status &= sc->sc_eintrs;
- if(status & EHCI_STS_IAA)
+ if (status & EHCI_STS_IAA)
{
DPRINTF(("door bell\n"));
wakeup(&sc->sc_async_p_last);
}
- if(status & EHCI_STS_HSE)
+ if (status & EHCI_STS_HSE)
{
device_printf(sc->sc_bus.bdev, "unrecoverable error, "
"controller halted\n");
@@ -1465,7 +1465,7 @@
#endif
}
- if(status & EHCI_STS_PCD)
+ if (status & EHCI_STS_PCD)
{
/*
* Disable PCD interrupt for now, because it will be
@@ -1486,7 +1486,7 @@
status &= ~(EHCI_STS_INT | EHCI_STS_ERRINT | EHCI_STS_PCD | EHCI_STS_IAA);
- if(status != 0)
+ if (status != 0)
{
/* block unprocessed interrupts */
sc->sc_eintrs &= ~status;
@@ -1501,7 +1501,7 @@
/* check if transfer is
* transferred
*/
- if(ehci_check_transfer(xfer, ctd))
+ if (ehci_check_transfer(xfer, ctd))
{
/* queue callback */
@@ -1527,7 +1527,7 @@
usbd_do_callback(xlist, td);
- if(need_repeat)
+ if (need_repeat)
{
xptr = xlist;
@@ -1598,7 +1598,7 @@
static void
ehci_remove_interrupt_info(struct usbd_xfer *xfer)
{
- if((xfer)->interrupt_list.le_prev)
+ if ((xfer)->interrupt_list.le_prev)
{
LIST_REMOVE((xfer), interrupt_list);
(xfer)->interrupt_list.le_prev = NULL;
@@ -1942,7 +1942,7 @@
xfer->td_transfer_last = td;
#ifdef USB_DEBUG
- if(ehcidebug > 8)
+ if (ehcidebug > 8)
{
DPRINTF(("nexttog=%d; data before transfer:\n",
xfer->pipe->toggle_next));
@@ -2080,21 +2080,21 @@
DPRINTFN(12, ("xfer=%p pipe=%p transfer done\n",
xfer, xfer->pipe));
- while(nframes--)
+ while (nframes--)
{
- if(td == NULL)
+ if (td == NULL)
{
panic("%s:%d: out of TD's\n",
__FUNCTION__, __LINE__);
}
- if(pp_last >= &sc->sc_isoc_fs_p_last[EHCI_VIRTUAL_FRAMELIST_COUNT])
+ if (pp_last >= &sc->sc_isoc_fs_p_last[EHCI_VIRTUAL_FRAMELIST_COUNT])
{
pp_last = &sc->sc_isoc_fs_p_last[0];
}
#ifdef USB_DEBUG
- if(ehcidebug > 15)
+ if (ehcidebug > 15)
{
DPRINTFN(15,("isoc FS-TD\n"));
ehci_dump_sitd(td);
@@ -2111,7 +2111,7 @@
len = EHCI_SITD_GET_LEN(status);
- if(*plen >= len)
+ if (*plen >= len)
{
len = *plen - len;
}
@@ -2150,21 +2150,21 @@
DPRINTFN(12, ("xfer=%p pipe=%p transfer done\n",
xfer, xfer->pipe));
- while(nframes--)
+ while (nframes--)
{
- if(td == NULL)
+ if (td == NULL)
{
panic("%s:%d: out of TD's\n",
__FUNCTION__, __LINE__);
}
- if(pp_last >= &sc->sc_isoc_hs_p_last[EHCI_VIRTUAL_FRAMELIST_COUNT])
+ if (pp_last >= &sc->sc_isoc_hs_p_last[EHCI_VIRTUAL_FRAMELIST_COUNT])
{
pp_last = &sc->sc_isoc_hs_p_last[0];
}
#ifdef USB_DEBUG
- if(ehcidebug > 15)
+ if (ehcidebug > 15)
{
DPRINTFN(15,("isoc HS-TD\n"));
ehci_dump_itd(td);
@@ -2181,7 +2181,7 @@
len = EHCI_ITD_GET_LEN(status);
- if(*plen >= len)
+ if (*plen >= len)
{
len = *plen - len;
}
@@ -2195,7 +2195,7 @@
plen++;
td_no++;
- if((td_no == 8) || (nframes == 0))
+ if ((td_no == 8) || (nframes == 0))
{
/* remove HS-TD from schedule */
EHCI_REMOVE_HS_TD(td, *pp_last);
@@ -2230,7 +2230,7 @@
/* ... could check for not-completed transfers,
* instead of setting need_delay ...
*/
- if((error == USBD_CANCELLED) ||
+ if ((error == USBD_CANCELLED) ||
(error == USBD_TIMEOUT))
{
if (xfer->flags_int.transferring) {
@@ -2242,7 +2242,7 @@
(methods == &ehci_device_ctrl_methods))
{
#ifdef USB_DEBUG
- if(ehcidebug > 8)
+ if (ehcidebug > 8)
{
DPRINTF(("nexttog=%d; data after transfer:\n",
xfer->pipe->toggle_next));
@@ -2262,12 +2262,12 @@
* Only finish isochronous transfers once
* which will update "xfer->frlengths".
*/
- if(xfer->td_transfer_first &&
+ if (xfer->td_transfer_first &&
xfer->td_transfer_last)
{
if (methods == &ehci_device_isoc_fs_methods)
{
- if(ehci_isoc_fs_done(sc, xfer))
+ if (ehci_isoc_fs_done(sc, xfer))
{
need_delay = 1;
}
@@ -2275,7 +2275,7 @@
if (methods == &ehci_device_isoc_hs_methods)
{
- if(ehci_isoc_hs_done(sc, xfer))
+ if (ehci_isoc_hs_done(sc, xfer))
{
need_delay = 1;
}
@@ -2294,7 +2294,7 @@
if ((methods != &ehci_root_ctrl_methods) &&
(methods != &ehci_root_intr_methods)) {
- if(((methods == &ehci_device_ctrl_methods) ||
+ if (((methods == &ehci_device_ctrl_methods) ||
(methods == &ehci_device_bulk_methods)) &&
(sc->sc_doorbell_disable == 0)) {
@@ -2322,9 +2322,9 @@
EOWRITE4(sc, EHCI_USBCMD,
EOREAD4(sc, EHCI_USBCMD) | EHCI_CMD_IAAD);
- while(EOREAD4(sc, EHCI_USBCMD) & EHCI_CMD_IAAD)
+ while (EOREAD4(sc, EHCI_USBCMD) & EHCI_CMD_IAAD)
{
- if(!to--)
+ if (!to--)
{
printf("%s: doorbell timeout "
"(disabling)\n", __FUNCTION__);
@@ -2391,7 +2391,7 @@
/**/
ehci_add_interrupt_info(sc, xfer);
- if(xfer->timeout && (!xfer->flags.use_polling))
+ if (xfer->timeout && (!xfer->flags.use_polling))
{
__callout_reset(&xfer->timeout_handle, USBD_MS_TO_TICKS(xfer->timeout),
(void *)(void *)ehci_timeout, xfer);
@@ -2442,7 +2442,7 @@
/**/
ehci_add_interrupt_info(sc, xfer);
- if(xfer->timeout && (!xfer->flags.use_polling))
+ if (xfer->timeout && (!xfer->flags.use_polling))
{
__callout_reset(&xfer->timeout_handle, USBD_MS_TO_TICKS(xfer->timeout),
(void *)(void *)ehci_timeout, xfer);
@@ -2491,15 +2491,15 @@
best = 0;
bit = EHCI_VIRTUAL_FRAMELIST_COUNT/2;
- while(bit)
+ while (bit)
{
- if(xfer->interval >= bit)
+ if (xfer->interval >= bit)
{
x = bit;
best = bit;
- while(x & bit)
+ while (x & bit)
{
- if(sc->sc_intr_stat[x] <
+ if (sc->sc_intr_stat[x] <
sc->sc_intr_stat[best])
{
best = x;
@@ -2553,7 +2553,7 @@
/**/
ehci_add_interrupt_info(sc, xfer);
- if(xfer->timeout && (!xfer->flags.use_polling))
+ if (xfer->timeout && (!xfer->flags.use_polling))
{
__callout_reset(&xfer->timeout_handle, USBD_MS_TO_TICKS(xfer->timeout),
(void *)(void *)ehci_timeout, xfer);
@@ -2584,7 +2584,7 @@
EHCI_SITD_SET_HUBA(xfer->udev->hs_hub_addr)|
EHCI_SITD_SET_PORT(xfer->udev->hs_port_no);
- if(UE_GET_DIR(xfer->endpoint) == UE_DIR_IN)
+ if (UE_GET_DIR(xfer->endpoint) == UE_DIR_IN)
{
sitd_portaddr |= EHCI_SITD_SET_DIR_IN;
}
@@ -2593,7 +2593,7 @@
/* initialize all TD's */
- for(td = xfer->td_start; td; td = td->obj_next)
+ for (td = xfer->td_start; td; td = td->obj_next)
{
usbd_page_dma_exit(td->page);
@@ -2703,15 +2703,15 @@
fss = fss_start + (xfer->qh_pos % USB_ISOC_TIME_MAX);
- while(nframes--)
+ while (nframes--)
{
- if(td == NULL)
+ if (td == NULL)
{
panic("%s:%d: out of TD's\n",
__FUNCTION__, __LINE__);
}
- if(pp_last >= &sc->sc_isoc_fs_p_last[EHCI_VIRTUAL_FRAMELIST_COUNT])
+ if (pp_last >= &sc->sc_isoc_fs_p_last[EHCI_VIRTUAL_FRAMELIST_COUNT])
{
pp_last = &sc->sc_isoc_fs_p_last[0];
}
@@ -2722,10 +2722,10 @@
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list