Re: [RFC][PATCH] move dma_mask into struct device

From: J.E.J. Bottomley (James.Bottomley@SteelEye.com)
Date: Sat Nov 16 2002 - 10:33:44 EST


arndb@de.ibm.com said:
> That does not sound like the right way to me. If you need to have the
> dma_mask for the Scsi_Host, you should store it in Scsi_Host itself. A
> struct device must never know about obscure architecture specific
> stuff like dma.

The SCSI host itself has no need of a DMA mask. What we need the mask for is
to set up the bounce limits for the block queue, we don't actually ever use it
again. Unfortunately, dma_mask isn't architecture specific, its a universal
property of the block queues used to determine when to bounce memory regions.

The dma_mask is a property of the connection of the Scsi_Host to the machine
bus, not of the Scsi_Host itself, so it does properly belong in the generic
device which is used to reflect machine bus attachments.

Think of it this way: we have two struct device's per SCSI host: one for the
actual HBA card or bus attachment, which contains all of the bus specific
pieces, and one for the host itself reflecting the fact that it is a bridge
from the machine bus to the scsi bus.

James

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Nov 23 2002 - 22:00:17 EST