Re: [PATCH] aic94xx: fix SMP request DMA direction

Darrick J. Wong
2007-09-30T07:13:25Z

On Sat, Sep 29, 2007 at 02:25:33AM -0400, Jeff Garzik wrote:
> Muli Ben-Yehuda wrote:
>> On Fri, Sep 28, 2007 at 04:55:34PM -0700, Darrick J. Wong wrote:
>>> On Thu, Sep 27, 2007 at 10:33:41PM -0400, Jeff Garzik wrote:
>>>> Unless I'm missing something, the SMP request goes /to/ the PCI device
>>>> :)
>>>>
>>>> Signed-off-by: Jeff Garzik <jeff@garzik.org>
>>> ACK; builds ok and SMP commands seem to work ok (not that they
>>> didn't before).
>> Could this explain some weirdness we were seeing with aic94xx and
>> Calgary/CalIOC2 enabled, or are SMP commands not likely to be used in
>> normal operation? We map the IOMMU entries differently for FROMDEVICE
>> (RW) and TODEVICE(RO).
>
> SMP == scsi management == not used during normal data transfer.
>
> It could certainly explain flakiness if you have expanders, though

Actually, SMP commands are used during device discovery to find things
attached to expanders, so it seems likely that "it blows up almost
immediately after loading the module" symptoms are a result of this bug.

That said, the bug that Jeff fixed resulted in extra permissions (+w)
being set for the SMP request buffer, so that's probably why I've never
seen any problems manifesting on x260/x3800 systems.

(Unless the CalIOC2 has a write only mode?)

--D