} else if (s->active_rx == s->cookie_rx[1]) {
active = 1;
} else {
- dev_err(port->dev, "cookie %d not found!\n", s->active_rx);
+ dev_err(port->dev, "%s: Rx cookie %d not found!\n", __func__,
+ s->active_rx);
return 0;
}
unsigned long flags;
int count;
- dev_dbg(port->dev, "%s(%d) active #%d\n",
- __func__, port->line, s->active_rx);
+ dev_dbg(port->dev, "%s(%d) active cookie %d\n", __func__, port->line,
+ s->active_rx);
spin_lock_irqsave(&port->lock, flags);
s->cookie_rx[i] = -EINVAL;
}
dev_warn(s->port.dev,
- "failed to re-start DMA, using PIO\n");
+ "Failed to re-start Rx DMA, using PIO\n");
sci_rx_dma_release(s, true);
return;
}
- dev_dbg(s->port.dev, "%s(): cookie %d to #%d\n",
- __func__, s->cookie_rx[i], i);
+ dev_dbg(s->port.dev, "%s(): cookie %d to #%d\n", __func__,
+ s->cookie_rx[i], i);
}
s->active_rx = s->cookie_rx[0];
} else if (s->active_rx == s->cookie_rx[1]) {
new = 1;
} else {
- dev_err(port->dev, "cookie %d not found!\n", s->active_rx);
+ dev_err(port->dev, "%s: Rx cookie %d not found!\n", __func__,
+ s->active_rx);
return;
}
desc = s->desc_rx[new];
s->active_rx = s->cookie_rx[!new];
- dev_dbg(port->dev, "%s: cookie %d #%d, new active #%d\n",
+ dev_dbg(port->dev, "%s: cookie %d #%d, new active cookie %d\n",
__func__, s->cookie_rx[new], new, s->active_rx);
}
sg, s->sg_len_tx, DMA_MEM_TO_DEV,
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
if (!desc) {
+ dev_warn(port->dev, "Failed preparing Tx DMA descriptor\n");
/* switch to PIO */
sci_tx_dma_release(s, true);
return;
UART_XMIT_SIZE,
(uintptr_t)port->state->xmit.buf & ~PAGE_MASK);
nent = dma_map_sg(port->dev, &s->sg_tx, 1, DMA_TO_DEVICE);
- if (!nent)
+ if (!nent) {
+ dev_warn(port->dev, "Failed mapping Tx DMA descriptor\n");
sci_tx_dma_release(s, false);
- else
+ } else {
dev_dbg(port->dev, "%s: mapped %d@%p to %pad\n",
__func__,
sg_dma_len(&s->sg_tx), port->state->xmit.buf,
&sg_dma_address(&s->sg_tx));
+ }
s->sg_len_tx = nent;
if (!buf[0]) {
dev_warn(port->dev,
- "failed to allocate dma buffer, using PIO\n");
+ "Failed to allocate Rx dma buffer, using PIO\n");
sci_rx_dma_release(s, true);
return;
}