diff options
author | John Klug <john.klug@multitech.com> | 2018-06-19 16:04:47 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2018-06-19 16:04:47 -0500 |
commit | 3e7f8d202e9728daafc985f36ff0fff24e1a4840 (patch) | |
tree | 02c159152690f1528a860d70a3201b47f0cef838 /io-module/mts-io.c | |
parent | 3892a0c8f5bfbb660a11c93153faf3a57dbe7dc3 (diff) | |
download | mts-io-e4fdb751d5722115e30643cdfb4df4e99bea953b.tar.gz mts-io-e4fdb751d5722115e30643cdfb4df4e99bea953b.tar.bz2 mts-io-e4fdb751d5722115e30643cdfb4df4e99bea953b.zip |
XDOT feature2.1.0
Diffstat (limited to 'io-module/mts-io.c')
-rw-r--r-- | io-module/mts-io.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/io-module/mts-io.c b/io-module/mts-io.c index 31f69f9..c8e0f4b 100644 --- a/io-module/mts-io.c +++ b/io-module/mts-io.c @@ -613,7 +613,11 @@ static bool load_port(int port) { memcpy(&ap_eeprom[port_index], mts_ap_eeprom[port_index], sizeof(mts_ap_eeprom[port_index])); if (mts_ap_eeprom[port_index][0] == 0xFF) { - log_error("uninitialized eeprom on accessory card %d", port); + log_error("uninitialized eeprom on accessory card %d -- assuming MFSER", port); + if (! set_mfser_info(port_info[port_index])) { + log_error("failed to set up mfser port info"); + return false; + } } else if (mts_ap_eeprom[port_index][0] == 0x00) { log_info("no accessory card inserted in port %d", port); } else { @@ -633,6 +637,11 @@ static bool load_port(int port) { log_error("failed to set up mfser port info"); return false; } + } else if (strstr(ap_eeprom[port_index].product_id, PRODUCT_ID_MTAC_XDOT)) { + if (! set_mfser_info(port_info[port_index])) { + log_error("failed to set up xdot port info"); + return false; + } } else if (strstr(ap_eeprom[port_index].product_id, PRODUCT_ID_MTAC_ETH)) { if (! set_eth_info(port_info[port_index])) { log_error("failed to set up eth port info"); @@ -644,10 +653,11 @@ static bool load_port(int port) { return false; } } else { - log_error("unknown accessory card [%s] in port %d", ap_eeprom[port_index].product_id, port); - kfree(port_info[port_index]); - port_info[port_index] = NULL; - return false; + log_error("unknown accessory card [%s] in port %d -- assuming MFSER", ap_eeprom[port_index].product_id, port); + if (! set_mfser_info(port_info[port_index])) { + log_error("failed to set up mfser port info"); + return false; + } } log_info("accessory card %d vendor-id: %.32s", port, ap_eeprom[port_index].vendor_id); |