OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by John - 08.12.2020

FS#3493 - hotplug firmware scripts run twice for each device, for ACTION=add, and ACTION=remove

Test device: ath79 mikrotik wap-g on snapshot r15165-66d12ce667

Modify /etc/hotplug.d/firmware/*, or called settings to log to a file:

root@OpenWrt:~# grep -r hotplug.log /etc/hotplug.d/firmware/
/etc/hotplug.d/firmware/10-ath9k-eeprom:        echo "$(date +%s): 10-ath9k-eeprom $ACTION" >> /tmp/hotplug.log
/etc/hotplug.d/firmware/11-ath10k-caldata:              echo "$(date +%s): 11-ath10k-eeprom $ACTION" >> /tmp/hotplug.log
root@OpenWrt:~# grep -r hotplug.log /lib/functions/ 
        echo "$(date +%s): caldata sysfsload_from_file $ACTION" >> /tmp/hotplug.log
root@OpenWrt:~# cat /tmp/hotplug.log 
1607349214: caldata sysfsload_from_file add
1607349214: 11-ath10k-eeprom add
1607349214: caldata sysfsload_from_file remove
1607349214: 11-ath10k-eeprom remove
1607349218: 10-ath9k-eeprom add
1607349218: caldata sysfsload_from_file add
1607349219: 10-ath9k-eeprom remove
1607349219: caldata sysfsload_from_file remove
Jo-Philipp Wich commented on 08.12.2020 12:03

Uhm, so it works as expected? I am unable to deduce what is wrong from your description.

John commented on 09.12.2020 04:50

It works, but I would not expect the caldata extraction functions to be run for $ACTION=remove?
logread has an error for it:

Tue Dec  8 03:49:22 2020 daemon.err procd: Failed to write to /sys//devices/pci0000:00/0000:00:00.0/firmware/ath10k!cal-pci-0000:00:00.0.bin/loading: Bad file descriptor

We should be able to save some cpu cycles if we only run on $ACTION=add for functions where we modify the caldata (like ath9k_patch_mac) before loading it?


Available keyboard shortcuts


Task Details

Task Editing