36 #ifndef __T4VF_COMMON_H__
37 #define __T4VF_COMMON_H__
39 #include "../cxgb4/t4fw_api.h"
44 #define FW_LEN16(fw_struct) FW_CMD_LEN16(sizeof(fw_struct) / 16)
192 #ifndef PCI_VENDOR_ID_CHELSIO
193 # define PCI_VENDOR_ID_CHELSIO 0x1425
196 #define for_each_port(adapter, iter) \
197 for (iter = 0; iter < (adapter)->params.nports; iter++)
204 static inline unsigned int core_ticks_per_usec(
const struct adapter *
adapter)
206 return adapter->
params.vpd.cclk / 1000;
209 static inline unsigned int us_to_core_ticks(
const struct adapter *
adapter,
212 return (us * adapter->
params.vpd.cclk) / 1000;
215 static inline unsigned int core_ticks_to_us(
const struct adapter *adapter,
218 return (ticks * 1000) / adapter->
params.vpd.cclk;
223 static inline int t4vf_wr_mbox(
struct adapter *adapter,
const void *
cmd,
229 static inline int t4vf_wr_mbox_ns(
struct adapter *adapter,
const void *
cmd,
260 int t4vf_set_rxmode(
struct adapter *,
unsigned int,
int,
int,
int,
int,
int,
268 int t4vf_iq_free(
struct adapter *,
unsigned int,
unsigned int,
unsigned int,