From Canon USA :
To Users of the EF40mm f/2.8 STM Interchangeable Lens for Canon Digital SLR Cameras. Thank you for using Canon products. It has been confirmed that the autofocusing function of the EF40mm f/2.8 STM lens, which was released in June 2012, may not operate correctly.
The details of this phenomenon are described below :
If pressure is applied to the lens barrel while the lens is mounted to the camera (pressure can be applied even while attaching the lens cap or while carrying the camera with the lens attached in a bag), the autofocusing function of the lens may stop working. This phenomenon does not occur during normal shooting. This phenomenon does not result in a malfunction of the lens.
When the above phenomenon occurs, detach and reattach the lens, or remove and reinsert the camera battery to restore the operations.
The firmware to address this phenomenon will be available for download in late August, 2012. Once this firmware is ready, we will make an announcement on our Web site.
This information is for residents of the United States and Puerto Rico only. If you do not reside in the USA or Puerto Rico, please contact the Canon Customer Support Center in your region.