Pompey exited the Papa John's Trophy with a loss to Cambridge in the last 16.
The 2-1 reverse means it is their opponents who will be travelling to Rotherham later this month in the quarter-finals.
Harvey Knibbs struck twice for the hosts early in the second half, while Michael Jacobs responded for Danny Cowley's men.