]> git.baikalelectronics.ru Git - kernel.git/commit
8139cp: Fix DMA unmapping of transmitted buffers
authorDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 23 Sep 2015 08:45:16 +0000 (09:45 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Sep 2015 21:47:13 +0000 (14:47 -0700)
commit52b9541f7a5399de56dbd3debaebbb12c6609652
tree69c39a67bb822da7028d1d647bc1ff700a82e2f2
parent65cf3764f809bf211689135b178555153a4cd2f4
8139cp: Fix DMA unmapping of transmitted buffers

The low 16 bits of the 'opts1' field in the TX descriptor are supposed
to still contain the buffer length when the descriptor is handed back to
us. In practice, at least on my hardware, they don't. So stash the
original value of the opts1 field and get the length to unmap from
there.

There are other ways we could have worked out the length, but I actually
want a stash of the opts1 field anyway so that I can dump it alongside
the contents of the descriptor ring when we suffer a TX timeout.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/8139cp.c