| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /******************************************************************************* |
|---|
| 2 | 3 | This contains the functions to handle the enhanced descriptors. |
|---|
| 3 | 4 | |
|---|
| 4 | 5 | Copyright (C) 2007-2014 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 | *******************************************************************************/ |
|---|
| .. | .. |
|---|
| 427 | 417 | } |
|---|
| 428 | 418 | } |
|---|
| 429 | 419 | |
|---|
| 430 | | -static void enh_desc_display_ring(void *head, unsigned int size, bool rx) |
|---|
| 420 | +static void enh_desc_display_ring(void *head, unsigned int size, bool rx, |
|---|
| 421 | + dma_addr_t dma_rx_phy, unsigned int desc_size) |
|---|
| 431 | 422 | { |
|---|
| 432 | 423 | struct dma_extended_desc *ep = (struct dma_extended_desc *)head; |
|---|
| 424 | + dma_addr_t dma_addr; |
|---|
| 433 | 425 | int i; |
|---|
| 434 | 426 | |
|---|
| 435 | 427 | pr_info("Extended %s descriptor ring:\n", rx ? "RX" : "TX"); |
|---|
| 436 | 428 | |
|---|
| 437 | 429 | for (i = 0; i < size; i++) { |
|---|
| 438 | 430 | u64 x; |
|---|
| 431 | + dma_addr = dma_rx_phy + i * sizeof(*ep); |
|---|
| 439 | 432 | |
|---|
| 440 | 433 | x = *(u64 *)ep; |
|---|
| 441 | | - pr_info("%03d [0x%x]: 0x%x 0x%x 0x%x 0x%x\n", |
|---|
| 442 | | - i, (unsigned int)virt_to_phys(ep), |
|---|
| 434 | + pr_info("%03d [%pad]: 0x%x 0x%x 0x%x 0x%x\n", |
|---|
| 435 | + i, &dma_addr, |
|---|
| 443 | 436 | (unsigned int)x, (unsigned int)(x >> 32), |
|---|
| 444 | 437 | ep->basic.des2, ep->basic.des3); |
|---|
| 445 | 438 | ep++; |
|---|