If the mouse and the keyboard are not working anymore after upgrading the xorg-server, you have probably forgot to rebuild the xorg-drivers. On a gentoo box find the drivers with:
qlist -I xorg-drivers
Emerge the the drivers on the list.
e.g.:
emerge -v1 x11-drivers/xf86-input-evdev x11-drivers/nvidia-drivers