[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <45344F4D.6070703@shaw.ca>
Date: Mon, 16 Oct 2006 21:34:37 -0600
From: Robert Hancock <hancockr@...w.ca>
To: Jens Axboe <jens.axboe@...cle.com>
Cc: Allen Martin <AMartin@...dia.com>, Jeff Garzik <jeff@...zik.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
linux-ide@...r.kernel.org, prakash@...noor.de
Subject: [PATCH] sata_nv ADMA/NCQ support for nForce4
Jens Axboe wrote:
>> I think that should be feasible.. However, one problem is that
>> slave_config only has access to the struct scsi_device and the
>> ata_scsi_find_dev function to turn that into a struct ata_device isn't
>> exported, which it would need to be in order to do anything useful
>> inside the driver for slave_config. We could export it, or I suppose the
>> other place we could do this handling would be postreset, as at that
>> point we should know what kind of device is attached.. any comments?
>
> What else do you need? From the scsi device, call the
> blk_queue_bounce_limit() on the queue tored in there. That shold be it.
>
>> Also, how is the driver supposed to be setting the DMA mask for the SCSI
>> device? I suppose blk_queue_bounce_limit would work, but it seems a bit
>> odd to use block layer calls at the libata driver level.
>
> That is the right thing to do.
>
>> I also noticed that I'm still using the default 64KB libata dma_boundary
>> value, this should be 4GB for ADMA mode (but fixed up back to the
>> default if an ATAPI device is connected, same as with the DMA mask).
>
> You can set that from the same location as the bounce limit.
OK, I've cut another patch (v4) which incorporates the auto-setting of
the lower bounce limit and segment boundary when an ATAPI device is
connected to the port. ATAPI was not actually tested as I don't have any
ATAPI SATA devices. I also cleaned up a few other things such as
handling failure to set the 64-bit DMA mask as well as using
ata_port_printk where appropriate.
I think this resolves all of the outstanding comments and known issues..
as before, commenters, testers, and mergers are welcome :-)
This patch is against 2.6.19-rc2.
---
This patch adds support for ADMA mode on NVIDIA nForce4 (CK804/MCP04)
SATA controllers to the sata_nv driver. Benefits of ADMA mode include:
-NCQ support
-Reduced CPU overhead (controller DMAs command information from memory
instead of them being pushed in by the CPU)
-Full 64-bit DMA support
ADMA mode is disabled by default in this version. To enable ADMA on
supported controllers, set the module parameter adma_enabled=1.
Signed-off-by: Robert Hancock <hancockr@...w.ca>
--
Robert Hancock Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@...pamshaw.ca
Home Page: http://www.roberthancock.com/
View attachment "sata_nv-adma-ncq-v4.patch" of type "text/plain" (32001 bytes)
Powered by blists - more mailing lists