Commit f7598d2e authored by James Bottomley's avatar James Bottomley

scsi-dma-mask modify for andmike's changes

parent cc3347ed
......@@ -522,6 +522,11 @@ static inline void scsi_set_device(struct Scsi_Host *shost,
shost->host_gendev = dev;
}
static inline struct device *scsi_get_device(struct Scsi_Host *shost)
{
return shost->host_gendev;
}
static inline void scsi_set_pci_device(struct Scsi_Host *shost,
struct pci_dev *pdev)
{
......
......@@ -395,7 +395,7 @@ int scsi_ioctl_send_command(Scsi_Device * dev, Scsi_Ioctl_Command * sic)
static int
scsi_ioctl_get_pci(Scsi_Device * sdev, void *arg)
{
struct device *dev = sdev->host->host_driverfs_dev.parent;
struct device *dev = scsi_get_device(sdev->host);
if (!dev) return -ENXIO;
return copy_to_user(arg, dev->bus_id,
......
......@@ -373,7 +373,7 @@ static void scsi_initialize_merge_fn(struct scsi_device *sd)
{
request_queue_t *q = &sd->request_queue;
struct Scsi_Host *sh = sd->host;
struct device *dev = sh->host_driverfs_dev.parent;
struct device *dev = scsi_get_device(sh);
u64 bounce_limit;
if (sh->highmem_io) {
......
......@@ -3770,7 +3770,7 @@ static int st_attach(Scsi_Device * SDp)
tpnt->try_dio = try_direct_io && !SDp->host->unchecked_isa_dma;
bounce_limit = BLK_BOUNCE_HIGH; /* Borrowed from scsi_merge.c */
if (SDp->host->highmem_io) {
struct device *dev = SDp->host->host_driverfs_dev.parent;
struct device *dev = scsi_get_device(SDp->host);
if (!PCI_DMA_BUS_IS_PHYS)
/* Platforms with virtual-DMA translation
* hardware have no practical limit.
......
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