Does the feeder from the main panel have four wires (black/hot, red/hot, white/neutral, green/ground)? If so, it's straightforward: just buy a ground terminal block for your subpanel, kill power, install the block, and move the grounds (and the ground from the feeder) to it. If you don't have...