ioat(4): Log channel number in CTR events

This commit is contained in:
Conrad Meyer 2016-08-05 02:56:31 +00:00
parent 7f8af000a9
commit 520f6023de
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=303761

View File

@ -663,7 +663,7 @@ ioat_process_events(struct ioat_softc *ioat)
boolean_t pending;
int error;
CTR0(KTR_IOAT, __func__);
CTR2(KTR_IOAT, "%s channel=%u", __func__, ioat->chan_idx);
mtx_lock(&ioat->cleanup_lock);
@ -693,8 +693,9 @@ ioat_process_events(struct ioat_softc *ioat)
while (1) {
desc = ioat_get_ring_entry(ioat, ioat->tail);
dmadesc = &desc->bus_dmadesc;
CTR3(KTR_IOAT, "completing desc %u ok cb %p(%p)", ioat->tail,
dmadesc->callback_fn, dmadesc->callback_arg);
CTR4(KTR_IOAT, "channel=%u completing desc %u ok cb %p(%p)",
ioat->chan_idx, ioat->tail, dmadesc->callback_fn,
dmadesc->callback_arg);
if (dmadesc->callback_fn != NULL)
dmadesc->callback_fn(dmadesc->callback_arg, 0);
@ -764,8 +765,9 @@ ioat_process_events(struct ioat_softc *ioat)
while (ioat_get_active(ioat) > 0) {
desc = ioat_get_ring_entry(ioat, ioat->tail);
dmadesc = &desc->bus_dmadesc;
CTR3(KTR_IOAT, "completing desc %u err cb %p(%p)", ioat->tail,
dmadesc->callback_fn, dmadesc->callback_arg);
CTR4(KTR_IOAT, "channel=%u completing desc %u err cb %p(%p)",
ioat->chan_idx, ioat->tail, dmadesc->callback_fn,
dmadesc->callback_arg);
if (dmadesc->callback_fn != NULL)
dmadesc->callback_fn(dmadesc->callback_arg,
@ -919,7 +921,7 @@ ioat_acquire(bus_dmaengine_t dmaengine)
ioat = to_ioat_softc(dmaengine);
mtx_lock(&ioat->submit_lock);
CTR0(KTR_IOAT, __func__);
CTR2(KTR_IOAT, "%s channel=%u", __func__, ioat->chan_idx);
}
int
@ -943,7 +945,7 @@ ioat_release(bus_dmaengine_t dmaengine)
struct ioat_softc *ioat;
ioat = to_ioat_softc(dmaengine);
CTR0(KTR_IOAT, __func__);
CTR2(KTR_IOAT, "%s channel=%u", __func__, ioat->chan_idx);
ioat_write_2(ioat, IOAT_DMACOUNT_OFFSET, (uint16_t)ioat->hw_head);
mtx_unlock(&ioat->submit_lock);
}
@ -1005,8 +1007,8 @@ ioat_null(bus_dmaengine_t dmaengine, bus_dmaengine_callback_t callback_fn,
struct ioat_descriptor *desc;
struct ioat_softc *ioat;
CTR0(KTR_IOAT, __func__);
ioat = to_ioat_softc(dmaengine);
CTR2(KTR_IOAT, "%s channel=%u", __func__, ioat->chan_idx);
desc = ioat_op_generic(ioat, IOAT_OP_COPY, 8, 0, 0, callback_fn,
callback_arg, flags);
@ -1028,8 +1030,8 @@ ioat_copy(bus_dmaengine_t dmaengine, bus_addr_t dst,
struct ioat_descriptor *desc;
struct ioat_softc *ioat;
CTR0(KTR_IOAT, __func__);
ioat = to_ioat_softc(dmaengine);
CTR2(KTR_IOAT, "%s channel=%u", __func__, ioat->chan_idx);
if (((src | dst) & (0xffffull << 48)) != 0) {
ioat_log_message(0, "%s: High 16 bits of src/dst invalid\n",
@ -1059,8 +1061,8 @@ ioat_copy_8k_aligned(bus_dmaengine_t dmaengine, bus_addr_t dst1,
struct ioat_descriptor *desc;
struct ioat_softc *ioat;
CTR0(KTR_IOAT, __func__);
ioat = to_ioat_softc(dmaengine);
CTR2(KTR_IOAT, "%s channel=%u", __func__, ioat->chan_idx);
if (((src1 | src2 | dst1 | dst2) & (0xffffull << 48)) != 0) {
ioat_log_message(0, "%s: High 16 bits of src/dst invalid\n",
@ -1106,8 +1108,8 @@ ioat_copy_crc(bus_dmaengine_t dmaengine, bus_addr_t dst, bus_addr_t src,
uint32_t teststore;
uint8_t op;
CTR0(KTR_IOAT, __func__);
ioat = to_ioat_softc(dmaengine);
CTR2(KTR_IOAT, "%s channel=%u", __func__, ioat->chan_idx);
if ((ioat->capabilities & IOAT_DMACAP_MOVECRC) == 0) {
ioat_log_message(0, "%s: Device lacks MOVECRC capability\n",
@ -1185,8 +1187,8 @@ ioat_crc(bus_dmaengine_t dmaengine, bus_addr_t src, bus_size_t len,
uint32_t teststore;
uint8_t op;
CTR0(KTR_IOAT, __func__);
ioat = to_ioat_softc(dmaengine);
CTR2(KTR_IOAT, "%s channel=%u", __func__, ioat->chan_idx);
if ((ioat->capabilities & IOAT_DMACAP_CRC) == 0) {
ioat_log_message(0, "%s: Device lacks CRC capability\n",
@ -1262,8 +1264,8 @@ ioat_blockfill(bus_dmaengine_t dmaengine, bus_addr_t dst, uint64_t fillpattern,
struct ioat_descriptor *desc;
struct ioat_softc *ioat;
CTR0(KTR_IOAT, __func__);
ioat = to_ioat_softc(dmaengine);
CTR2(KTR_IOAT, "%s channel=%u", __func__, ioat->chan_idx);
if ((ioat->capabilities & IOAT_DMACAP_BFILL) == 0) {
ioat_log_message(0, "%s: Device lacks BFILL capability\n",
@ -1528,7 +1530,7 @@ ring_grow(struct ioat_softc *ioat, uint32_t oldorder,
uint32_t oldsize, newsize, head, tail, i, end;
int error;
CTR0(KTR_IOAT, __func__);
CTR2(KTR_IOAT, "%s channel=%u", __func__, ioat->chan_idx);
mtx_assert(&ioat->submit_lock, MA_OWNED);
@ -1626,7 +1628,7 @@ ring_shrink(struct ioat_softc *ioat, uint32_t oldorder,
uint32_t oldsize, newsize, current_idx, new_idx, i;
int error;
CTR0(KTR_IOAT, __func__);
CTR2(KTR_IOAT, "%s channel=%u", __func__, ioat->chan_idx);
mtx_assert(&ioat->submit_lock, MA_OWNED);
@ -1802,7 +1804,7 @@ ioat_reset_hw(struct ioat_softc *ioat)
unsigned timeout;
int error;
CTR0(KTR_IOAT, __func__);
CTR2(KTR_IOAT, "%s channel=%u", __func__, ioat->chan_idx);
mtx_lock(IOAT_REFLK);
while (ioat->resetting && !ioat->destroying)