userlibandfileserver/fileserver/shostmassstorage/server/controller/cusbhostmsdevice.cpp
equal
deleted
inserted
replaced
164 |
164 |
165 // check whether all the luns are suspended, if so then request usb |
165 // check whether all the luns are suspended, if so then request usb |
166 // interface suspension to the transport layer |
166 // interface suspension to the transport layer |
167 for (TInt i = 0; i < iLuList.Count(); i++) |
167 for (TInt i = 0; i < iLuList.Count(); i++) |
168 { |
168 { |
169 CUsbHostMsLogicalUnit& lu = iLuList.GetLuL(i); |
169 CUsbHostMsLogicalUnit& lu = iLuList.GetLu(i); |
170 if (!lu.IsReadyToSuspend() && lu.IsConnected()) |
170 if (!lu.IsReadyToSuspend() && lu.IsConnected()) |
171 return; |
171 return; |
172 } |
172 } |
173 |
173 |
174 for (TInt i = 0; i < iLuList.Count(); i++) |
174 for (TInt i = 0; i < iLuList.Count(); i++) |
175 { |
175 { |
176 CUsbHostMsLogicalUnit& lu = iLuList.GetLuL(i); |
176 CUsbHostMsLogicalUnit& lu = iLuList.GetLu(i); |
177 SetLunL(lu); |
177 SetLunL(lu); |
178 lu.SuspendL(); |
178 lu.SuspendL(); |
179 } |
179 } |
180 |
180 |
181 StopTimer(); |
181 StopTimer(); |
297 { |
297 { |
298 __MSFNLOG |
298 __MSFNLOG |
299 TInt err; |
299 TInt err; |
300 for (TInt i = 0; i < iLuList.Count(); i++) |
300 for (TInt i = 0; i < iLuList.Count(); i++) |
301 { |
301 { |
302 CUsbHostMsLogicalUnit& lu = iLuList.GetLuL(i); |
302 CUsbHostMsLogicalUnit& lu = iLuList.GetLu(i); |
303 SetLunL(lu); |
303 SetLunL(lu); |
304 TRAP(err, lu.DoLunReadyCheckL()); |
304 TRAP(err, lu.DoLunReadyCheckL()); |
305 } |
305 } |
306 } |
306 } |
307 |
307 |
313 |
313 |
314 // check whether all the luns are suspended, if so then request usb |
314 // check whether all the luns are suspended, if so then request usb |
315 // interface suspension to the transport layer |
315 // interface suspension to the transport layer |
316 for (TInt i = 0; i < iLuList.Count(); i++) |
316 for (TInt i = 0; i < iLuList.Count(); i++) |
317 { |
317 { |
318 CUsbHostMsLogicalUnit& lu = iLuList.GetLuL(i); |
318 CUsbHostMsLogicalUnit& lu = iLuList.GetLu(i); |
319 // Has any of the logical units have got its state changed? |
319 // Has any of the logical units have got its state changed? |
320 if ( (lu.IsReadyToSuspend() && !lu.IsConnected()) || |
320 if ( (lu.IsReadyToSuspend() && !lu.IsConnected()) || |
321 (!lu.IsReadyToSuspend() && lu.IsConnected()) ) |
321 (!lu.IsReadyToSuspend() && lu.IsConnected()) ) |
322 { |
322 { |
323 StartTimer(); // Now start the timer |
323 StartTimer(); // Now start the timer |
325 } |
325 } |
326 } |
326 } |
327 |
327 |
328 for (TInt i = 0; i < iLuList.Count(); i++) |
328 for (TInt i = 0; i < iLuList.Count(); i++) |
329 { |
329 { |
330 CUsbHostMsLogicalUnit& lu = iLuList.GetLuL(i); |
330 CUsbHostMsLogicalUnit& lu = iLuList.GetLu(i); |
331 SetLunL(lu); |
331 SetLunL(lu); |
332 lu.SuspendL(); |
332 lu.SuspendL(); |
333 } |
333 } |
334 |
334 |
335 iDeviceSuspendResume->Suspend(); |
335 iDeviceSuspendResume->Suspend(); |
339 void CUsbHostMsDevice::DoResumeLogicalUnitsL() |
339 void CUsbHostMsDevice::DoResumeLogicalUnitsL() |
340 { |
340 { |
341 __MSFNLOG |
341 __MSFNLOG |
342 for (TInt i = 0; i < iLuList.Count(); i++) |
342 for (TInt i = 0; i < iLuList.Count(); i++) |
343 { |
343 { |
344 CUsbHostMsLogicalUnit& lu = iLuList.GetLuL(i); |
344 CUsbHostMsLogicalUnit& lu = iLuList.GetLu(i); |
345 SetLunL(lu); |
345 SetLunL(lu); |
346 lu.ResumeL(); |
346 lu.ResumeL(); |
347 } |
347 } |
348 } |
348 } |
349 |
349 |