init.qcom.usb.rc: Move the usb init sequence from boot to post-fs
While trying to enumerate in any usb composition with diag involved,
the general expectation is as follows:
1. on boot (usb init sequence creates /dev/ffs-diag)
2. on boot (vendor.diag-router gets started)
3. on property:sys.usb.config triggers the composition rules
However, currently there is nothing to make sure that the diag-router
service starts exactly after the usb init sequence has run.
For example, if instead of the diag-router getting started after usb
init if it starts before the that, due to no retry mechanism in the
diag code it will fail to open the file node and the enumeration will
fail.
Similarly if the service starts after sys.usb.config trigger is
executed where the diag descriptors are expected, due to the
descriptors missing by that point the enumeration will fail.
Therefore to ensure that the process is executed in exact sequence,
moving the usb init sequence from on boot to on post-fs &
seperate the property where we are setting sys.usb.config to the
composition desired to execute on boot.
With this fix the sequence will be as follows:
1. on post-fs (usb init sequence creates /dev/ffs-diag)
2. on early-boot ( vendor.diag-router gets started)
3. on boot sys.usb.config getting assigned.
4. on property:sys.usb.config triggers to composition rules
Change-Id: I6244b7fcdc7828f9c346aab344d9d0bc25e9806f
1 file changed