upgraded all changes but also ported back to Linux 3.0.x