X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fnet%2Fsungem.h;h=f7a02917ce5ec31fb1735c144cb30a48665e7615;hb=ca30bc99527ab968707bafc09e38807de7e70c4a;hp=13006d759ad858f79737d787aa3010f005b733e0;hpb=4e0e329d9a2011f9f7a7c0a378dc3bff7b0a0283;p=linux-2.6-omap-h63xx.git diff --git a/drivers/net/sungem.h b/drivers/net/sungem.h index 13006d759ad..f7a02917ce5 100644 --- a/drivers/net/sungem.h +++ b/drivers/net/sungem.h @@ -813,7 +813,7 @@ /* MII BCM5400 AUXSTATUS register */ #define MII_BCM5400_AUXSTATUS 0x19 #define MII_BCM5400_AUXSTATUS_LINKMODE_MASK 0x0700 -#define MII_BCM5400_AUXSTATUS_LINKMODE_SHIFT 8 +#define MII_BCM5400_AUXSTATUS_LINKMODE_SHIFT 8 /* When it can, GEM internally caches 4 aligned TX descriptors * at a time, so that it can use full cacheline DMA reads. @@ -828,8 +828,8 @@ * DMA mappings for a transmitted packet. */ struct gem_txd { - u64 control_word; - u64 buffer; + __le64 control_word; + __le64 buffer; }; #define TXDCTRL_BUFSZ 0x0000000000007fffULL /* Buffer Size */ @@ -863,8 +863,8 @@ struct gem_txd { * by the host driver just as in the TX descriptor case above. */ struct gem_rxd { - u64 status_word; - u64 buffer; + __le64 status_word; + __le64 buffer; }; #define RXDCTRL_TCPCSUM 0x000000000000ffffULL /* TCP Pseudo-CSUM */ @@ -980,19 +980,20 @@ struct gem { int tx_new, tx_old; unsigned int has_wol : 1; /* chip supports wake-on-lan */ - unsigned int asleep : 1; /* chip asleep, protected by pm_sem */ + unsigned int asleep : 1; /* chip asleep, protected by pm_mutex */ unsigned int asleep_wol : 1; /* was asleep with WOL enabled */ - unsigned int opened : 1; /* driver opened, protected by pm_sem */ + unsigned int opened : 1; /* driver opened, protected by pm_mutex */ unsigned int running : 1; /* chip running, protected by lock */ - + /* cell enable count, protected by lock */ - int cell_enabled; - - struct semaphore pm_sem; + int cell_enabled; + + struct mutex pm_mutex; u32 msg_enable; u32 status; + struct napi_struct napi; struct net_device_stats net_stats; int tx_fifo_sz; @@ -1017,7 +1018,7 @@ struct gem { enum gem_phy_type phy_type; struct mii_phy phy_mii; int mii_phy_addr; - + struct gem_init_block *init_block; struct sk_buff *rx_skbs[RX_RING_SIZE]; struct sk_buff *tx_skbs[TX_RING_SIZE]; @@ -1025,14 +1026,14 @@ struct gem { struct pci_dev *pdev; struct net_device *dev; -#ifdef CONFIG_PPC_PMAC +#if defined(CONFIG_PPC_PMAC) || defined(CONFIG_SPARC) struct device_node *of_node; #endif }; #define found_mii_phy(gp) ((gp->phy_type == phy_mii_mdio0 || gp->phy_type == phy_mii_mdio1) \ && gp->phy_mii.def && gp->phy_mii.def->ops) - + #define ALIGNED_RX_SKB_ADDR(addr) \ ((((unsigned long)(addr) + (64UL - 1UL)) & ~(64UL - 1UL)) - (unsigned long)(addr)) static __inline__ struct sk_buff *gem_alloc_skb(int size,