National Electrical Code 2014
Article 250 Grounding and Bonding
II. System Grounding
250.24 Grounding Service-Supplied Alternating-Current Systems.
(A) System Grounding Connections. A premises wiring system supplied by a grounded ac service shall have a grounding electrode conductor connected to the grounded service conductor, at each service, in accordance with 250.24(A)(1) through (A)(5).
(1) General. The grounding electrode conductor connection shall be made at any accessible point from the load end of the overhead service conductors, service drop, underground service conductors, or service lateral to and including the terminal or bus to which the grounded service conductor is connected at the service disconnecting means.
This means that the grounded (neutral) from the service must be connected to ground, and that the connection can be made by bonding the neutral bus bar to the grounding electrode.
(5) Load-Side Grounding Connections. A grounded conductor shall not be connected to normally non–current carrying metal parts of equipment, to equipment grounding conductor(s), or be reconnected to ground on the load side of the service disconnecting means except as otherwise permitted in this article.
This means that the grounded (neutral) conductors should only be grounded at the main service disconnnect.
If the main service panel happens to be the same place that the grounded (neutral) conductor is bonded to the grounding electrode, then there is no problem mixing grounds and neutrals on the same bus bar (as long as there is an appropriate number of conductors terminated under each lug). If the two bus bars are not connected; as would be the case anywhere other than the main disconnect (exceptions exist), then you cannot mix them.
![Service Wiring](https://i.stack.imgur.com/bQQWf.png)
Notice how the grounded, and grounding bus bars are connected in the main service panel. This means that; electrically speaking, they can be considered a single bus bar. Which means that both grounded (neutral), and equipment grounding conductors can be terminated on either bus bar.
In the subpanel, the bus bars are kept separate. So grounded (neutral), and equipment grounding conductors cannot be mixed.
The NEC only requires two ground rods if one doesn't suffice the 25ohms requirement. If an additional ground is installed then a minium of 6' spacing is required between them. The only time the neutrals and grounds are allowed to tie together are in the main disconnect.
To keep the neutrals and grounds separated, a 4 wire should have been used to feed your sub panel.
Best Answer
A main panel (or service entrance panel) is simply a panelboard that contains the main service disconnect for a property -- this can be up to six circuit breakers in a rule-of-six (split bus) panel, but is more commonly a single main circuit breaker or fused disconnect (such as a pullout).
Or in other words: the service from the electrical utility enters the main electrical panel for a property, and all other panels on that property are subpanels, as long as there is not a second utility service or a transformer on the property. There are also other special cases such as multiple section main panels, but they're beyond the scope of this answer.