Very often on this site people ask what background in math is needed to be able to understand quantum mechanics (based on a short search of this site). So that question is answered. However, I want to know what background in PHYSICS itself is needed for QM. I can hardly imagine that a mathematician with no/very little knowledge of physics would be able to grasp QM. So, what background in Physics is needed to be able to understand and appreciate QM to the max?
Nobody should ever venture into QM without a working knowledge of Hamiltonian Mechanics: the meaning of the Poisson brackets with the Hamiltonian has a natural extension in QM Ehrenfest's theorem. Understand classical Liouville's theorem, and you won't be puzzled by the uncertainty relations in QM. Working with the Least Action Principle will prepare your mind for the path integral formulation, although they are not the same thing. The meaning of the Hamiltonian itself...
Of course, electromagnetism and any other branch of physics will help but, compared to Hamiltonian Mechanics, it is secondary.
A solid understanding of the following is sufficient for much of elementary QM:
Classical Hamiltonian mechanics, in particular conservation of energy, momentum, and angular momentum, and the Kepler problem (planet and sun).
Some elementary optics: The wave equation, and how to solve it using the Fourier transform. Superposition principle and interference patterns. Perhaps the derivation of geometric optics from the wave equation.
As you proceed to more advanced QM topics, you need more and more physics, ultimately everything.
A solid understanding of Classical Mechanics and Classical Thermodynamics would be adequate.