===== drivers/pci/probe.c 1.17 vs edited ===== --- 1.17/drivers/pci/probe.c Fri Nov 1 12:33:02 2002 +++ edited/drivers/pci/probe.c Fri Nov 15 14:00:46 2002 @@ -449,6 +449,7 @@ /* now put in global tree */ strcpy(dev->dev.name,dev->name); strcpy(dev->dev.bus_id,dev->slot_name); + dev->dev->dma_mask = &dev->dma_mask; device_register(&dev->dev); return dev; ===== drivers/scsi/hosts.h 1.36 vs edited ===== --- 1.36/drivers/scsi/hosts.h Thu Nov 14 13:07:27 2002 +++ edited/drivers/scsi/hosts.h Fri Nov 15 14:43:59 2002 @@ -468,10 +468,10 @@ unsigned int max_host_blocked; /* - * For SCSI hosts which are PCI devices, set pci_dev so that - * we can do BIOS EDD 3.0 mappings + * This is a pointer to the generic device for this host (i.e. the + * device on the bus); */ - struct pci_dev *pci_dev; + struct device *dev; /* * Support for driverfs filesystem @@ -521,11 +521,17 @@ shost->host_lock = lock; } +static inline void scsi_set_device(struct Scsi_Host *shost, + struct device *dev) +{ + shost->dev = dev; + shost->host_driverfs_dev.parent = dev; +} + static inline void scsi_set_pci_device(struct Scsi_Host *shost, struct pci_dev *pdev) { - shost->pci_dev = pdev; - shost->host_driverfs_dev.parent=&pdev->dev; + scsi_set_device(shost, &pdev->dev); } ===== drivers/scsi/scsi_ioctl.c 1.12 vs edited ===== --- 1.12/drivers/scsi/scsi_ioctl.c Thu Oct 17 13:52:39 2002 +++ edited/drivers/scsi/scsi_ioctl.c Fri Nov 15 14:08:19 2002 @@ -396,9 +396,9 @@ scsi_ioctl_get_pci(Scsi_Device * dev, void *arg) { - if (!dev->host->pci_dev) return -ENXIO; - return copy_to_user(arg, dev->host->pci_dev->slot_name, - sizeof(dev->host->pci_dev->slot_name)); + if (!dev->host->dev) return -ENXIO; + return copy_to_user(arg, dev->host->dev->name, + sizeof(dev->host->dev->name)); } ===== drivers/scsi/scsi_scan.c 1.35 vs edited ===== --- 1.35/drivers/scsi/scsi_scan.c Thu Nov 14 12:34:35 2002 +++ edited/drivers/scsi/scsi_scan.c Fri Nov 15 14:25:41 2002 @@ -436,8 +436,8 @@ u64 bounce_limit; if (sh->highmem_io) { - if (sh->pci_dev && PCI_DMA_BUS_IS_PHYS) { - bounce_limit = sh->pci_dev->dma_mask; + if (sh->dev && sh->dev->dma_mask && PCI_DMA_BUS_IS_PHYS) { + bounce_limit = *sh->dev->dma_mask; } else { /* * Platforms with virtual-DMA translation ===== drivers/scsi/st.c 1.42 vs edited ===== --- 1.42/drivers/scsi/st.c Mon Nov 11 03:32:34 2002 +++ edited/drivers/scsi/st.c Fri Nov 15 14:25:58 2002 @@ -3786,8 +3786,8 @@ * hardware have no practical limit. */ bounce_limit = BLK_BOUNCE_ANY; - else if (SDp->host->pci_dev) - bounce_limit = SDp->host->pci_dev->dma_mask; + else if (SDp->host->dev && SDp->host->dev->dma_mask) + bounce_limit = *SDp->host->dev->dma_mask; } else if (SDp->host->unchecked_isa_dma) bounce_limit = BLK_BOUNCE_ISA; bounce_limit >>= PAGE_SHIFT; ===== include/linux/device.h 1.58 vs edited ===== --- 1.58/include/linux/device.h Thu Oct 31 15:25:58 2002 +++ edited/include/linux/device.h Fri Nov 15 13:52:55 2002 @@ -300,6 +300,7 @@ being off. */ unsigned char *saved_state; /* saved device state */ + u64 *dma_mask; /* dma mask (if dma'able device) */ void (*release)(struct device * dev); };