aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/renesas
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-06-19 19:49:39 -0400
committerDavid S. Miller <davem@davemloft.net>2013-06-19 19:49:39 -0400
commitd98cae64e4a733ff377184d78aa0b1f2b54faede (patch)
treee973e3c93fe7e17741567ac3947f5197bc9d582d /drivers/net/ethernet/renesas
parent646093a29f85630d8efe2aa38fa585d2c3ea2e46 (diff)
parent4067c666f2dccf56f5db5c182713e68c40d46013 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/wireless/ath/ath9k/Kconfig drivers/net/xen-netback/netback.c net/batman-adv/bat_iv_ogm.c net/wireless/nl80211.c The ath9k Kconfig conflict was a change of a Kconfig option name right next to the deletion of another option. The xen-netback conflict was overlapping changes involving the handling of the notify list in xen_netbk_rx_action(). Batman conflict resolution provided by Antonio Quartulli, basically keep everything in both conflict hunks. The nl80211 conflict is a little more involved. In 'net' we added a dynamic memory allocation to nl80211_dump_wiphy() to fix a race that Linus reported. Meanwhile in 'net-next' the handlers were converted to use pre and post doit handlers which use a flag to determine whether to hold the RTNL mutex around the operation. However, the dump handlers to not use this logic. Instead they have to explicitly do the locking. There were apparent bugs in the conversion of nl80211_dump_wiphy() in that we were not dropping the RTNL mutex in all the return paths, and it seems we very much should be doing so. So I fixed that whilst handling the overlapping changes. To simplify the initial returns, I take the RTNL mutex after we try to allocate 'tb'. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/renesas')
-rw-r--r--drivers/net/ethernet/renesas/sh_eth.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index a2eadc070328..8cb600ccaf1d 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -722,8 +722,8 @@ static int sh_eth_check_reset(struct net_device *ndev)
722 mdelay(1); 722 mdelay(1);
723 cnt--; 723 cnt--;
724 } 724 }
725 if (cnt < 0) { 725 if (cnt <= 0) {
726 pr_err("Device reset fail\n"); 726 pr_err("Device reset failed\n");
727 ret = -ETIMEDOUT; 727 ret = -ETIMEDOUT;
728 } 728 }
729 return ret; 729 return ret;
@@ -1260,16 +1260,23 @@ static int sh_eth_rx(struct net_device *ndev, u32 intr_status)
1260 desc_status = edmac_to_cpu(mdp, rxdesc->status); 1260 desc_status = edmac_to_cpu(mdp, rxdesc->status);
1261 pkt_len = rxdesc->frame_length; 1261 pkt_len = rxdesc->frame_length;
1262 1262
1263#if defined(CONFIG_ARCH_R8A7740)
1264 desc_status >>= 16;
1265#endif
1266
1267 if (--boguscnt < 0) 1263 if (--boguscnt < 0)
1268 break; 1264 break;
1269 1265
1270 if (!(desc_status & RDFEND)) 1266 if (!(desc_status & RDFEND))
1271 ndev->stats.rx_length_errors++; 1267 ndev->stats.rx_length_errors++;
1272 1268
1269#if defined(CONFIG_ARCH_R8A7740)
1270 /*
1271 * In case of almost all GETHER/ETHERs, the Receive Frame State
1272 * (RFS) bits in the Receive Descriptor 0 are from bit 9 to
1273 * bit 0. However, in case of the R8A7740's GETHER, the RFS
1274 * bits are from bit 25 to bit 16. So, the driver needs right
1275 * shifting by 16.
1276 */
1277 desc_status >>= 16;
1278#endif
1279
1273 if (desc_status & (RD_RFS1 | RD_RFS2 | RD_RFS3 | RD_RFS4 | 1280 if (desc_status & (RD_RFS1 | RD_RFS2 | RD_RFS3 | RD_RFS4 |
1274 RD_RFS5 | RD_RFS6 | RD_RFS10)) { 1281 RD_RFS5 | RD_RFS6 | RD_RFS10)) {
1275 ndev->stats.rx_errors++; 1282 ndev->stats.rx_errors++;