Hi Christophe, event are not just "new device" (in that case I would agree with you). Events can be: - "attention" (before "poweroff") for a specific device to orderly shutdown before poweroff (or remove if virtio-net device in a VM). - SFP insertion/removal of a specific port - Error condition (an internal watchdog may detect packet stall or I don't know)
FF On 5 January 2017 at 09:13, Christophe Milard <christophe.mil...@linaro.org> wrote: > Hi Francois, > > Following your suggestion, the driver API contains: > /** Register event notifier function for hotplug events: > */ > int (*register_notifier)(void (*event_handler) (void)); > > But I an now wondering: Why this double callback? > > Wouldn't it be simpler to have the functions: > > odpdrv_enum_class_probe_request(): called by a enum class when it > needs to refresh its enumerator list. > (ODP would eventually call the enumerator class probe function after > recieving the probe request), ... and... > > odpdrv_enum_probe_request(): called by an enumerator when it needs to > refresh its device list. (ODP would eventually call the enumerator > probe function after recieving the probe request) > > Christophe > -- [image: Linaro] <http://www.linaro.org/> François-Frédéric Ozog | *Director Linaro Networking Group* T: +33.67221.6485 francois.o...@linaro.org | Skype: ffozog