Consider the negative externalities of cocaine use (much higher than marijuana's); the healthcare implications and effects on worker productivity are costs that would need to be covered by a heavy tax. That, in turn, would make smuggling profitable.
Legalising cocaine would cause its price to plummet. This would cut into cartels' profits but also spur demand. I'm not sure if I want to walk around the street with people high on bath salts and cocaine. Perhaps in a highly controlled environment? That still leaves a profitable opening for illegal distribution.
For Mexico it makes sense to decriminalise; the United States would bear the cost of use while it could potentially build a viable industry in cocaine processing. It makes similar sense for the US to pressure Mexico to do otherwise up to the expected public cost of higher cocaine use in America.