Commit 68ca3c92 authored by Biju Das's avatar Biju Das Committed by David S. Miller

ravb: Add aligned_tx to struct ravb_hw_info

R-Car Gen2 needs a 4byte aligned address for the transmission buffer,
whereas R-Car Gen3 doesn't have any such restriction.

Add aligned_tx to struct ravb_hw_info to select the driver to choose
between aligned and unaligned tx buffers.
Signed-off-by: default avatarBiju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: default avatarLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ebb09146
......@@ -990,6 +990,7 @@ enum ravb_chip_id {
struct ravb_hw_info {
enum ravb_chip_id chip_id;
unsigned aligned_tx: 1;
};
struct ravb_private {
......
......@@ -1930,6 +1930,7 @@ static const struct ravb_hw_info ravb_gen3_hw_info = {
static const struct ravb_hw_info ravb_gen2_hw_info = {
.chip_id = RCAR_GEN2,
.aligned_tx = 1,
};
static const struct of_device_id ravb_match_table[] = {
......@@ -2140,7 +2141,7 @@ static int ravb_probe(struct platform_device *pdev)
ndev->max_mtu = 2048 - (ETH_HLEN + VLAN_HLEN + ETH_FCS_LEN);
ndev->min_mtu = ETH_MIN_MTU;
priv->num_tx_desc = info->chip_id == RCAR_GEN2 ?
priv->num_tx_desc = info->aligned_tx ?
NUM_TX_DESC_GEN2 : NUM_TX_DESC_GEN3;
/* Set function */
......
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