Implement "old_encode_dev()" for the LinuxKPI.
Obtained from: kmacy @ MFC after: 1 week Sponsored by: Mellanox Technologies