[RFC][PATCH] move dma_mask into struct device

From: J.E.J. Bottomley (James.Bottomley@steeleye.com)
Date: Fri Nov 15 2002 - 15:34:12 EST


Attached is a patch which moves dma_mask into struct device and cleans up the
scsi mid-layer to use it (instead of using struct pci_dev). The advantage to
doing this is probably most apparent on non-pci bus architectures where
currently you have to construct a fake pci_dev just so you can get the bounce
buffers to work correctly.

The patch tries to perturb the minimum amount of code, so dma_mask in struct
device is simply a pointer to the one in pci_dev. However, it will make it
easy for me now to add generic device to MCA without having to go the fake pci
route.

This patch completely removes knowledge of pci devices from the SCSI mid-layer.

I have compiled and tested this, but obviously, since I have an MCA machine,
it's not of much value to the pci code changes, so if someone with a PCI
machine could check those out, I'd be grateful.

The main problem SCSI has with this is the scsi_ioctl_get_pci which is used to
get the pci slot name. Although, this can be fixed up afterwards with Matthew
Wilcox's name change patch.

I'd like to see this as the beginning of a move away from bus specific code to
using generic device code (where possible). Comments and feedback welcome.

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 : Fri Nov 15 2002 - 22:00:39 EST