]> bbs.cooldavid.org Git - jme.git/blobdiff - jme.h
jme: Extract main and sub chip revision
[jme.git] / jme.h
diff --git a/jme.h b/jme.h
index 727a3bfb28e8f130bca314f4609a0191d84ae53c..32b2a9ddbcd6696b881a9397d3b36c0a3f928757 100644 (file)
--- a/jme.h
+++ b/jme.h
@@ -3,6 +3,7 @@
  *
  * Copyright 2008 JMicron Technology Corporation
  * http://www.jmicron.com/
+ * Copyright (c) 2009 - 2010 Guo-Fu Tseng <cooldavid@cooldavid.org>
  *
  * Author: Guo-Fu Tseng <cooldavid@cooldavid.org>
  *
@@ -25,7 +26,7 @@
 #define __JME_H_INCLUDED__
 
 #define DRV_NAME       "jme"
-#define DRV_VERSION    "1.0.6"
+#define DRV_VERSION    "1.0.7"
 #define PFX            DRV_NAME ": "
 
 #define PCI_DEVICE_ID_JMICRON_JMC250   0x0250
@@ -41,9 +42,6 @@
        NETIF_MSG_TX_ERR | \
        NETIF_MSG_HW)
 
-#define jeprintk(pdev, fmt, args...) \
-       printk(KERN_ERR PFX fmt, ## args)
-
 #ifdef TX_DEBUG
 #define tx_dbg(priv, fmt, args...)                                     \
        printk(KERN_DEBUG "%s: " fmt, (priv)->dev->name, ##args)
@@ -393,7 +391,6 @@ struct jme_adapter {
        spinlock_t              phy_lock;
        spinlock_t              macaddr_lock;
        spinlock_t              rxmcs_lock;
-       spinlock_t              vlgrp_lock;
        struct tasklet_struct   rxempty_task;
        struct tasklet_struct   rxclean_task;
        struct tasklet_struct   txclean_task;
@@ -414,8 +411,10 @@ struct jme_adapter {
        u32                     rx_ring_mask;
        u8                      mrrs;
        unsigned int            fpgaver;
-       unsigned int            chiprev;
-       u8                      rev;
+       u8                      chiprev;
+       u8                      chip_main_rev;
+       u8                      chip_sub_rev;
+       u8                      pcirev;
        u32                     msg_enable;
        struct ethtool_cmd      old_ecmd;
        unsigned int            old_mtu;
@@ -1187,7 +1186,7 @@ enum jme_phy_reg17_vals {
 /*
  * Workaround
  */
-static inline int is_buggy250(unsigned short device, unsigned int chiprev)
+static inline int is_buggy250(unsigned short device, u8 chiprev)
 {
        return device == PCI_DEVICE_ID_JMICRON_JMC250 && chiprev == 0x11;
 }