One way to do the port is to look first at the Plan 9 driver (eg for the sb), then import code from the driver you have as you see it fits. Good luck.