Commit 12028820 authored by David S. Miller's avatar David S. Miller

Merge branch 'gianfar-next'

Claudiu Manoil says:

====================
gianfar: ARM port driver updates (2/2)

The 2nd round of driver updates to make gianfar portable on ARM,
for the ARM based SoC that integrates eTSEC - "ls1021a".
The patches address the bulk of remaining endianess issues -
handling DMA fields (BD and FCB), and device tree properties.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 5a2f78dd 55917641
This diff is collapsed.
......@@ -544,12 +544,12 @@ struct txbd8
{
union {
struct {
u16 status; /* Status Fields */
u16 length; /* Buffer length */
__be16 status; /* Status Fields */
__be16 length; /* Buffer length */
};
u32 lstatus;
__be32 lstatus;
};
u32 bufPtr; /* Buffer Pointer */
__be32 bufPtr; /* Buffer Pointer */
};
struct txfcb {
......@@ -557,28 +557,28 @@ struct txfcb {
u8 ptp; /* Flag to enable tx timestamping */
u8 l4os; /* Level 4 Header Offset */
u8 l3os; /* Level 3 Header Offset */
u16 phcs; /* Pseudo-header Checksum */
u16 vlctl; /* VLAN control word */
__be16 phcs; /* Pseudo-header Checksum */
__be16 vlctl; /* VLAN control word */
};
struct rxbd8
{
union {
struct {
u16 status; /* Status Fields */
u16 length; /* Buffer Length */
__be16 status; /* Status Fields */
__be16 length; /* Buffer Length */
};
u32 lstatus;
__be32 lstatus;
};
u32 bufPtr; /* Buffer Pointer */
__be32 bufPtr; /* Buffer Pointer */
};
struct rxfcb {
u16 flags;
__be16 flags;
u8 rq; /* Receive Queue index */
u8 pro; /* Layer 4 Protocol */
u16 reserved;
u16 vlctl; /* VLAN control word */
__be16 vlctl; /* VLAN control word */
};
struct gianfar_skb_cb {
......@@ -1287,6 +1287,14 @@ static inline void gfar_wmb(void)
#endif
}
static inline void gfar_clear_txbd_status(struct txbd8 *bdp)
{
u32 lstatus = be32_to_cpu(bdp->lstatus);
lstatus &= BD_LFLAG(TXBD_WRAP);
bdp->lstatus = cpu_to_be32(lstatus);
}
irqreturn_t gfar_receive(int irq, void *dev_id);
int startup_gfar(struct net_device *dev);
void stop_gfar(struct net_device *dev);
......
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