There was a drug dealing charge. With the gun charge there was also resisting arrest. He was tased during the gun incident and still resisted.
The drug dealing charge, which even Mesehrle's attorneys admitted they had not confirmed the details, seems to have been minor and unrelated to the prison sentence, which was really about one thing and one thing only: Grant broke California's draconian gun control laws.