Re: [PATCH V3] usb: gadget: storage: Remove warning message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thinh Nguyen wrote:
> Alan Stern wrote:
>> On Tue, 2 Jul 2019, Thinh Nguyen wrote:
>>
>>> Hi,
>>>
>>> Alan Stern wrote:
>>>> On Fri, 10 May 2019, EJ Hsu wrote:
>>>>
>>>>> This change is to fix below warning message in following scenario:
>>>>> usb_composite_setup_continue: Unexpected call
>>>>>
>>>>> When system tried to enter suspend, the fsg_disable() will be called to
>>>>> disable fsg driver and send a signal to fsg_main_thread. However, at
>>>>> this point, the fsg_main_thread has already been frozen and can not
>>>>> respond to this signal. So, this signal will be pended until
>>>>> fsg_main_thread wakes up.
>>>>>
>>>>> Once system resumes from suspend, fsg_main_thread will detect a signal
>>>>> pended and do some corresponding action (in handle_exception()). Then,
>>>>> host will send some setup requests (get descriptor, set configuration...)
>>>>> to UDC driver trying to enumerate this device. During the handling of "set
>>>>> configuration" request, it will try to sync up with fsg_main_thread by
>>>>> sending a signal (which is the same as the signal sent by fsg_disable)
>>>>> to it. In a similar manner, once the fsg_main_thread receives this
>>>>> signal, it will call handle_exception() to handle the request.
>>>>>
>>>>> However, if the fsg_main_thread wakes up from suspend a little late and
>>>>> "set configuration" request from Host arrives a little earlier,
>>>>> fsg_main_thread might come across the request from "set configuration"
>>>>> when it handles the signal from fsg_disable(). In this case, it will
>>>>> handle this request as well. So, when fsg_main_thread tries to handle
>>>>> the signal sent from "set configuration" later, there will nothing left
>>>>> to do and warning message "Unexpected call" is printed.
>>>>>
>>>>> Signed-off-by: EJ Hsu <ejh@xxxxxxxxxx>
>>>>> ---
>>>>> v2: remove the copyright info
>>>>> v3: change fsg_unbind() to use FSG_STATE_DISCONNECT
>>>>> ---
>>> This patch causes a failure in USB CV TD 9.13 Set Configuration Test.
>>> Please review and help resolve it.
>>> Apologize for the short report description. I'll try to capture more
>>> info if you cannot reproduce it.
>> Yes, please provide the complete log and information from the failing 
>> USB CV test.
>>
> I attached the CV test log. I hope that's sufficient.
>

We may have issue sending attched HTML file. Here's a text format of it:


    TEST SUITE:  Chapter 9 Tests [USB 3 Gen X devices].cvtests
    REVISION:  10866
    REVISION DATE:  2018-02-28 16:30:43 -0800 (Wed, 28 Feb 2018)
    OPERATING SYSTEM:  Windows 10 Home (Build
18894.1000.amd64fre.rs_prerelease.190503-1728)
    WORKSTATION:  USB-AUTOMATION
    DATE:  Tuesday, July 02, 2019
    TIME:  01:52:01 AM
    OPERATOR:  Lab_auto
    NUMBER OF TESTS:  1
    LOG NAME:  Chapter 9 Tests - USB 3 Gen X - 2019-07-02 01-51-36
    RESULT:  failed

InitializeTestSuite

INFOTest log initialized.
INFOLog Level: Normal
INFOUser Input module initialized
INFOWindows 10 Home (Build 18894.1000.amd64fre.rs_prerelease.190503-1728)
INFOCVExe.exe ver 3.0.0.0
INFOBaseUtilities.dll ver 3.0.0.0
INFOCommandVerifierLog.dll ver 3.0.0.0
INFOTSMFCGuiDialogHelperDLL.dll ver 3.0.0.0
INFOTestUtilities.dll ver 3.0.0.0
INFOTestSuiteEngine.dll ver 3.0.0.0
INFOVIFReader.dll ver 3.0.0.0
INFOxhci_DevIOCTL.dll ver 2.1.10.3
INFOxhci_TestServices.dll ver 2.1.10.3
INFOUSBUtilities.dll ver 1.4.5.1
INFOStackSwitcher.dll ver 1.4.5.1
INFOxhci_USBCommandVerifier.dll ver 2.1.10.3
INFOHost selected: xHCI Host:  VID=0x8086, PID=0xa36d (PCI bus 0, device
20, function 0)
INFODUT selected: SSP  Device (MSC/BOT) addr=1:   VID=053f, PID=8bd8
INFOTopology: XHCI HC -- DUT
INFOSuperSpeedPlus Device.

GetNumberOfConfigurations

INFOUSB Version number of device:  3.20
INFONumber of configurations: 1

TD 9.13 Set Configuration Test - Device State AddressedFailed (Aborted)

INFOStart time: Tue Jul  2 01:51:39 2019

INFO   In Address state:
INFONow doing a Set Configuration with Configuration Value 0
INFOSet Configuration with Configuration Value 0 succeeded
INFONow doing a Get Configuration
INFOGet Configuration for the device returned the correct Configuration
Value of 0
INFONow doing a Get Descriptor with Configuration Index 0
INFOGet Descriptor succeeded and returned Configuration Value : 1
INFONow doing a Set Configuration with Configuration Value 1
INFOSet Configuration succeeded with Configuration Value : 1
INFO   In Configured state:
INFONow doing a Get Descriptor with Configuration Index 0
INFOGet Descriptor succeeded and returned Configuration Value : 1
INFONow doing a Set Configuration with Configuration Value 1
ERRORSet Configuration failed for Configuration Value : 1
ERRORSet Configuration failed with Configuration Value : 1
FAIL(9.4.7.1) Devices must support a valid SetConfiguration() request
INFONow doing a Set Configuration with Configuration Value 0
ERRORSet Configuration failed for Configuration Value : 0
ERRORCould not unconfigure the device
FAIL(9.4.7.4) In the Configured state in response to the
SetConfiguration() request, the device must enter the Address state, if
the specified configuration is zero.
INFONow doing a Get Configuration
ERRORGet configuration failed
ERRORCould not Get Configuration for the device
ERRORGet device descriptor failed
ERRORCouldn't get USB Version of Device Under Test
ERRORGet number of configurations failed
ABORTCould not find an invalid Configuration Value,
FindInvalidConfigValue() returned 0 - Internal error
INFOPutting device back in Configured state
ERRORSet Configuration failed for Configuration Value : 1
ERRORSet Configuration failed with Configuration Value : 1
FAIL(9.4.7.1) Devices must support a valid SetConfiguration() request
INFONow doing a Get Configuration
ERRORGet configuration failed
ERRORCould not Get Configuration for the device
FAIL(9.4.2.2) Devices should return the non-zero bConfigurationValue of
the current configuration for the GetConfiguration() request in the
Configured state.
INFONow doing a Get Configuration
ERRORGet configuration failed
ERRORCould not Get Configuration for the device
FAIL(9.4.2.2) Devices should return the non-zero bConfigurationValue of
the current configuration for the GetConfiguration() request in the
Configured state.
INFONow doing a Set Configuration with Configuration Value 0
ERRORSet Configuration failed for Configuration Value : 0
ERRORCould not unconfigure the device
FAIL(9.4.7.4) In the Configured state in response to the
SetConfiguration() request, the device must enter the Address state, if
the specified configuration is zero.
FAILTest did not execute all required steps.
INFO
Stop time: Tue Jul  2 01:52:01 2019
INFODuration:  22 seconds.
INFOStopping Test [ TD 9.13 Set Configuration Test - Device State Addressed:
     Number of: Fails (7); Aborts (1); Warnings (0) ]

Summary

INFOTEST SUITE SUMMARY:
    [ Fails (7); Aborts (1); Warnings (0) ]
INFOTEST RESULTS:
    [ Passed (0); Failed (1) ]




BR,
Thinh




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux