cxgbe(4): Updates to the shared routines that deal with the serial EEPROM,
flash, and VPD. Obtained from: Chelsio Communications
This commit is contained in:
parent
475b5a6654
commit
54eec7a19d
@ -734,6 +734,8 @@ struct adapter {
|
||||
|
||||
unsigned int pf;
|
||||
unsigned int mbox;
|
||||
unsigned int vpd_busy;
|
||||
unsigned int vpd_flag;
|
||||
|
||||
/* Interrupt information */
|
||||
int intr_type;
|
||||
|
@ -499,20 +499,24 @@ int t4_eeprom_ptov(unsigned int phys_addr, unsigned int fn, unsigned int sz);
|
||||
int t4_seeprom_wp(struct adapter *adapter, int enable);
|
||||
int t4_read_flash(struct adapter *adapter, unsigned int addr, unsigned int nwords,
|
||||
u32 *data, int byte_oriented);
|
||||
int t4_write_flash(struct adapter *adapter, unsigned int addr,
|
||||
unsigned int n, const u8 *data, int byte_oriented);
|
||||
int t4_load_fw(struct adapter *adapter, const u8 *fw_data, unsigned int size);
|
||||
int t4_load_bootcfg(struct adapter *adapter, const u8 *cfg_data, unsigned int size);
|
||||
int t4_load_boot(struct adapter *adap, u8 *boot_data,
|
||||
unsigned int boot_addr, unsigned int size);
|
||||
int t4_flash_erase_sectors(struct adapter *adapter, int start, int end);
|
||||
int t4_flash_cfg_addr(struct adapter *adapter);
|
||||
int t4_load_cfg(struct adapter *adapter, const u8 *cfg_data, unsigned int size);
|
||||
int t4_get_fw_version(struct adapter *adapter, u32 *vers);
|
||||
int t4_get_tp_version(struct adapter *adapter, u32 *vers);
|
||||
int t4_check_fw_version(struct adapter *adapter);
|
||||
int t4_init_hw(struct adapter *adapter, u32 fw_params);
|
||||
int t4_prep_adapter(struct adapter *adapter);
|
||||
int t4_prep_adapter(struct adapter *adapter, u8 *buf);
|
||||
int t4_init_sge_params(struct adapter *adapter);
|
||||
int t4_init_tp_params(struct adapter *adap);
|
||||
int t4_filter_field_shift(const struct adapter *adap, int filter_sel);
|
||||
int t4_port_init(struct port_info *p, int mbox, int pf, int vf);
|
||||
int t4_port_init(struct adapter *adap, int mbox, int pf, int vf, int port_id);
|
||||
void t4_fatal_err(struct adapter *adapter);
|
||||
void t4_db_full(struct adapter *adapter);
|
||||
void t4_db_dropped(struct adapter *adapter);
|
||||
@ -557,6 +561,7 @@ int t4_cim_read_la(struct adapter *adap, u32 *la_buf, unsigned int *wrptr);
|
||||
void t4_cim_read_pif_la(struct adapter *adap, u32 *pif_req, u32 *pif_rsp,
|
||||
unsigned int *pif_req_wrptr, unsigned int *pif_rsp_wrptr);
|
||||
void t4_cim_read_ma_la(struct adapter *adap, u32 *ma_req, u32 *ma_rsp);
|
||||
int t4_get_flash_params(struct adapter *adapter);
|
||||
int t4_mc_read(struct adapter *adap, int idx, u32 addr,
|
||||
__be32 *data, u64 *parity);
|
||||
int t4_edc_read(struct adapter *adap, int idx, u32 addr, __be32 *data, u64 *parity);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -80,6 +80,8 @@ typedef boolean_t bool;
|
||||
#define true TRUE
|
||||
#endif
|
||||
|
||||
#define __force
|
||||
|
||||
#define mdelay(x) DELAY((x) * 1000)
|
||||
#define udelay(x) DELAY(x)
|
||||
|
||||
|
@ -645,6 +645,7 @@ t4_attach(device_t dev)
|
||||
int rc = 0, i, j, n10g, n1g, rqidx, tqidx;
|
||||
struct intrs_and_queues iaq;
|
||||
struct sge *s;
|
||||
uint8_t *buf;
|
||||
#ifdef TCP_OFFLOAD
|
||||
int ofld_rqidx, ofld_tqidx;
|
||||
#endif
|
||||
@ -713,8 +714,10 @@ t4_attach(device_t dev)
|
||||
t4_register_cpl_handler(sc, CPL_T5_TRACE_PKT, t5_trace_pkt);
|
||||
t4_init_sge_cpl_handlers(sc);
|
||||
|
||||
/* Prepare the adapter for operation */
|
||||
rc = -t4_prep_adapter(sc);
|
||||
/* Prepare the adapter for operation. */
|
||||
buf = malloc(PAGE_SIZE, M_CXGBE, M_ZERO | M_WAITOK);
|
||||
rc = -t4_prep_adapter(sc, buf);
|
||||
free(buf, M_CXGBE);
|
||||
if (rc != 0) {
|
||||
device_printf(dev, "failed to prepare adapter: %d.\n", rc);
|
||||
goto done;
|
||||
@ -815,7 +818,7 @@ t4_attach(device_t dev)
|
||||
* Allocate the "main" VI and initialize parameters
|
||||
* like mac addr.
|
||||
*/
|
||||
rc = -t4_port_init(pi, sc->mbox, sc->pf, 0);
|
||||
rc = -t4_port_init(sc, sc->mbox, sc->pf, 0, i);
|
||||
if (rc != 0) {
|
||||
device_printf(dev, "unable to initialize port %d: %d\n",
|
||||
i, rc);
|
||||
|
Loading…
Reference in New Issue
Block a user