diff --git a/sys/arch/mips/adm5120/dev/ahci.c b/sys/arch/mips/adm5120/dev/ahci.c index 93043ef9cee5..d1054d7c0290 100644 --- a/sys/arch/mips/adm5120/dev/ahci.c +++ b/sys/arch/mips/adm5120/dev/ahci.c @@ -1,4 +1,4 @@ -/* $NetBSD: ahci.c,v 1.22 2020/04/05 20:59:38 skrll Exp $ */ +/* $NetBSD: ahci.c,v 1.23 2021/01/05 16:30:37 skrll Exp $ */ /*- * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko. @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ahci.c,v 1.22 2020/04/05 20:59:38 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ahci.c,v 1.23 2021/01/05 16:30:37 skrll Exp $"); #include #include @@ -889,7 +889,7 @@ ahci_device_ctrl_start(struct usbd_xfer *xfer) ep->control = pipe->up_dev->ud_addr | \ ((pipe->up_dev->ud_speed==USB_SPEED_FULL)?ADMHCD_ED_SPEED:0) | \ ((UGETW(pipe->up_endpoint->ue_edesc->wMaxPacketSize))<control); printf("speed: %x\n",pipe->up_dev->ud_speed); @@ -1236,16 +1236,17 @@ ahci_device_bulk_start(struct usbd_xfer *xfer) i = 0; offset = 0; - while ((len>0) || (i==0)) { + while (len > 0) || i == 0) { tlen = uimin(len,4096); - td[i]->buffer = DMAADDR(&xfer->ux_dmabuf,offset) | 0xa0000000; - td[i]->buflen=tlen; - td[i]->control=(isread?ADMHCD_TD_IN:ADMHCD_TD_OUT) | toggle | ADMHCD_TD_OWN | short_ok; - td[i]->len=tlen; + td[i]->buffer = DMAADDR(&xfer->ux_dmabuf, offset) | 0xa0000000; + td[i]->buflen = tlen; + td[i]->control = (isread ? ADMHCD_TD_IN : ADMHCD_TD_OUT) | + toggle | ADMHCD_TD_OWN | short_ok; + td[i]->len = tlen; toggle = ADMHCD_TD_TOGGLE; len -= tlen; offset += tlen; - td[i]->next = td[i+1]; + td[i]->next = td[i + 1]; i++; };