diff options
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); |