http://fx.damasgate.com/more-about-stall/

In other USB classes, a sender can indicate the end of a transfer
by transmitting a short packet, which is a data packet that contains
zero data bytes or any quantity fewer than wMaxPacketSize.

The mass-storage class is unique in its use of the STALL handshake
to end bulk transfers. In contrast, mass-storage devices
use STALL for this purpose and to respond to other error conditions.

After a bulk endpoint returns STALL, the endpoint is in the halt condition.
To resume communications with the endpoint, the host must issue a Clear
Feature(ENDPOINT_HALT) control request with the endpoint’s address
in the Setup transaction’s wIndex field.

Endpoint zero can also use the STALL handshake. On receiving a
Get Max LUN request, a device with a single LUN may return a STALL
to indicate that the device doesn’t support the command.
The endpoint resumes normal operation on receiving a new Setup transaction.

A mass-storage device must stall one or both bulk endpoints in these situations:

If a device sends less than the requested amount of data in the data-transport phase,
the device must stall the bulk IN endpoint.

If a received CBW isn’t valid, the device must stall the bulk IN endpoint and must
either stall the bulk OUT endpoint
or accept and discard any received data on the endpoint.

On experiencing an internal error that requires a reset, a device must
either stall the endpoint being used in any data transfer in progress and set bCSWStatus = 02h
or stall the bulk IN and bulk OUT endpoints until a reset recovery.

A mass-storage device may stall a bulk endpoints in these situations:
If a device expects to send more data than the host specified in the CBW,
after sending the requested quantity of data,
the device may stall the bulk IN endpoint.

If a device expects to receive a different quantity of
data than the host specified in the CBW,
the device may stall the bulk OUT endpoint.

If a device determinines that it can’t complete a command
during the data-transport phase, the device may stall
the bulk IN or bulk OUT endpoint as appropriate.

The thirteen cases described below have more about
the use of STALL with mass-storage commands.

Thirteen Cases for Any Situation
The mass-storage bulk-only transport specification spells out
how the host and device should behave after the host sends a command
in each of thirteen cases.

Cases 1, 6, and 12 (in bold) are the normal cases,
where the host and device each expect the same quantity
and direction of data transfer in the data-transport phase.

The other cases are situations where the host and device have differing expectations.

 

More about STALL的更多相关文章

  1. POJ1274 The Perfect Stall[二分图最大匹配]

    The Perfect Stall Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 23911   Accepted: 106 ...

  2. POJ 1274 The Perfect Stall、HDU 2063 过山车(最大流做二分匹配)

    The Perfect Stall Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 24081   Accepted: 106 ...

  3. poj 3190 Stall Reservations

    http://poj.org/problem?id=3190 Stall Reservations Time Limit: 1000MS   Memory Limit: 65536K Total Su ...

  4. [题解]poj 1274 The Prefect Stall

    Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 22736   Accepted: 10144 Description Far ...

  5. poj1274 The Perfect Stall (二分最大匹配)

    Description Farmer John completed his new barn just last week, complete with all the latest milking ...

  6. Greedy:Stall Reservations(POJ 3190)

    牛挤奶 题目大意:一群牛很挑剔,他们仅在一个时间段内挤奶,而且只能在一个棚里面挤,不能与其他牛共享地方,现在给你一群牛,问你如果要全部牛都挤奶,至少需要多少牛棚? 这一题如果把时间区间去掉,那就变成装 ...

  7. poj 1247 The Perfect Stall 裸的二分匹配,但可以用最大流来水一下

    The Perfect Stall Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 16396   Accepted: 750 ...

  8. poj3190 stall revertation

                                                                                                Stall Re ...

  9. poj 1274 The Perfect Stall【匈牙利算法模板题】

    The Perfect Stall Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 20874   Accepted: 942 ...

  10. BZOJ1651: [Usaco2006 Feb]Stall Reservations 专用牛棚

    1651: [Usaco2006 Feb]Stall Reservations 专用牛棚 Time Limit: 10 Sec  Memory Limit: 64 MBSubmit: 509  Sol ...

随机推荐

  1. python基础--xml和configparse模块

    1)XML模块 xml是实现不同语言或程序之间进行数据交换的协议,跟json差不多. 下面是xml的遍历查询删除修改和生成 # -*- coding:utf-8 -*- __author__ = 's ...

  2. DEDECMS去除后门隐患和漏洞以及冗余代码的方法

    链接:http://jingyan.baidu.com/article/4d58d541195bdb9dd4e9c029.html 工具/原料 织梦网站管理系统 sublime编辑器 方法/步骤 第一 ...

  3. java IO流的继承体系和装饰类应用

    java IO流的设计是基于装饰者模式&适配模式,面对IO流庞大的包装类体系,核心是要抓住其功能所对应的装饰类. 装饰模式又名包装(Wrapper)模式.装饰模式以对客户端透明的方式扩展对象的 ...

  4. 获取随机字符串的方法 GetRandomString

    方法1:推荐方便. System.Hash 单元 Memo1.Lines.Add(THash.GetRandomString(50)); 方法二(自己写的): function TStrApi.Sui ...

  5. qt 问题及处理

    1. 包依赖问题 在windows平台时,通过microsoft process Explorer可以查看所以来的dll.并将这些dll复制到应用程序目录,加上qt.conf就可以使用了. [Path ...

  6. day5模块学习--sys模块

    sys模块 sys模块是处理与系统相关的模块,sys(system),下面来看看sys模块常用的方法: 1.sys.argv         #命令行参数list,第一个元素是程序本身路径 2.sys ...

  7. 解析文本文件 "r" 与 "rb" 模式的区别(Python)

    r,rb 那么在读文件时,有无b标识的的主要区别在哪里呢? 1.文件使用方式标识 'r':默认值,表示从文件读取数据.'b':表示要读写二进制数据 2.读文件 进行读文件操作时,直到读到文档结束符(E ...

  8. react篇章-React Props-Props 验证

    React.PropTypes 在 React v15.5 版本后已经移到了 prop-types 库. <script src="https://cdn.bootcss.com/pr ...

  9. C#语言-NPOI.dll导入Excel功能的实现

    前言:刚工作那会,公司有一套完善的MVC框架体系,每当有导入EXCEL功能要实现的时候,都会借用框架里自带的导入方法,一般三下五除二就完成了,快是快,可总是稀里糊涂的,心里很没有底.前几天,在另一个原 ...

  10. CSU - 2059 Water Problem

    Description ​ 一条'Z'形线可以将平面分为两个区域,那么由N条Z形线所定义的区域的最大个数是多少呢?每条Z形线由两条平行的无限半直线和一条直线段组成 Input 首先输入一个数字T(T& ...