Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Aug 2020 10:16:28 +0200 (CEST)
From:      Wojciech Puchar <wojtek@puchar.net>
To:        freebsd-hackers@freebsd.org
Subject:   USB experts help needed
Message-ID:  <alpine.BSF.2.20.2008261012170.79099@puchar.net>

next in thread | raw e-mail | index | archive | help
i am implementing my own "mass storage device" (actually fake but doesn't 
matter) on microcontroller.

I already finished implementing control endpoint part so it is properly 
detected configured itp.

But i have no idea why i'm getting USB reset after successful reply to 
"get max lun" control endpoint command  (0xFE). i reply with one byte of 
zero according to USB mass storage specs.

below is log from my microcontroller's program

USB: RESET
USB: Setting USB address 6
USB: Host received response from control interface.
USB: Sending config descriptor 0100:8 bytes.
USB: Host received response from control interface.
USB: Sending config descriptor 0100:18 bytes.
USB: Host received response from control interface.
USB: Sending config descriptor 0300:2 bytes.
USB: Host received response from control interface.
USB: Sending config descriptor 0300:4 bytes.
USB: Host received response from control interface.
USB: Sending config descriptor 0301:2 bytes.
USB: Host received response from control interface.
USB: Sending config descriptor 0301:32 bytes.
USB: Host received response from control interface.
USB: Sending config descriptor 0302:2 bytes.
USB: Host received response from control interface.
USB: Sending config descriptor 0302:12 bytes.
USB: Host received response from control interface.
USB: Sending config descriptor 0200:9 bytes.
USB: Host received response from control interface.
USB: Sending config descriptor 0200:32 bytes.
USB: Host received response from control interface.
USB: Set configuration 1 received.
USB: Host received response from control interface.
USB: Mass storage get MAX LUN received.
USB: Host received response from control interface.
USB: RESET
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
USB: Setting USB address 6
USB: Host received response from control interface.
USB: Sending config descriptor 0100:8 bytes.
USB: Host received response from control interface.
USB: Sending config descriptor 0100:18 bytes.
USB: Host received response from control interface.
USB: Sending config descriptor 0200:9 bytes.
USB: Host received response from control interface.
USB: Sending config descriptor 0200:32 bytes.
USB: Host received response from control interface.
USB: Set configuration 1 received.
USB: Host received response from control interface.
USB: Mass storage reset received.
USB: Host received response from control interface.
USB: Clear endpoint 1 received.
USB: Host received response from control interface.

.
.
.

after reset FreeBSD seems to again perform initialization without asking 
for amount of LUN again

the last "clear endpoint 1" is because i don't have endpoint 1 implemented 
yet



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.20.2008261012170.79099>