张在兴 从蜗牛到大牛 奋斗

最近有个需求是把USB3.0强制转换成USB2.0,,也就是让操作系统把硬件上的3.0识别成2.0 。从网上找到了如下内容,顿时心里暖暖的,特拿来分享一下。

1. Linux下的操作,其中 设备号为 USB3.0 总线设备的设备号,可以通过 lspci -nn | grep xHCI 查出来

It’s possible. It involves changing configuration registers in the xHCI controller, so it’s obviously chipset-specific. This is how it’s done on Linux. I suppose it should be possible to do it on Windows too, but I don’t know what utility to use.

To set both ports to USB 2.0 mode:

sudo setpci -H1 -d 8086:1e31 d8.l=0

Right port 3.0 and left port 2.0:

sudo setpci -H1 -d 8086:1e31 d8.l=1

Right port 2.0 and left port 3.0:

sudo setpci -H1 -d 8086:1e31 d8.l=2

Changing the register at d8 (USB3_PSSEN) sets the ports in USB 2.0 mode, but they are still on the xHCI controller. To switch over to EHCI, you also have to change the register at d0 (XUSB2PR). For example to run both ports off the EHCI contoller you have to do this:

sudo setpci -H1 -d 8086:1e31 d8.l=0

sudo setpci -H1 -d 8086:1e31 d0.l=0

The registers are documented in this datasheet, in section 17.1.

.

2.Windows下

下边这条回复简洁明了

pciutils (lspci, setpci) for Windows are available here:https://eternallybored.org/misc/pciutils/

用法跟上边是一样的。

这样 3.0的口硬生生的就变成2.0的了。

有希望在的地方,痛苦也成欢乐

张在兴 从蜗牛到大牛 奋斗

相关文章:

你感兴趣的文章:

标签云: