hothd-usb: Fix template expansion and start rate limits

70-hothd-usb.rules sets SYSTEMD_WANTS to "hothd-usb@" without the
.service suffix. When systemd parses SYSTEMD_WANTS on uevents while the
device unit is already plugged (such as the "bind" event after "add"),
it only expands template instances when the unit name includes its type
suffix, and otherwise tries to start the literal uninstantiated
"hothd-usb@.service" and fails with Invalid argument. In addition, rapid
USB controller re-binds during boot and HPM S5 transitions can hit
gBMC's default 2-starts-per-30s rate limit and leave the instance
failed.

Spell out "hothd-usb@.service" in SYSTEMD_WANTS so systemd expands the
device sysfs instance on both add and bind events, disable the start
rate limit on hothd-usb@.service, and step restart delays from 5s up to
30s across 3 steps.

Tested: Verified syntax with systemd-analyze and udevadm verify
Google-Bug-Id: 585587833
Change-Id: Ib697ce8f237111a1a887279d216f83fd14f1dac5
Signed-off-by: William A. Kennington III <wak@google.com>
2 files changed