diff options
author | Li Jun <b47624@freescale.com> | 2014-10-16 22:17:56 +0800 |
---|---|---|
committer | Li Jun <jun.li@freescale.com> | 2015-05-28 16:58:25 +0800 |
commit | ab2077c338933d0c4ec14c20ba1a53af8fd20c92 (patch) | |
tree | 33efd51c3fc5df0d436cd85289946bc58ac24bd8 | |
parent | 35d462f9c4189ea68a0ea408a7c556af34afee30 (diff) |
MLK-9617-19 usb: otg: test: show warning message for unsupported otg test dev
According to "USB On-The-Go and Embedded Host Automated Compliance Plan Version
1.2", chapter 6.7.23, unknown Device Not Supporting HNP:'Unsupported Device';
chapter 6.7.24 unknown Device Supporting HNP: 'Device No Response'
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit 32df700386fff1d1eef90007604055f1d013aaf3)
-rw-r--r-- | drivers/usb/core/otg_whitelist.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/usb/core/otg_whitelist.h b/drivers/usb/core/otg_whitelist.h index 1703d9a958b4..7dc37a34f7d4 100644 --- a/drivers/usb/core/otg_whitelist.h +++ b/drivers/usb/core/otg_whitelist.h @@ -82,6 +82,19 @@ static int is_targeted(struct usb_device *dev) le16_to_cpu(dev->descriptor.idProduct) == 0xbadd)) return 0; + /* Unknown Device Not Supporting HNP */ + if ((le16_to_cpu(dev->descriptor.idVendor) == 0x1a0a && + le16_to_cpu(dev->descriptor.idProduct) == 0x0201)) { + dev_warn(&dev->dev, "Unsupported Device\n"); + return 0; + } + /* Unknown Device Supporting HNP */ + if ((le16_to_cpu(dev->descriptor.idVendor) == 0x1a0a && + le16_to_cpu(dev->descriptor.idProduct) == 0x0202)) { + dev_warn(&dev->dev, "Device no Responding\n"); + return 0; + } + /* NOTE: can't use usb_match_id() since interface caches * aren't set up yet. this is cut/paste from that code. */ |