Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16ea0fc9 authored by Alan Cox's avatar Alan Cox Committed by Jeff Garzik
Browse files

libata: Pass host flags into the pci helper



This allows parallel scan and the like to be set without having to stop
using the existing full helper functions. This patch merely adds the argument
and fixes up the callers. It doesn't undo the special cases already in the
tree or add any new parallel callers.

Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent cb6643e1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -155,7 +155,7 @@ static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_id
			return rc;
		pcim_pin_device(dev);
	}
	return ata_pci_sff_init_one(dev, ppi, &generic_sht, NULL);
	return ata_pci_sff_init_one(dev, ppi, &generic_sht, NULL, 0);
}

static struct pci_device_id ata_generic[] = {
+4 −2
Original line number Diff line number Diff line
@@ -3037,6 +3037,7 @@ EXPORT_SYMBOL_GPL(ata_pci_sff_activate_host);
 *	@ppi: array of port_info, must be enough for two ports
 *	@sht: scsi_host_template to use when registering the host
 *	@host_priv: host private_data
 *	@hflag: host flags
 *
 *	This is a helper function which can be called from a driver's
 *	xxx_init_one() probe function if the hardware uses traditional
@@ -3058,7 +3059,7 @@ EXPORT_SYMBOL_GPL(ata_pci_sff_activate_host);
 */
int ata_pci_sff_init_one(struct pci_dev *pdev,
		 const struct ata_port_info * const *ppi,
			 struct scsi_host_template *sht, void *host_priv)
		 struct scsi_host_template *sht, void *host_priv, int hflag)
{
	struct device *dev = &pdev->dev;
	const struct ata_port_info *pi = NULL;
@@ -3093,6 +3094,7 @@ int ata_pci_sff_init_one(struct pci_dev *pdev,
	if (rc)
		goto out;
	host->private_data = host_priv;
	host->flags |= hflag;

	pci_set_master(pdev);
	rc = ata_pci_sff_activate_host(host, ata_sff_interrupt, sht);
+1 −1
Original line number Diff line number Diff line
@@ -259,7 +259,7 @@ static int pacpi_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
			return rc;
		pcim_pin_device(pdev);
	}
	return ata_pci_sff_init_one(pdev, ppi, &pacpi_sht, NULL);
	return ata_pci_sff_init_one(pdev, ppi, &pacpi_sht, NULL, 0);
}

static const struct pci_device_id pacpi_pci_tbl[] = {
+1 −1
Original line number Diff line number Diff line
@@ -583,7 +583,7 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
	        	ppi[0] = &info_20_udma;
	}

	return ata_pci_sff_init_one(pdev, ppi, &ali_sht, NULL);
	return ata_pci_sff_init_one(pdev, ppi, &ali_sht, NULL, 0);
}

#ifdef CONFIG_PM
+1 −1
Original line number Diff line number Diff line
@@ -574,7 +574,7 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
	}

	/* And fire it up */
	return ata_pci_sff_init_one(pdev, ppi, &amd_sht, hpriv);
	return ata_pci_sff_init_one(pdev, ppi, &amd_sht, hpriv, 0);
}

#ifdef CONFIG_PM
Loading