[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTikFKr+3Qph+CR40SUV-DCir1v=KBg@mail.gmail.com>
Date: Wed, 8 Jun 2011 13:05:57 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
Cc: cjb@...top.org, linux@....linux.org.uk, patches@...aro.org,
vinod.koul@...el.com, gregkh@...e.de, linux-mmc@...r.kernel.org,
linux-kernel@...r.kernel.org, shawn.guo@...aro.org,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v2 1/3] dmaengine: add new dma API for max_segment_number
On Wed, Jun 8, 2011 at 12:10 AM, FUJITA Tomonori
<fujita.tomonori@....ntt.co.jp> wrote:
> On Tue, 7 Jun 2011 23:56:21 -0700
> Dan Williams <dan.j.williams@...el.com> wrote:
>
>> > The dma parameter restriction could be due to software (HBA drivers,
>> > or subsystem). The value should be whatever the dma device driver says
>> > it is in such case?
>>
>> I'm assuming that the dma driver is taking responsibility for setting
>> this correctly. How would this work otherwise... HBA driver or
>> subsystem queries the dmaengine device and then sets this parameter on
>> its behalf? In other words dmanengine *is* the subsystem, if I am
>> understanding your definition.
>
> Oops, I meant that the subsystem is software layer above
> dmaengine. For example, SCSI subsystem sets the limit of max number of
> sglist entries. That is, it is possible that software layer above
> dmaengine could set dma limit, which is smaller than the limit of
> dmaengine?
>
Perhaps, but this sounds like the reverse of what happens today where
scsi device drivers with knowledge of their own hardware will tell the
midlayer/subsystem the restriction. The change with regard to this
patch is that the scsi device driver (for example) will recognize that
the device it is driving will not be a bus master and will arrange to
allocate a dma channel from dmaengine. When said scsi driver reports
the dma restrictions to the subsystem it will borrow the parameters
from the dma channel, not the scsi device. So yes, I still think it
should be whatever the dma channel says.
Although, you've been doing scsi work longer than I, so maybe I'm
overlooking something...?
Are there any cases today where the subsystem imposes tighter
restrictions on the dma geometry than what the device reports? Even
if that were the case it would be same situation that the scsi device
driver reports maximum parameters, but the subsystem opts for
something tighter. Whether the maximal parameters come from the scsi
device or the dma channel is moot.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists