linux_dsm_epyc7002/drivers/net/ethernet
Kevin Hao 0a4b5a2488 gianfar: Fix dma check map error when DMA_API_DEBUG is enabled
We need to use dma_mapping_error() to check the dma address returned
by dma_map_single/page(). Otherwise we would get warning like this:
  WARNING: at lib/dma-debug.c:1140
  Modules linked in:
  CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.18.0-rc2-next-20141029 #196
  task: c0834300 ti: effe6000 task.ti: c0874000
  NIP: c02b2c98 LR: c02b2c98 CTR: c030abc4
  REGS: effe7d70 TRAP: 0700   Not tainted  (3.18.0-rc2-next-20141029)
  MSR: 00021000 <CE,ME>  CR: 22044022  XER: 20000000

  GPR00: c02b2c98 effe7e20 c0834300 00000098 00021000 00000000 c030b898 00000003
  GPR08: 00000001 00000000 00000001 749eec9d 22044022 1001abe0 00000020 ef278678
  GPR16: ef278670 ef278668 ef278660 070a8040 c087f99c c08cdc60 00029000 c0840d44
  GPR24: c08be6e8 c0840000 effe7e78 ef041340 00000600 ef114e10 00000000 c08be6e0
  NIP [c02b2c98] check_unmap+0x51c/0x9e4
  LR [c02b2c98] check_unmap+0x51c/0x9e4
  Call Trace:
  [effe7e20] [c02b2c98] check_unmap+0x51c/0x9e4 (unreliable)
  [effe7e70] [c02b31d8] debug_dma_unmap_page+0x78/0x8c
  [effe7ed0] [c03d1640] gfar_clean_rx_ring+0x208/0x488
  [effe7f40] [c03d1a9c] gfar_poll_rx_sq+0x3c/0xa8
  [effe7f60] [c04f8714] net_rx_action+0xc0/0x178
  [effe7f90] [c00435a0] __do_softirq+0x100/0x1fc
  [effe7fe0] [c0043958] irq_exit+0xa4/0xc8
  [effe7ff0] [c000d14c] call_do_irq+0x24/0x3c
  [c0875e90] [c00048a0] do_IRQ+0x8c/0xf8
  [c0875eb0] [c000ed10] ret_from_except+0x0/0x18

For TX, we need to unmap the pages which has already been mapped and
free the skb before return.

For RX, move the dma mapping and error check to gfar_new_skb(). We
would reuse the original skb in the rx ring when either allocating
skb failure or dma mapping error.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Reviewed-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-12-11 14:27:14 -05:00
..
3com
8390
adaptec
adi
aeroflex
agere
allwinner
alteon
altera
amd Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-12-10 15:48:20 -05:00
apm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-11-06 22:01:18 -05:00
apple
arc
atheros
broadcom Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-12-10 15:48:20 -05:00
brocade bna: use netdev_rss_key_fill() helper 2014-11-16 15:59:11 -05:00
cadence net: macb: Remove obsolete comment from Kconfig 2014-12-09 15:39:38 -05:00
calxeda
chelsio cxgb4/csiostor: Don't use MASTER_MUST for fw_hello call 2014-12-11 14:25:17 -05:00
cirrus
cisco enic: add support for set/get rss hash key 2014-12-10 14:41:48 -05:00
davicom
dec uli526x: fix misspelling of current function in string 2014-12-09 16:18:46 -05:00
dlink
emulex ethtool: Support for configurable RSS hash function 2014-12-08 21:07:10 -05:00
faraday
freescale gianfar: Fix dma check map error when DMA_API_DEBUG is enabled 2014-12-11 14:27:14 -05:00
fujitsu
hisilicon
hp hp100: fix misspelling of current function in string 2014-12-09 16:18:47 -05:00
i825xx
ibm IBM-EMAC: Deletion of unnecessary checks before the function call "of_dev_put" 2014-11-21 15:14:12 -05:00
icplus
intel ethernet/intel: Use napi_alloc_skb 2014-12-10 13:31:57 -05:00
marvell Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-12-10 15:48:20 -05:00
mellanox net/mlx4_en: Support for configurable RSS hash function 2014-12-08 21:07:10 -05:00
micrel
microchip
moxa
myricom myri10ge: use eth_skb_pad helper 2014-12-08 20:47:42 -05:00
natsemi
neterion
nuvoton
nvidia
nxp
octeon
oki-semi
packetengines
pasemi net-PA Semi: Deletion of unnecessary checks before the function call "pci_dev_put" 2014-12-05 21:14:20 -08:00
qlogic net: rename netdev_phys_port_id to more generic name 2014-12-02 20:01:19 -08:00
qualcomm net: qualcomm: Fix dependency 2014-11-11 18:12:32 -05:00
rdc
realtek ethernet/realtek: use napi_alloc_skb instead of netdev_alloc_skb_ip_align 2014-12-10 13:31:57 -05:00
renesas Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-12-10 15:48:20 -05:00
rocker rocker: remove swdev mode 2014-12-09 18:24:47 -05:00
samsung
seeq
sfc ethtool: Support for configurable RSS hash function 2014-12-08 21:07:10 -05:00
sgi
silan
sis
smsc net/smsc911x: Add minimal runtime PM support 2014-11-24 16:41:50 -05:00
stmicro Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-12-10 15:48:20 -05:00
sun sunvnet: fix incorrect rcu_read_unlock() in vnet_start_xmit() 2014-12-08 21:55:01 -05:00
tehuti
ti drivers: net : cpsw: Update Kconfig for CPSW 2014-12-09 13:44:16 -05:00
tile
toshiba
tundra
via
wiznet
xilinx net: Xilinx: Deletion of unnecessary checks before two function calls 2014-11-21 15:14:12 -05:00
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c
jme.h
Kconfig rocker: introduce rocker switch driver 2014-12-02 20:01:24 -08:00
korina.c
lantiq_etop.c
Makefile rocker: introduce rocker switch driver 2014-12-02 20:01:24 -08:00
netx-eth.c
s6gmac.c