aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2012-07-10 00:06:08 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-08-24 05:10:24 -0400
commit8d8e7d13146eb6be8b98dbd58ac30421a4f8edf3 (patch)
treed00645c868455e957fc79d61e8bdd07dfe920516 /drivers
parente468dc112f38220ee78bc0de64190eca9812749b (diff)
[SCSI] libsas, ipr: cleanup ata_host flags initialization via ata_host_init
libsas and ipr pass flags to ata_host_init that are meant for the port. ata_host flags: ATA_HOST_SIMPLEX = (1 << 0), /* Host is simplex, one DMA channel per host only */ ATA_HOST_STARTED = (1 << 1), /* Host started */ ATA_HOST_PARALLEL_SCAN = (1 << 2), /* Ports on this host can be scanned in parallel */ ATA_HOST_IGNORE_ATA = (1 << 3), /* Ignore ATA devices on this host. */ flags passed by libsas: ATA_FLAG_SATA = (1 << 1), ATA_FLAG_PIO_DMA = (1 << 7), /* PIO cmds via DMA */ ATA_FLAG_NCQ = (1 << 10), /* host supports NCQ */ The only one that aliases is ATA_HOST_STARTED which is a 'don't care' in the libsas and ipr cases since ata_hosts from these sources are not registered with libata. Reported-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Acked-by: Brian King <brking@us.ibm.com> Acked-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/libata-core.c10
-rw-r--r--drivers/scsi/ipr.c3
-rw-r--r--drivers/scsi/libsas/sas_ata.c5
3 files changed, 4 insertions, 14 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 09657c372d3b..2d479b67d0b4 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -5960,24 +5960,18 @@ int ata_host_start(struct ata_host *host)
5960} 5960}
5961 5961
5962/** 5962/**
5963 * ata_sas_host_init - Initialize a host struct 5963 * ata_sas_host_init - Initialize a host struct for sas (ipr, libsas)
5964 * @host: host to initialize 5964 * @host: host to initialize
5965 * @dev: device host is attached to 5965 * @dev: device host is attached to
5966 * @flags: host flags
5967 * @ops: port_ops 5966 * @ops: port_ops
5968 * 5967 *
5969 * LOCKING:
5970 * PCI/etc. bus probe sem.
5971 *
5972 */ 5968 */
5973/* KILLME - the only user left is ipr */
5974void ata_host_init(struct ata_host *host, struct device *dev, 5969void ata_host_init(struct ata_host *host, struct device *dev,
5975 unsigned long flags, struct ata_port_operations *ops) 5970 struct ata_port_operations *ops)
5976{ 5971{
5977 spin_lock_init(&host->lock); 5972 spin_lock_init(&host->lock);
5978 mutex_init(&host->eh_mutex); 5973 mutex_init(&host->eh_mutex);
5979 host->dev = dev; 5974 host->dev = dev;
5980 host->flags = flags;
5981 host->ops = ops; 5975 host->ops = ops;
5982} 5976}
5983 5977
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 467dc38246f9..dacc784ad2d6 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -8775,8 +8775,7 @@ static int __devinit ipr_probe_ioa(struct pci_dev *pdev,
8775 8775
8776 ioa_cfg = (struct ipr_ioa_cfg *)host->hostdata; 8776 ioa_cfg = (struct ipr_ioa_cfg *)host->hostdata;
8777 memset(ioa_cfg, 0, sizeof(struct ipr_ioa_cfg)); 8777 memset(ioa_cfg, 0, sizeof(struct ipr_ioa_cfg));
8778 ata_host_init(&ioa_cfg->ata_host, &pdev->dev, 8778 ata_host_init(&ioa_cfg->ata_host, &pdev->dev, &ipr_sata_ops);
8779 sata_port_info.flags, &ipr_sata_ops);
8780 8779
8781 ioa_cfg->ipr_chip = ipr_get_chip_info(dev_id); 8780 ioa_cfg->ipr_chip = ipr_get_chip_info(dev_id);
8782 8781
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
index 905ae45133fc..bdb81cda8401 100644
--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -580,10 +580,7 @@ int sas_ata_init(struct domain_device *found_dev)
580 struct ata_port *ap; 580 struct ata_port *ap;
581 int rc; 581 int rc;
582 582
583 ata_host_init(&found_dev->sata_dev.ata_host, 583 ata_host_init(&found_dev->sata_dev.ata_host, ha->dev, &sas_sata_ops);
584 ha->dev,
585 sata_port_info.flags,
586 &sas_sata_ops);
587 ap = ata_sas_port_alloc(&found_dev->sata_dev.ata_host, 584 ap = ata_sas_port_alloc(&found_dev->sata_dev.ata_host,
588 &sata_port_info, 585 &sata_port_info,
589 shost); 586 shost);