Re: [PATCH 1/2] sata_nv: don't use legacy DMA in ADMA mode

2007-11-21 Thread Tejun Heo
Robert Hancock wrote: > Tejun Heo wrote: >> Tejun Heo wrote: >>> If so, can you please add that switching into register mode is okay as >>> long as there's no other ADMA commands in flight and add >>> WARN_ON((qc->flags & ATA_QCFLAG_RESULT_TF) && link->sactive)? >> >> More accurately,

Re: [PATCH 1/2] sata_nv: don't use legacy DMA in ADMA mode

2007-11-21 Thread Tejun Heo
Robert Hancock wrote: Tejun Heo wrote: Tejun Heo wrote: If so, can you please add that switching into register mode is okay as long as there's no other ADMA commands in flight and add WARN_ON((qc-flags ATA_QCFLAG_RESULT_TF) link-sactive)? More accurately, link-sactive test can be

Re: [PATCH 1/2] sata_nv: don't use legacy DMA in ADMA mode

2007-11-20 Thread Robert Hancock
Tejun Heo wrote: Tejun Heo wrote: If so, can you please add that switching into register mode is okay as long as there's no other ADMA commands in flight and add WARN_ON((qc->flags & ATA_QCFLAG_RESULT_TF) && link->sactive)? More accurately, link->sactive test can be substituted with

Re: [PATCH 1/2] sata_nv: don't use legacy DMA in ADMA mode

2007-11-20 Thread Robert Hancock
Tejun Heo wrote: Tejun Heo wrote: If so, can you please add that switching into register mode is okay as long as there's no other ADMA commands in flight and add WARN_ON((qc-flags ATA_QCFLAG_RESULT_TF) link-sactive)? More accurately, link-sactive test can be substituted with

Re: [PATCH 1/2] sata_nv: don't use legacy DMA in ADMA mode

2007-11-14 Thread Tejun Heo
Tejun Heo wrote: > If so, can you please add that switching into register mode is okay as > long as there's no other ADMA commands in flight and add > WARN_ON((qc->flags & ATA_QCFLAG_RESULT_TF) && link->sactive)? More accurately, link->sactive test can be substituted with (ap->qc_allocated & ~(1

Re: [PATCH 1/2] sata_nv: don't use legacy DMA in ADMA mode

2007-11-14 Thread Tejun Heo
Hello, Robert Hancock wrote: > We need to run any DMA command with result taskfile requested in ADMA mode > when the port is in ADMA mode, otherwise it may try to use the legacy DMA > engine > in ADMA mode which is not allowed. Enforce this with BUG_ON() since data > corruption could potentially

Re: [PATCH 1/2] sata_nv: don't use legacy DMA in ADMA mode

2007-11-14 Thread Tejun Heo
Hello, Robert Hancock wrote: We need to run any DMA command with result taskfile requested in ADMA mode when the port is in ADMA mode, otherwise it may try to use the legacy DMA engine in ADMA mode which is not allowed. Enforce this with BUG_ON() since data corruption could potentially

Re: [PATCH 1/2] sata_nv: don't use legacy DMA in ADMA mode

2007-11-14 Thread Tejun Heo
Tejun Heo wrote: If so, can you please add that switching into register mode is okay as long as there's no other ADMA commands in flight and add WARN_ON((qc-flags ATA_QCFLAG_RESULT_TF) link-sactive)? More accurately, link-sactive test can be substituted with (ap-qc_allocated ~(1 qc-tag)).

[PATCH 1/2] sata_nv: don't use legacy DMA in ADMA mode

2007-11-13 Thread Robert Hancock
We need to run any DMA command with result taskfile requested in ADMA mode when the port is in ADMA mode, otherwise it may try to use the legacy DMA engine in ADMA mode which is not allowed. Enforce this with BUG_ON() since data corruption could potentially result if this happened. Signed-off-by:

[PATCH 1/2] sata_nv: don't use legacy DMA in ADMA mode

2007-11-13 Thread Robert Hancock
We need to run any DMA command with result taskfile requested in ADMA mode when the port is in ADMA mode, otherwise it may try to use the legacy DMA engine in ADMA mode which is not allowed. Enforce this with BUG_ON() since data corruption could potentially result if this happened. Signed-off-by: