(1) It is unlawful for any person knowingly or intentionally to possess cocaine unless the substance was obtained directly from, or pursuant to a valid prescription or order of, a practitioner while acting in the course of professional practice, or except as otherwise authorized by ORS 475.005 to 475.285 and 475.752 to 475.980.
(2)(a) Unlawful possession of cocaine is a drug enforcement misdemeanor punishable as described in ORS 475.896.
(b) Notwithstanding paragraph (a) of this subsection, unlawful possession of cocaine is a Class A misdemeanor if the person possesses two grams or more of a mixture or substance containing a detectable amount of cocaine.
(c) Notwithstanding paragraphs (a) and (b) of this subsection, unlawful possession of cocaine is a Class C felony if:
(A) The possession is a commercial drug offense under ORS 475.900 (1)(b); or
(B) The person possesses a substantial quantity under ORS 475.900 (3)(b).