Commit 8ab1bc19 authored by James Bottomley's avatar James Bottomley

move dma_mask into struct device

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.
parent fc983daf
......@@ -448,6 +448,7 @@ struct pci_dev * __devinit pci_scan_device(struct pci_dev *temp)
/* now put in global tree */
strcpy(dev->dev.bus_id,dev->slot_name);
dev->dev.dma_mask = &dev->dma_mask;
device_register(&dev->dev);
return dev;
......
......@@ -303,6 +303,7 @@ struct device {
being off. */
unsigned char *saved_state; /* saved device state */
u64 *dma_mask; /* dma mask (if dma'able device) */
void (*release)(struct device * dev);
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment