The gamma-ray burst ( GRB ) 050904 at z = 6.3 provides the first opportunity of probing the intergalactic medium ( IGM ) by GRBs at the epoch of the reionization . Here we present a spectral modeling analysis of the optical afterglow spectrum taken by the Subaru Telescope , aiming to constrain the reionization history . The spectrum shows a clear damping wing at wavelengths redward of the Lyman break , and the wing shape can be fit either by a damped Ly \alpha system with a column density of \log ( N _ { HI } / { cm ^ { -2 } } ) \sim 21.6 at a redshift close to the detected metal absorption lines ( z _ { metal } = 6.295 ) , or by almost neutral IGM extending to a slightly higher redshift of z _ { IGM,u } \sim 6.36 . In the latter case , the difference from z _ { metal } may be explained by acceleration of metal absorbing shells by the activities of the GRB or its progenitor . However , we exclude this possibility by using the light transmission feature around the Ly \beta resonance , leading to a firm upper limit of z _ { IGM,u } \leq 6.314 . We then show an evidence that the IGM was largely ionized already at z = 6.3 , with the best-fit neutral fraction of IGM , x _ { HI } = 0.00 , and upper limits of x _ { HI } < 0.17 and 0.60 at 68 and 95 % C.L. , respectively . This is the first direct and quantitative upper limit on x _ { HI } at z > 6 . Various systematic uncertainties are examined , but none of them appears large enough to change this conclusion . To get further information on the reionization , it is important to increase the sample size of z \gtrsim 6 GRBs , in order to find GRBs with low column densities ( \log N _ { HI } \lesssim 20 ) within their host galaxies , and for statistical studies of Ly \alpha line emission from host galaxies .