Canon have posted a product advisory relating to the excellent little 40mm f2.8 STM. It doesn’t seem to affect all the 40mm STM lenses though as I was anable to get my copy to produce the documented issue.
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.
EF40mm f/2.8 STM
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.
Please register your EF 40mm f/2.8 STM. By registering, we will be able to notify you via email when service updates are available.
Customer Support Operations
Canon U.S.A., Inc