| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /******************************************************************************* |
|---|
| 2 | 3 | This contains the functions to handle the normal descriptors. |
|---|
| 3 | 4 | |
|---|
| 4 | 5 | Copyright (C) 2007-2009 STMicroelectronics Ltd |
|---|
| 5 | 6 | |
|---|
| 6 | | - This program is free software; you can redistribute it and/or modify it |
|---|
| 7 | | - under the terms and conditions of the GNU General Public License, |
|---|
| 8 | | - version 2, as published by the Free Software Foundation. |
|---|
| 9 | | - |
|---|
| 10 | | - This program is distributed in the hope it will be useful, but WITHOUT |
|---|
| 11 | | - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 12 | | - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|---|
| 13 | | - more details. |
|---|
| 14 | | - |
|---|
| 15 | | - The full GNU General Public License is included in this distribution in |
|---|
| 16 | | - the file called "COPYING". |
|---|
| 17 | 7 | |
|---|
| 18 | 8 | Author: Giuseppe Cavallaro <peppe.cavallaro@st.com> |
|---|
| 19 | 9 | *******************************************************************************/ |
|---|
| .. | .. |
|---|
| 279 | 269 | return 1; |
|---|
| 280 | 270 | } |
|---|
| 281 | 271 | |
|---|
| 282 | | -static void ndesc_display_ring(void *head, unsigned int size, bool rx) |
|---|
| 272 | +static void ndesc_display_ring(void *head, unsigned int size, bool rx, |
|---|
| 273 | + dma_addr_t dma_rx_phy, unsigned int desc_size) |
|---|
| 283 | 274 | { |
|---|
| 284 | 275 | struct dma_desc *p = (struct dma_desc *)head; |
|---|
| 276 | + dma_addr_t dma_addr; |
|---|
| 285 | 277 | int i; |
|---|
| 286 | 278 | |
|---|
| 287 | 279 | pr_info("%s descriptor ring:\n", rx ? "RX" : "TX"); |
|---|
| 288 | 280 | |
|---|
| 289 | 281 | for (i = 0; i < size; i++) { |
|---|
| 290 | 282 | u64 x; |
|---|
| 283 | + dma_addr = dma_rx_phy + i * sizeof(*p); |
|---|
| 291 | 284 | |
|---|
| 292 | 285 | x = *(u64 *)p; |
|---|
| 293 | | - pr_info("%03d [0x%x]: 0x%x 0x%x 0x%x 0x%x", |
|---|
| 294 | | - i, (unsigned int)virt_to_phys(p), |
|---|
| 286 | + pr_info("%03d [%pad]: 0x%x 0x%x 0x%x 0x%x", |
|---|
| 287 | + i, &dma_addr, |
|---|
| 295 | 288 | (unsigned int)x, (unsigned int)(x >> 32), |
|---|
| 296 | 289 | p->des2, p->des3); |
|---|
| 297 | 290 | p++; |
|---|