Re: 2.6.23-mm1

Torsten Kaiser
2007-10-13T14:40:49Z

On 10/13/07, Torsten Kaiser <just.for.lkml@googlemail.com> wrote:
> On 10/13/07, Jeff Garzik <jeff@garzik.org> wrote:
> > Torsten Kaiser wrote:
> > > Comparing sata_nv.c from 2.6.23-rc8-mm1 and 2.6.23-mm1 I see two
> > > changes, that look suspicious:
> > >
> > > http://git.kernel.org/?p=linux/kernel/git/jgarzik/libata-dev.git;a=commitdiff;h=31cc23b34913bc173680bdc87af79e551bf8cc0d
> > >
> > > The comment says: "ahci and sata_sil24 are converted to use ata_std_qc_defer()."
> > > But the patch also adds ".qc_defer = ata_std_qc_defer," to sata_nv.c
>
> Looking more at this patch, I thing the code change is correct and
> only the comment is missing sata_nv. (Only ahci, sil24 and nv seem to
> use NCQ und so need the logic from qc_defer)

Wait!

I think I found the bug: Its a evil interaction between the above
patch and the swncq patch that is applied later.
The qc_defer patch removes the old ata_scmd_need_defer that was always
called for all drivers and substitutes it for ata_std_qc_defer and
adds it as aops->qc_defer to all drivers that support NCQ *at that
point*.
Then the swncq patch adds a new NCQ capable driver, but the nobody
added the qc_defer-ops to the ops-structure that is added. So swncq
will never defer any commands and the first command that would need to
be defered (the SMART commands) blows up, if there is still another
command in flight.

I will only add the qc_defer and try this...

Torsten