Re: [PATCH 1/5] add dma_max_segment_size option to scsi_host_template

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



FUJITA Tomonori wrote:
This patch moves blk_queue_max_segment_size to scsi_alloc_queue from
llds. It enables scsi_add_host to tells iommu lld's
dma_max_segment_size. If a low-level driver doesn't specify
dma_max_segment_size, scsi-ml uses 65536 (MAX_SEGMENT_SIZE). So there
are not any functional changes.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx>
---
 drivers/scsi/hosts.c     |    5 +++++
 drivers/scsi/scsi_lib.c  |    1 +
 include/scsi/scsi_host.h |    6 ++++++
 3 files changed, 12 insertions(+), 0 deletions(-)

hmmmmm... All the patches look technically correct, but IMO this really should behave more the the dma_mask interface: platform sets a sane dma_mask (usually 0xffffffff), and LLDD calls dma_set_mask() or pci_set_dma_mask().

Thus, IMO an LLDD should call dma_set_max_seg(), and then SCSI midlayer can obtain that value from struct device.

Just like dma_mask, I think we can avoid a scsi_host_template addition.

I echo Jens sentiment, though, in closing: thanks for doing this work, it's been needed for quite a while.

	Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux