I'm pleased to announce that the eXtensible Host Controller Interface (xHCI) 1.0 specification is now publicly available on intel.com. This is the specification for the PC hardware that talks to all your USB 3.0, USB 2.0, and USB 1.1 devices. (Yes, there are no more companion controllers, xHCI is the one host controller to rule them all).
Open, public documentation is always important to the open source community. Now that the spec is open, anyone can fully understand my Linux xHCI driver (although it's currently only compliant to the 0.96 xHCI spec; anyone want to help fix that?). This also means the BSD developers can implement their own xHCI driver.
Curious what a TRB or a Set TR Deq Ptr command is? Want to know how device contexts or endpoint rings work? Go read the spec!
A while back I posted a Netconsole tutorial for how to capture Linux kernel debugging messages from a crashing machine. I've refined the instructions down to three scripts and three commands, which are after the break.
My Linux Conference AU slides are now posted on my server. The USB 3.0 talk went really well, and I look forward to sharing it when the LCA videos go up in the next couple weeks.
LCA was a total blast! The speakers were wonderful, and I really felt integrated into the conference and social events by the techie women of LCA. Thank you to Sara, Jo, Jacinta, Liz, and all the other Haecksen of LCA2010!
The only downside is the weather. It's really quite rainy here, although it's 10-15 degrees warmer than Portland. I think Jamey and I are going to skip the Tongariro Crossing and go straight to the glow worm caves at Te Kuiti/Waitmo. At least we'll be in a cave while it's raining!
tap tap Is this thing on?
Choose your excuse:
I haven't posted in about six months, because
e. I'm lazy.
What's next for me?
I'm presenting about Linux USB 3.0 support at Linux Conf AU 2010. If you're going to LCA next week, you can check out my talk at Friday at 10:30am in the Ilott Theatre. I'll have a USB 3.0 demo for the brave souls that make it to morning talks. ^_^ If you miss it due to being hung over or not being able to attend LCA, I believe they'll be video taping it.
LCA is being held in Wellington, New Zealand, this year. Jamey and I are going bike camping for two weeks afterwards. As Martin Short put it, "I planned a spontaneous adventure." Let's hope Captain Ron doesn't screw it up. ;)
Any suggestions of cool things to see on the North Island? We're probably going to National Park, Te Kuite, Auckland, and the Coromandel Peninsula. Anything else in that general area?
This documents my personal flow for downloading and installing a Linux kernel with my xHCI and USB 3.0 code. Until the code is in the upstream kernel and shipping in Linux distributions, you'll have to follow these directions to get Linux USB 3.0 support.
The xHCI (USB 3.0) host controller driver and initial support for USB 3.0 devices is now publicly available on my kernel.org git tree. Greg K-H has queued the patches for 2.6.31, so Linux users should have official USB 3.0 support around September 2009. This is impeccable timing, since NEC recently announced they'll be producing 1 million xHCI PCI express add-in cards in September.
This means that Linux will be the first operating system with official USB 3.0 support. I'm working with Keve Gabbert (the OSV person in my group at Intel) to make sure that Linux distributions like Ubuntu and Red Hat pick up the xHCI driver. Advanced users can always compile their own kernel on a standard distro install.
I hope that some USB 3.0 vendors who have prototypes will test with my driver. Instructions on how to compile a kernel using my git tree will follow.
This is a giant project that I've been working on for the past year and a half. It's gratifying to see the code finally released, and exciting to know that hardware is on its way.
Netconsole is a powerful Linux kernel debugging tool. The dmesg output from a machine under test is transferred over an ethernet link (via UDP packets) to another machine. That means that you can see the debugging messages from the test machine on the screen of another machine. Netconsole isn't good for debugging early kernel panics, but it is very useful if your new kernel driver hangs your system.
I used it to debug an oops in the xHCI driver that was caused by a NULL pointer access in a kernel linked list -- I should have used list_empty(). It took four hours to get netconsole working, even with three people who were clueful about Linux. (A big thank you goes out to Jamey Sharp and Josh Triplett for their help with this.)
At the time, there was no good tutorial that talked about all the basics and gotchas, so I decided to create one. This tutorial walks you through configuring both machines to be on the same network subnet, configuring the target machine to listen to UDP packets from the source, and configuring the source to send the kernel debugging messages over UDP.
UPDATE: My latest scripts for setting up Netconsole are here.
USB is getting a facelift!
In the beginning, there was USB 1.1, with the "low speed" and "full speed" devices (at 1 Mbps and 12 Mbps, respectively). Then USB 2.0 came along with "high speed" devices that ran at 480 Mbps. Now the new USB 3.0 bus specification defines "SuperSpeed" devices that run at 5 Gbps (5,120 Mbps).
Now that the bus specification is public, I can finally talk about the code I've been developing at work. I've been writing a Linux driver for xHCI (the new USB 3.0 host controller), and changing the Linux kernel stack to support USB 3.0 devices. On November 17th, I got to demo my work at the world's first USB 3.0 "SuperSpeed" Developers Conference.
This is a demo showing a USB 3.0 Mass Storage Device (commonly called a USB drive, thumb drive, or flash drive) prototype running under Linux with an unmodified Mass Storage Device driver. My Linux xHCI driver is necessary to communicate with the USB 3.0 device through the xHCI host controller prototype. The FPGA prototype was provided by Fresco Logic, a company that sells host controller and device IP.
The demo showed speeds that were about 3.5 times faster than USB 2.0 high speed devices. I expect this demo to be even faster when the device and host controller are implemented in silicon.
Details about USB 3.0
USB 3.0 is 10 times faster than USB 2.0. Roughly speaking, it means that a file that takes 30 minutes to transfer over USB 2.0 could take 3 minutes to transfer under USB 3.0.
USB 3.0 also provides better power management, which translates to longer laptop battery life. USB 3.0 is backwards compatible. That means you can plug all your USB 2.0 devices into a USB 3.0 port, or plug your USB 3.0 device into a USB 2.0 port. The USB 3.0 device will work at USB 2.0 speeds in the latter case, but that means consumers don't have to upgrade their PC or laptop to use USB 3.0 devices at the slower speed.
For the past couple of months, I've been helping organize a student mini-conference for LPC, which will take place on September 16th. So far we only have 9 people registered for student day. We would like at least 15 students to make the student mini-conference a full-day event, and this week is the deadline for conference organizers to decide whether they need to scale back.
Why is this event cool? As one project manager at IBM's Linux Technology Center said, "I would have killed for an experience like this as an undergrad. Students get to talk one-on-one with open source developers for a whole day, and then they get to go to Linux Plumbers Conference too! How could you pass that up?"
To some students, it may sound daunting. A whole conference full of professional open source developers? I was nervous when I went to my first Linux conference too. It was a small conference called FreedomHEC. I was really shy, but I (a lowly undergrad at Portland State) got to talk to Greg Kroah-Hartman (subsystem maintainer for USB and PCI) face to face. That's when I realized that open source developers are people too, and I could actually, like, talk to them.
Student registration is $50. (My friend Brandon, when asked if $50 was too expensive for students, said, "$50 is a new video game or a really hot Friday night date. It's not that much.") Registration is open to part-time and full-time undergraduates and graduate students, along with advanced high school students. (Trust me on the registration requirements, some portions of the LPC site haven't been updated with the new requirements yet.)
So you have no excuse not to attend! If you have any questions, feel free to email me personally. Otherwise, go register!
Over the past week, I've run into two different people who expressed the same thought, "Linux lacks support for a lot of devices." I told them that this was a myth, and the Linux Driver Project has proven it is a myth.
Today I had an idea for a way to dispel this myth. I think someone should post a video of them walking into Circuit City, buying a random device, and walking out to their car. The video shows them configuring it on a Linux box and testing it. Then they would return the device and buy a new device. Buy, configure, return; repeat as necessary. The devices and configuration notes could be posted on the Linux Drivers Project wiki.
Now to find a decent videographer, buy a GSM data phone plan (for downloading packages and drivers in the car), and find some funding for devices that are non-returnable. In my copious spare time, of course.
What is USB 3.0?
USB 3.0 is a new Universal Serial Bus specification that was released in November 2008. It promises wire speeds of 5Gbps, bi-directional communication, and better power management.
What is xHCI?
The eXtensible Host Controller Interface (xHCI) is the hardware on your PC that talks to USB 3.0 devices and legacy USB devices. The xHCI specification details can be found on Intel's website.
Wasn't USB 2.0 good enough? Why is USB 3.0 cool?
USB 3.0 is expected to be 10 times faster than USB 2.0. It's also more power efficient, which translates into longer laptop battery life. Since USB 3.0 packets are routed instead of broadcast, idle links can be automatically put into low power states without the help of an operating system. USB 3.0 also adds the concept of endpoint "streams", which are used to submit multiple SCSI commands and get better performance out of USB attached SCSI hard drives and flash drives.
What about all my old USB devices?
Older USB devices will still work when you plug them into a USB 3.0 port on an xHCI host controller. They will still operate at their original speeds.
Can I plug a USB 3.0 device into my old computer?
If you plug a USB 3.0 device into an EHCI host controller, it will work at USB 2.0 speeds. To get 5Gbps wire speed, you need an xHCI host controller.
USB 3.0 sounds pretty cool. When will Linux support it?
The Linux xHCI driver has been merged into 2.6.31. The git development tree for the driver can be found on kernel.org
Is there any mailing list for xhci driver related discussions?
You can subscribe to the linux-usb mailing list at http://www.linux-usb.org/mailing.html I'll also post updates on my blog.
I found a bug in the xHCI driver. What should I do?
Enable xHCI debugging in your kernel (
CONFIG_USB_XHCI_HCD_DEBUGGING) and send
your dmesg output to firstname.lastname@example.org. Please CC the Linux USB
mailing list email@example.com.
You didn't answer my question; where can I find more info?
See a longer blog post for more information.