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: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
struct ravb_hw_info {
enum ravb_chip_id chip_id;
+ unsigned aligned_tx: 1;
};
struct ravb_private {
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[] = {
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 */