Could you please stop shuffling the deck and play already?
JavaScript (ES6), 44 bytes
Shorter version suggested by @nwellnhof
Expects a deck with 1-indexed cards as input.

f=(a,x=1)=&gt;a[x]-2&amp;&amp;1+f(a,x*2%(a.length-1|1))

Try it online!
Given a deck \$[c_0,\ldots,c_{L-1}]\$ of length \$L\$, we define:
$$x_n=\begin{cases}
2^n\bmod L&amp;\text{if }L\text{ is odd}\\
2^n\bmod (L-1)&amp;\text{if }L\text{ is even}\\
\end{cases}$$
And we look for \$n\$ such that \$c_{x_n}=2\$.

JavaScript (ES6),  57 52  50 bytes
Expects a deck with 0-indexed cards as input.

f=(a,x=1,k=a.length-1|1)=&gt;a[1]-x%k&amp;&amp;1+f(a,x*-~k/2)

Try it online!
How?
Since JS is lacking native support for extracting array slices with a custom stepping, simulating the entire riffle-shuffle would probably be rather costly (but to be honest, I didn't even try). However, the solution can also be found by just looking at the 2nd card and the total number of cards in the deck.
Given a deck of length \$L\$, this code looks for \$n\$ such that:
$$c_2\equiv\left(\frac{k+1}{2}\right)^n\pmod k$$
where \$c_2\$ is the second card and \$k\$ is defined as:
$$k=\begin{cases}
L&amp;\text{if }L\text{ is odd}\\
L-1&amp;\text{if }L\text{ is even}\\
\end{cases}$$