summaryrefslogtreecommitdiffstats
path: root/EmbeddedPkg
diff options
context:
space:
mode:
authorRuiyu Ni <ruiyu.ni@intel.com>2018-02-13 15:21:48 +0800
committerRuiyu Ni <ruiyu.ni@intel.com>2018-02-15 14:17:22 +0800
commit6461344c318cd43a5494c0302e142a0cbe386d52 (patch)
treee930429f61098438e8f5c88e02e1c4aa49522e30 /EmbeddedPkg
parentee33344c595709ef7642c52d27a16f21e692b856 (diff)
downloadedk2-6461344c318cd43a5494c0302e142a0cbe386d52.tar.gz
edk2-6461344c318cd43a5494c0302e142a0cbe386d52.tar.bz2
edk2-6461344c318cd43a5494c0302e142a0cbe386d52.zip
MdeModulePkg/UsbMass: Fix hot-plug USB CDROM can't be recognized
In below calling stack: UsbBootIsUnitReady() UsbBootExecCmdWithRetry() UsbBootExecCmd() UsbBootRequestSense() When USB CDROM is hot-plugged, UsbBootRequestSense() retrieves sense key (6 = UnitAttention), additional sense code (29h = Power ON). But it wrongly maps such sense data to Device Error status. It causes UsbBootExecCmd() executed again. In the second time call to UsbBootExecCmd(), UsbBootRequestSense() retrieves sense key (6 = UnitAttention), additional sense code (28h = media changed). The above analysis explains why hot-plug USB CDROM cannot be recognized after below commit: SHA1 a662afb5b023a187ef638d3cb0e0c313ad39a7fc * MdeModulePkg/UsbStorage: Fix "map -r" cannot detect media change, which removes the media changed status check in UsbBootDetectMedia(). The proper fix to this problem is to map the ASC (additional sense code 29h) properly to success status so that no second call to UsbBootExecCmd() is made. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Cc: Feng Tian <feng.tian@intel.com>
Diffstat (limited to 'EmbeddedPkg')
0 files changed, 0 insertions, 0 deletions