Do you happen to know the divergence of p, and the projection of p onto the outward pointing normal vector of the boundary of the volume you're solving for p in?
In general, if you know
\nabla \times \mathbf{u} = \mathbf{C}(\mathbf{r})
\nabla \cdot \mathbf{u} = s(\mathbf{r})
and the value of \mathbf{\hat{n}}\cdot \mathbf{u} on the boundary of the volume you're solving in, \partial V, then there is a unique solution for \mathbf{u}. Writing
\mathbf{u} = -\nabla \phi + \nabla \times \mahtbf{A},
then
\phi(\mathbf{r}) = \frac{1}{4\pi}\int d^3\mathbf{r'} \frac{s(\mathbf{r}')}{|\mathbf{r}-\mathbf{r}'|} + \mbox{const.}
\mathbf{A}(\mathbf{r}) = \frac{1}{4\pi}\int d^3\mathbf{r'} \frac{\mathbf{C}(\mathbf{r}')}{|\mathbf{r}-\mathbf{r}'|} + \nabla f(\mathbf{r})