  Let $M$ to be a matroid defined on a finite set $E$ and $L\subset E$. $L$ is
locked in $M$ if $M|L$ and $M^*|(E\backslash L)$ are 2-connected, and
$min\{r(L), r^*(E\backslash L)\} \geq 2$. In this paper, we prove that the
nontrivial facets of the bases polytope of $M$ are described by the locked
subsets. We deduce that finding the maximum--weight basis of $M$ is a
polynomial time problem for matroids with a polynomial number of locked
subsets. This class of matroids is closed under 2-sums and contains the class
of uniform matroids, the V\'amos matroid and all the excluded minors of 2-sums
of uniform matroids. We deduce also a matroid oracle for testing uniformity of
matroids after one call of this oracle.
