Merge branch 'timers/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[cascardo/linux.git] / drivers / net / cxgb3 / common.h
index d6c7760..8e8ebd7 100644 (file)
@@ -97,6 +97,7 @@ enum {
        MAX_NPORTS = 2,         /* max # of ports */
        MAX_FRAME_SIZE = 10240, /* max MAC frame size, including header + FCS */
        EEPROMSIZE = 8192,      /* Serial EEPROM size */
+       SERNUM_LEN     = 16,    /* Serial # length */
        RSS_TABLE_SIZE = 64,    /* size of RSS lookup and mapping tables */
        TCB_SIZE = 128,         /* TCB size */
        NMTUS = 16,             /* size of MTU table */
@@ -126,8 +127,8 @@ enum {                              /* adapter interrupt-maintained statistics */
 
 enum {
        TP_VERSION_MAJOR        = 1,
-       TP_VERSION_MINOR        = 0,
-       TP_VERSION_MICRO        = 44
+       TP_VERSION_MINOR        = 1,
+       TP_VERSION_MICRO        = 0
 };
 
 #define S_TP_VERSION_MAJOR             16
@@ -167,8 +168,8 @@ enum {
 };
 
 struct sg_ent {                        /* SGE scatter/gather entry */
-       u32 len[2];
-       u64 addr[2];
+       __be32 len[2];
+       __be64 addr[2];
 };
 
 #ifndef SGE_NUM_GENBITS
@@ -391,6 +392,7 @@ struct vpd_params {
        unsigned int uclk;
        unsigned int mdc;
        unsigned int mem_timing;
+       u8 sn[SERNUM_LEN + 1];
        u8 eth_base[6];
        u8 port_type[MAX_NPORTS];
        unsigned short xauicfg[2];
@@ -436,6 +438,7 @@ enum {                                          /* chip revisions */
        T3_REV_A  = 0,
        T3_REV_B  = 2,
        T3_REV_B2 = 3,
+       T3_REV_C  = 4,
 };
 
 struct trace_params {
@@ -511,6 +514,7 @@ struct cmac {
        u64 rx_mcnt;
        unsigned int toggle_cnt;
        unsigned int txen;
+       u64 rx_pause;
        struct mac_stats stats;
 };
 
@@ -677,23 +681,25 @@ int t3_phy_intr_handler(struct adapter *adapter);
 void t3_link_changed(struct adapter *adapter, int port_id);
 int t3_link_start(struct cphy *phy, struct cmac *mac, struct link_config *lc);
 const struct adapter_info *t3_get_adapter_info(unsigned int board_id);
-int t3_seeprom_read(struct adapter *adapter, u32 addr, u32 *data);
-int t3_seeprom_write(struct adapter *adapter, u32 addr, u32 data);
+int t3_seeprom_read(struct adapter *adapter, u32 addr, __le32 *data);
+int t3_seeprom_write(struct adapter *adapter, u32 addr, __le32 data);
 int t3_seeprom_wp(struct adapter *adapter, int enable);
 int t3_get_tp_version(struct adapter *adapter, u32 *vers);
 int t3_check_tpsram_version(struct adapter *adapter, int *must_load);
-int t3_check_tpsram(struct adapter *adapter, u8 *tp_ram, unsigned int size);
-int t3_set_proto_sram(struct adapter *adap, u8 *data);
+int t3_check_tpsram(struct adapter *adapter, const u8 *tp_ram,
+                   unsigned int size);
+int t3_set_proto_sram(struct adapter *adap, const u8 *data);
 int t3_read_flash(struct adapter *adapter, unsigned int addr,
                  unsigned int nwords, u32 *data, int byte_oriented);
 int t3_load_fw(struct adapter *adapter, const u8 * fw_data, unsigned int size);
 int t3_get_fw_version(struct adapter *adapter, u32 *vers);
-int t3_check_fw_version(struct adapter *adapter);
+int t3_check_fw_version(struct adapter *adapter, int *must_load);
 int t3_init_hw(struct adapter *adapter, u32 fw_params);
 void mac_prep(struct cmac *mac, struct adapter *adapter, int index);
 void early_hw_init(struct adapter *adapter, const struct adapter_info *ai);
 int t3_prep_adapter(struct adapter *adapter, const struct adapter_info *ai,
                    int reset);
+int t3_replay_prep_adapter(struct adapter *adapter);
 void t3_led_ready(struct adapter *adapter);
 void t3_fatal_err(struct adapter *adapter);
 void t3_set_vlan_accel(struct adapter *adapter, unsigned int ports, int on);