I am using #LPC1769, I faced same problem.
I have added following function to fs_usb.c
void diskDeinitialize(){
Stat = STA_NOINIT;
}
I called diskDeinitialize function in EVENT_USB_Host_DeviceUnattached
void EVENT_USB_Host_DeviceUnattached(const uint8_t corenum) {
DEBUGOUT(("\r\nDevice Unattached on port %d\r\n"), corenum);
diskDeinitialize();
}
For me it's serves the purpose.
Is this the correct way to fix the problem ??