sh_eth: fix TSU resource handling
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Wed, 3 Jan 2018 17:09:49 +0000 (20:09 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Jan 2018 19:17:34 +0000 (14:17 -0500)
commitdfe8266b8dd10e12a731c985b725fcf7f0e537f0
treec8afb7deacfa605fec1e1e2f46f24041eb124183
parent879626e3a52630316d817cbda7cec9a5446d1d82
sh_eth: fix TSU resource handling

When switching  the driver to the managed device API,  I managed to break
the  case of a  dual Ether devices sharing a single TSU: the 2nd Ether port
wouldn't probe. Iwamatsu-san has tried to fix this but his patch was buggy
and he then dropped the ball...

The solution is to  limit calling devm_request_mem_region() to the first
of  the two  ports  sharing the same TSU, so devm_ioremap_resource() can't
be used anymore for the TSU resource...

Fixes: d5e07e69218f ("sh_eth: use managed device API")
Reported-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/sh_eth.c