diff options
author | gnn <gnn@FreeBSD.org> | 2009-03-10 19:22:45 +0000 |
---|---|---|
committer | gnn <gnn@FreeBSD.org> | 2009-03-10 19:22:45 +0000 |
commit | 73c9516af48e8c1e59db9e0eca936cf61196d5a3 (patch) | |
tree | 92e5cdafb80789aa8be002e44c497e35ee6791b6 /sys/dev/cxgb/cxgb_t3fw.c | |
parent | 4bac5fc418e8367182e72cee68d22a1c0f21d5ab (diff) | |
download | FreeBSD-src-73c9516af48e8c1e59db9e0eca936cf61196d5a3.zip FreeBSD-src-73c9516af48e8c1e59db9e0eca936cf61196d5a3.tar.gz |
Update the Chelsio driver to the latest bits from Chelsio
Firmware upgraded to 7.1.0 (from 5.0.0).
T3C EEPROM and SRAM added; Code to update eeprom/sram fixed.
fl_empty and rx_fifo_ovfl counters can be observed via sysctl.
Two new cxgbtool commands to get uP logic analyzer info and uP IOQs
Synced up with Chelsio's "common code" (as of 03/03/09)
Submitted by: Navdeep Parhar at Chelsio
Reviewed by: gnn
MFC after: 2 weeks
Diffstat (limited to 'sys/dev/cxgb/cxgb_t3fw.c')
-rw-r--r-- | sys/dev/cxgb/cxgb_t3fw.c | 69 |
1 files changed, 68 insertions, 1 deletions
diff --git a/sys/dev/cxgb/cxgb_t3fw.c b/sys/dev/cxgb/cxgb_t3fw.c index cf54f9c..44a4103 100644 --- a/sys/dev/cxgb/cxgb_t3fw.c +++ b/sys/dev/cxgb/cxgb_t3fw.c @@ -13,6 +13,8 @@ __FBSDID("$FreeBSD$"); #include <cxgb_t3fw.h> #include <t3b_protocol_sram.h> #include <t3b_tp_eeprom.h> +#include <t3c_protocol_sram.h> +#include <t3c_tp_eeprom.h> static int cxgb_t3fw_modevent(module_t mod, int type, void *unused) @@ -80,7 +82,6 @@ DECLARE_MODULE(cxgb_t3b_protocol_sram, cxgb_t3b_protocol_sram_mod, SI_SUB_DRIVER MODULE_VERSION(cxgb_t3b_protocol_sram, 1); MODULE_DEPEND(cxgb_t3b_protocol_sram, firmware, 1, 1, 1); - static int cxgb_t3b_tp_eeprom_modevent(module_t mod, int type, void *unused) { @@ -113,3 +114,69 @@ static moduledata_t cxgb_t3b_tp_eeprom_mod = { DECLARE_MODULE(cxgb_t3b_tp_eeprom, cxgb_t3b_tp_eeprom_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); MODULE_VERSION(cxgb_t3b_tp_eeprom, 1); MODULE_DEPEND(cxgb_t3b_tp_eeprom, firmware, 1, 1, 1); + +static int +cxgb_t3c_protocol_sram_modevent(module_t mod, int type, void *unused) +{ + const struct firmware *fp, *parent; + int error; + switch (type) { + case MOD_LOAD: + + fp = firmware_register("cxgb_t3c_protocol_sram", t3c_protocol_sram, + (size_t)t3c_protocol_sram_length, + 0, NULL); + if (fp == NULL) + goto fail_0; + parent = fp; + return (0); + fail_0: + return (ENXIO); + case MOD_UNLOAD: + error = firmware_unregister("cxgb_t3c_protocol_sram"); + return (error); + } + return (EINVAL); +} + +static moduledata_t cxgb_t3c_protocol_sram_mod = { + "cxgb_t3c_protocol_sram", + cxgb_t3c_protocol_sram_modevent, + 0 +}; +DECLARE_MODULE(cxgb_t3c_protocol_sram, cxgb_t3c_protocol_sram_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); +MODULE_VERSION(cxgb_t3c_protocol_sram, 1); +MODULE_DEPEND(cxgb_t3c_protocol_sram, firmware, 1, 1, 1); + +static int +cxgb_t3c_tp_eeprom_modevent(module_t mod, int type, void *unused) +{ + const struct firmware *fp, *parent; + int error; + switch (type) { + case MOD_LOAD: + + fp = firmware_register("cxgb_t3c_tp_eeprom", t3c_tp_eeprom, + (size_t)t3c_tp_eeprom_length, + 0, NULL); + if (fp == NULL) + goto fail_0; + parent = fp; + return (0); + fail_0: + return (ENXIO); + case MOD_UNLOAD: + error = firmware_unregister("cxgb_t3c_tp_eeprom"); + return (error); + } + return (EINVAL); +} + +static moduledata_t cxgb_t3c_tp_eeprom_mod = { + "cxgb_t3c_tp_eeprom", + cxgb_t3c_tp_eeprom_modevent, + 0 +}; +DECLARE_MODULE(cxgb_t3c_tp_eeprom, cxgb_t3c_tp_eeprom_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); +MODULE_VERSION(cxgb_t3c_tp_eeprom, 1); +MODULE_DEPEND(cxgb_t3c_tp_eeprom, firmware, 1, 1, 1); |