]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/sky2.h
Merge master.kernel.org:/home/rmk/linux-2.6-serial
[linux-2.6-omap-h63xx.git] / drivers / net / sky2.h
index 930680f50fca8d51d75a877ba9675cb7a7852062..fd12c289a2387d835b9a310caaa3f30bcf1c7cd4 100644 (file)
@@ -1777,11 +1777,15 @@ struct sky2_status_le {
        u8      opcode;
 } __attribute((packed));
 
+struct tx_ring_info {
+       struct sk_buff  *skb;
+       DECLARE_PCI_UNMAP_ADDR(mapaddr);
+       u16             idx;
+};
+
 struct ring_info {
        struct sk_buff  *skb;
        dma_addr_t      mapaddr;
-       u16             maplen;
-       u16             idx;
 };
 
 struct sky2_port {
@@ -1790,23 +1794,24 @@ struct sky2_port {
        unsigned             port;
        u32                  msg_enable;
 
-       struct ring_info  *tx_ring;
+       spinlock_t           tx_lock  ____cacheline_aligned_in_smp;
+       struct tx_ring_info  *tx_ring;
        struct sky2_tx_le    *tx_le;
-       spinlock_t           tx_lock;
-       u32                  tx_addr64;
        u16                  tx_cons;           /* next le to check */
        u16                  tx_prod;           /* next le to use */
+       u32                  tx_addr64;
        u16                  tx_pending;
        u16                  tx_last_put;
        u16                  tx_last_mss;
 
-       struct ring_info  *rx_ring;
+       struct ring_info     *rx_ring ____cacheline_aligned_in_smp;
        struct sky2_rx_le    *rx_le;
        u32                  rx_addr64;
        u16                  rx_next;           /* next re to check */
        u16                  rx_put;            /* next le index to use */
        u16                  rx_pending;
        u16                  rx_last_put;
+       u16                  rx_bufsize;
 #ifdef SKY2_VLAN_TAG_USED
        u16                  rx_tag;
        struct vlan_group    *vlgrp;
@@ -1823,8 +1828,10 @@ struct sky2_port {
        u8                   rx_csum;
        u8                   wol;
 
-       struct tasklet_struct phy_task;
        struct net_device_stats net_stats;
+
+       struct work_struct   phy_task;
+       struct semaphore     phy_sema;
 };
 
 struct sky2_hw {
@@ -1834,6 +1841,7 @@ struct sky2_hw {
        struct net_device    *dev[2];
 
        int                  pm_cap;
+       int                  msi;
        u8                   chip_id;
        u8                   chip_rev;
        u8                   copper;
@@ -1842,8 +1850,6 @@ struct sky2_hw {
        struct sky2_status_le *st_le;
        u32                  st_idx;
        dma_addr_t           st_dma;
-
-       spinlock_t           phy_lock;
 };
 
 /* Register accessor for memory mapped device */
@@ -1862,14 +1868,6 @@ static inline u8 sky2_read8(const struct sky2_hw *hw, unsigned reg)
        return readb(hw->regs + reg);
 }
 
-/* This should probably go away, bus based tweeks suck */
-static inline int is_pciex(const struct sky2_hw *hw)
-{
-       u32 status;
-       pci_read_config_dword(hw->pdev, PCI_DEV_STATUS, &status);
-       return (status & PCI_OS_PCI_X) == 0;
-}
-
 static inline void sky2_write32(const struct sky2_hw *hw, unsigned reg, u32 val)
 {
        writel(val, hw->regs + reg);