Commit 10b9194f authored by Yoshihiro Shimoda's avatar Yoshihiro Shimoda Committed by David S. Miller

net: sh_eth: fix endian check for architecture independent

SuperH has the "CONFIG_CPU_LITTLE_ENDIAN" and the "__LITTLE_ENDIAN__".
But, other architecture doesn't have them. So, this patch fixes it.
Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6bafd643
...@@ -804,7 +804,7 @@ static int sh_eth_dev_init(struct net_device *ndev) ...@@ -804,7 +804,7 @@ static int sh_eth_dev_init(struct net_device *ndev)
/* all sh_eth int mask */ /* all sh_eth int mask */
sh_eth_write(ndev, 0, EESIPR); sh_eth_write(ndev, 0, EESIPR);
#if defined(__LITTLE_ENDIAN__) #if defined(__LITTLE_ENDIAN)
if (mdp->cd->hw_swap) if (mdp->cd->hw_swap)
sh_eth_write(ndev, EDMR_EL, EDMR); sh_eth_write(ndev, EDMR_EL, EDMR);
else else
......
...@@ -693,7 +693,7 @@ enum TSU_FWSLC_BIT { ...@@ -693,7 +693,7 @@ enum TSU_FWSLC_BIT {
*/ */
struct sh_eth_txdesc { struct sh_eth_txdesc {
u32 status; /* TD0 */ u32 status; /* TD0 */
#if defined(CONFIG_CPU_LITTLE_ENDIAN) #if defined(__LITTLE_ENDIAN)
u16 pad0; /* TD1 */ u16 pad0; /* TD1 */
u16 buffer_length; /* TD1 */ u16 buffer_length; /* TD1 */
#else #else
...@@ -710,7 +710,7 @@ struct sh_eth_txdesc { ...@@ -710,7 +710,7 @@ struct sh_eth_txdesc {
*/ */
struct sh_eth_rxdesc { struct sh_eth_rxdesc {
u32 status; /* RD0 */ u32 status; /* RD0 */
#if defined(CONFIG_CPU_LITTLE_ENDIAN) #if defined(__LITTLE_ENDIAN)
u16 frame_length; /* RD1 */ u16 frame_length; /* RD1 */
u16 buffer_length; /* RD1 */ u16 buffer_length; /* RD1 */
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment