Re: [PATCH v2] target: add usb gadget fabric module

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

 



On 01/17/2012 04:39 PM, Alan Stern wrote:
On Tue, 17 Jan 2012, Sebastian Andrzej Siewior wrote:

responded with CSW.status=1.

It shouldn't complain when that happens; that's normal.  What error
recovery did you need?
I have a database where I lookup the transfer direction for each
command. I did not have the direction for the VERIFY which is issued by
WindowsXP after a disk format. Not doing anything resulted in timeouts.
So added that I sucking the incoming data or sending dummy data and
then so I could send the CSW (basic error recovery).
After I replied with CSW.status=1 for that command Windows issued MODE_SENSE and retried VERIFY. This ended in a loop. After I replied
with CSW.status=2 Windows retried the command again. This also ended in
a loop. So I had to add the direction to the database so the show can
go on. I have no idea what I can do if this happens with an other
commands where the remote OS just repeats the commands which will fail
again.

However, it works for other commands: Target isn't handling
GPCMD_READ_FORMAT_CAPACITIES which is issued by Windows. After I reply
with CSW.status=1 it does a set_alt and repeats it again. This repeats
two times and then Windows moves on. Windows also tries a MODE_SENSE
request which fails in target with:
  MODE SENSE: unimplemented page/subpage: 0x1c/0x00
Windows retries this command a few times without set_alt and continues.
I noticed the same behavior on Windows8 (the preview edition available
for download). Unfortunately it does not try UAS :/

UAS doesn't seem to have anything resembling BOT's
dCBWDataTransferLength or dCSWDataResidue.  How do you deal with this?
And how does the uas driver deal with it?
Neither the host side nor the device has any kind recovery implemented
if something does not go as planned.
In UAS I have four endpoints, DATA IN+OUT, CMD (OUT) and STATUS (IN).
If everything goes as planned, then I receive the CMD, send/receive
the data and ack it via STATUS. So if something goes wrong I should
send a different status response. The host can also send "TASK
MANAGEMENT" commands for some extra magic which is also not implemented.

Alan Stern


Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux