diff -r 73ea206103e6 -r 43365a9b78a3 userlibandfileserver/fileserver/shostmassstorage/server/controller/cusbhostmsdevicethread.cpp --- a/userlibandfileserver/fileserver/shostmassstorage/server/controller/cusbhostmsdevicethread.cpp Wed Jun 23 19:44:53 2010 +0300 +++ b/userlibandfileserver/fileserver/shostmassstorage/server/controller/cusbhostmsdevicethread.cpp Tue Jul 06 15:50:07 2010 +0300 @@ -308,6 +308,9 @@ } return; case EUsbHostMsUnRegisterInterface: + // Check whether all luns have got uninitialised. + for(TInt i = 0, j = iUsbHostMsDevice->GetMaxLun(); i <= j; i++) + TRAP_IGNORE(iUsbHostMsDevice->RemoveLunL(i)); TRAP(ret, UnRegisterInterfaceL(aMessage)); break; case EUsbHostMsRegisterLun: