My application crashes when USB device is unplugged (suddenly, not gracefully) from computer when writing data to the device (hid_write). So far I cannot conclude it is hid_write() causes this crash, but the call trace shows crash is consistently around hid_write(), so this is more of a question rather than an issue: if hid_write is in process, what is the behavior if USB device is unplugged? What is the proper way for the caller of hid_write to handle this situation, i.e., USB device is suddenly removed, so no crash occurs? Thanks!
My application crashes when USB device is unplugged (suddenly, not gracefully) from computer when writing data to the device (hid_write). So far I cannot conclude it is hid_write() causes this crash, but the call trace shows crash is consistently around hid_write(), so this is more of a question rather than an issue: if hid_write is in process, what is the behavior if USB device is unplugged? What is the proper way for the caller of hid_write to handle this situation, i.e., USB device is suddenly removed, so no crash occurs? Thanks!