We consider a production-inventory control model with two reflecting boundaries, representing the finite storage capacity and the finite maximum backlog. Demands arrive at the inventory according to a Poisson process, their i.i.d. sizes having a common phase-type distribution. The inventory is filled by a production process, which alternates between two prespecified production rates ρ 1 and ρ 2 : as long as the content level is positive, ρ 1 is applied while the production follows ρ 2 during time intervals of backlog (i.e., negative content). We derive in closed form the various cost functionals of this model for the discounted case as well as under the long-run-average criterion. The analysis is based on a martingale of the Kella-Whitt type and results for fluid flow models due to Ahn and Ramaswami.