summaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.h
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-09-19 15:36:44 -0700
committerJeff Garzik <jeff@garzik.org>2007-09-20 15:23:00 -0400
commitea76e63598eb312e5d33a782275be91038fc6df2 (patch)
tree6d7ba4add8344afdc1046f248fce352e6d342444 /drivers/net/sky2.h
parentc99210b50fe741026d86fdcb5f3f5a0c00c503cc (diff)
downloadlinux-stable-ea76e63598eb312e5d33a782275be91038fc6df2.tar.gz
linux-stable-ea76e63598eb312e5d33a782275be91038fc6df2.tar.bz2
linux-stable-ea76e63598eb312e5d33a782275be91038fc6df2.zip
sky2: reorganize chip revision features
This patch should cause no functional changes in driver behaviour. There are (too) many revisions of the Yukon 2 chip now. Instead of adding more conditionals based on chip revision; rerganize into a set of feature flags so adding new versions is less problematic. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/sky2.h')
-rw-r--r--drivers/net/sky2.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h
index 3baae48f8042..af303496f9e2 100644
--- a/drivers/net/sky2.h
+++ b/drivers/net/sky2.h
@@ -2040,6 +2040,15 @@ struct sky2_hw {
void __iomem *regs;
struct pci_dev *pdev;
struct net_device *dev[2];
+ unsigned long flags;
+#define SKY2_HW_USE_MSI 0x00000001
+#define SKY2_HW_FIBRE_PHY 0x00000002
+#define SKY2_HW_GIGABIT 0x00000004
+#define SKY2_HW_NEWER_PHY 0x00000008
+#define SKY2_HW_RAMBUFFER 0x00000010 /* chip has RAM FIFO */
+#define SKY2_HW_NEW_LE 0x00000020 /* new LSOv2 format */
+#define SKY2_HW_AUTO_TX_SUM 0x00000040 /* new IP decode for Tx */
+#define SKY2_HW_ADV_POWER_CTL 0x00000080 /* additional PHY power regs */
u8 chip_id;
u8 chip_rev;
@@ -2053,13 +2062,12 @@ struct sky2_hw {
struct timer_list watchdog_timer;
struct work_struct restart_work;
- int msi;
wait_queue_head_t msi_wait;
};
static inline int sky2_is_copper(const struct sky2_hw *hw)
{
- return !(hw->pmd_type == 'L' || hw->pmd_type == 'S' || hw->pmd_type == 'P');
+ return !(hw->flags & SKY2_HW_FIBRE_PHY);
}
/* Register accessor for memory mapped device */