Bug 1267 - fx2lafw: std_opts_config_list: sdi/cg != NULL: not handling
Summary: fx2lafw: std_opts_config_list: sdi/cg != NULL: not handling
Status: RESOLVED FIXED
Alias: None
Product: PulseView
Classification: Unclassified
Component: Other (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-27 21:53 CEST by Soeren Apel
Modified: 2018-08-30 23:13 CEST (History)
2 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Soeren Apel 2018-08-27 21:53:33 CEST
How to reproduce:
-) Start PV with an FX2 attached

Result:
sr: [00:00.512481] fx2lafw: Found an fx2lafw device.
sr: [00:00.512521] hwdriver: Scan found 1 devices (fx2lafw).
sr: [00:00.818592] hwdriver: Scan found 0 devices (hameg-hmo).
sr: [00:00.825764] hwdriver: Scan found 0 devices (ipdbg-org-la).
sr: [00:00.828774] hwdriver: Scan found 0 devices (lecroy-xstream).
sr: [00:00.832977] hwdriver: Scan found 0 devices (rigol-ds).
sr: [00:00.835994] hwdriver: Scan found 0 devices (yokogawa-dlm).
sr: [00:00.997246] device: fx2lafw: Opening device instance.
sr: [00:00.997267] fx2lafw: Firmware upload was not needed.
sr: [00:00.997419] fx2lafw: Opened device on 3.9 (logical) / usb/3-3 (physical), interface 0, firmware 1.0.
sr: [00:00.997428] fx2lafw: Detected REVID=1, it's a Cypress CY7C68013A (FX2LP).
sr: [00:00.997582] hwdriver: sr_config_list(): key 30014 (triggermatch) sdi 0x8547d78 cg NULL -> [1, 2, 3, 4, 5]
sr: [00:00.997764] hwdriver: sr_config_list(): key 30014 (triggermatch) sdi 0x8547d78 cg NULL -> [1, 2, 3, 4, 5]
sr: [00:00.997878] hwdriver: sr_config_list(): key 30014 (triggermatch) sdi 0x8547d78 cg NULL -> [1, 2, 3, 4, 5]
sr: [00:00.997988] hwdriver: sr_config_list(): key 30014 (triggermatch) sdi 0x8547d78 cg NULL -> [1, 2, 3, 4, 5]
sr: [00:00.998094] hwdriver: sr_config_list(): key 30014 (triggermatch) sdi 0x8547d78 cg NULL -> [1, 2, 3, 4, 5]
sr: [00:00.998202] hwdriver: sr_config_list(): key 30014 (triggermatch) sdi 0x8547d78 cg NULL -> [1, 2, 3, 4, 5]
sr: [00:00.998308] hwdriver: sr_config_list(): key 30014 (triggermatch) sdi 0x8547d78 cg NULL -> [1, 2, 3, 4, 5]
sr: [00:00.998416] hwdriver: sr_config_list(): key 30014 (triggermatch) sdi 0x8547d78 cg NULL -> [1, 2, 3, 4, 5]
sr: [00:00.998859] hwdriver: sr_config_get(): key 30001 (captureratio) sdi 0x8547d78 cg NULL -> uint64 0
sr: [00:00.998973] hwdriver: sr_config_get(): key 30001 (captureratio) sdi 0x8547d78 cg NULL -> uint64 0
sr: [00:00.999077] std: fx2lafw: std_opts_config_list: sdi/cg != NULL: not handling.
sr: [00:00.999531] hwdriver: sr_config_get(): key 50001 (limit_samples) sdi 0x8547d78 cg NULL -> uint64 0
sr: [00:00.999603] hwdriver: sr_config_set(): key 50001 (limit_samples) sdi 0x8547d78 cg NULL -> uint64 1000000
sr: [00:00.999702] hwdriver: sr_config_get(): key 50001 (limit_samples) sdi 0x8547d78 cg NULL -> uint64 1000000
sr: [00:00.999755] hwdriver: sr_config_list(): key 30000 (samplerate) sdi 0x8547d78 cg NULL -> {'samplerates': <[uint64 20000, 25000, 50000, 100000, 200000, 250000, 500000, 1000000, 2000000, 3000000, 4000000, 6000000, 8000000, 12000000, 16000000, 24000000]>}
sr: [00:00.999815] hwdriver: sr_config_get(): key 30000 (samplerate) sdi 0x8547d78 cg NULL -> uint64 20000
sr: [00:00.999878] hwdriver: sr_config_list(): key 30000 (samplerate) sdi 0x8547d78 cg NULL -> {'samplerates': <[uint64 20000, 25000, 50000, 100000, 200000, 250000, 500000, 1000000, 2000000, 3000000, 4000000, 6000000, 8000000, 12000000, 16000000, 24000000]>}
sr: [00:00.999934] hwdriver: sr_config_get(): key 30000 (samplerate) sdi 0x8547d78 cg NULL -> uint64 20000
sr: [00:00.999985] hwdriver: sr_config_get(): key 30001 (captureratio) sdi 0x8547d78 cg NULL -> uint64 0
sr: [00:01.000071] hwdriver: sr_config_get(): key 30001 (captureratio) sdi 0x8547d78 cg NULL -> uint64 0
sr: [00:01.000150] std: fx2lafw: std_opts_config_list: sdi/cg != NULL: not handling.
sr: [00:01.000471] hwdriver: sr_config_get(): key 50001 (limit_samples) sdi 0x8547d78 cg NULL -> uint64 1000000

Unfortunately, we don't know which key is attempted to be listed since the debug output doesn't say.
Comment 1 Gerhard Sittig 2018-08-27 23:03:27 CEST
This seems to be a query for "channel group specific device options", which 
only mixed signal devices and few special cases (temperature and humidity, 
channel dependent features) supoprt.  The fx2lafw(4) driver appears to be 
"logic analyzers exclusively", so CG specific options shall not apply.

So the simple approach to just silence the sr_err() message could do:

src/hardware/fx2lafw/api.c:config_list()

case SR_CONF_DEVICE_OPTIONS:
  if (cg)
    return SR_ERR_NA;
  return STD_CONFIG_LIST(...);
Comment 2 Uwe Hermann 2018-08-30 23:13:04 CEST
Fixed in 4be5746d1dd2796aa10f0c45440005d28a554901, thanks!