You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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: Alan Cox <alan@linux.intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This commit is contained in:
@@ -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[] = {
|
||||
|
||||
@@ -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
|
||||
@@ -3057,8 +3058,8 @@ EXPORT_SYMBOL_GPL(ata_pci_sff_activate_host);
|
||||
* Zero on success, negative on errno-based value on error.
|
||||
*/
|
||||
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)
|
||||
const struct ata_port_info * const *ppi,
|
||||
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);
|
||||
|
||||
@@ -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[] = {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -421,7 +421,7 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
|
||||
BUG_ON(ppi[0] == NULL);
|
||||
|
||||
return ata_pci_sff_init_one(pdev, ppi, &artop_sht, NULL);
|
||||
return ata_pci_sff_init_one(pdev, ppi, &artop_sht, NULL, 0);
|
||||
}
|
||||
|
||||
static const struct pci_device_id artop_pci_tbl[] = {
|
||||
|
||||
@@ -237,7 +237,7 @@ static int atiixp_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
if (!pci_test_config_bits(pdev, &atiixp_enable_bits[i]))
|
||||
ppi[i] = &ata_dummy_port_info;
|
||||
|
||||
return ata_pci_sff_init_one(pdev, ppi, &atiixp_sht, NULL);
|
||||
return ata_pci_sff_init_one(pdev, ppi, &atiixp_sht, NULL, 0);
|
||||
}
|
||||
|
||||
static const struct pci_device_id atiixp[] = {
|
||||
|
||||
@@ -223,7 +223,7 @@ static int cmd640_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
|
||||
cmd640_hardware_init(pdev);
|
||||
|
||||
return ata_pci_sff_init_one(pdev, ppi, &cmd640_sht, NULL);
|
||||
return ata_pci_sff_init_one(pdev, ppi, &cmd640_sht, NULL, 0);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
@@ -367,7 +367,7 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
pci_write_config_byte(pdev, UDIDETCR0, 0xF0);
|
||||
#endif
|
||||
|
||||
return ata_pci_sff_init_one(pdev, ppi, &cmd64x_sht, NULL);
|
||||
return ata_pci_sff_init_one(pdev, ppi, &cmd64x_sht, NULL, 0);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
@@ -324,7 +324,7 @@ static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
ppi[1] = &info_palmax_secondary;
|
||||
|
||||
/* Now kick off ATA set up */
|
||||
return ata_pci_sff_init_one(pdev, ppi, &cs5530_sht, NULL);
|
||||
return ata_pci_sff_init_one(pdev, ppi, &cs5530_sht, NULL, 0);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
@@ -198,7 +198,7 @@ static int cs5535_init_one(struct pci_dev *dev, const struct pci_device_id *id)
|
||||
rdmsr(ATAC_CH0D1_PIO, timings, dummy);
|
||||
if (CS5535_BAD_PIO(timings))
|
||||
wrmsr(ATAC_CH0D1_PIO, 0xF7F4F7F4UL, 0);
|
||||
return ata_pci_sff_init_one(dev, ppi, &cs5535_sht, NULL);
|
||||
return ata_pci_sff_init_one(dev, ppi, &cs5535_sht, NULL, 0);
|
||||
}
|
||||
|
||||
static const struct pci_device_id cs5535[] = {
|
||||
|
||||
@@ -260,7 +260,7 @@ static int cs5536_init_one(struct pci_dev *dev, const struct pci_device_id *id)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
return ata_pci_sff_init_one(dev, ppi, &cs5536_sht, NULL);
|
||||
return ata_pci_sff_init_one(dev, ppi, &cs5536_sht, NULL, 0);
|
||||
}
|
||||
|
||||
static const struct pci_device_id cs5536[] = {
|
||||
|
||||
@@ -138,7 +138,7 @@ static int cy82c693_init_one(struct pci_dev *pdev, const struct pci_device_id *i
|
||||
if (PCI_FUNC(pdev->devfn) != 1)
|
||||
return -ENODEV;
|
||||
|
||||
return ata_pci_sff_init_one(pdev, ppi, &cy82c693_sht, NULL);
|
||||
return ata_pci_sff_init_one(pdev, ppi, &cy82c693_sht, NULL, 0);
|
||||
}
|
||||
|
||||
static const struct pci_device_id cy82c693[] = {
|
||||
|
||||
@@ -262,7 +262,7 @@ static int efar_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
dev_printk(KERN_DEBUG, &pdev->dev,
|
||||
"version " DRV_VERSION "\n");
|
||||
|
||||
return ata_pci_sff_init_one(pdev, ppi, &efar_sht, NULL);
|
||||
return ata_pci_sff_init_one(pdev, ppi, &efar_sht, NULL, 0);
|
||||
}
|
||||
|
||||
static const struct pci_device_id efar_pci_tbl[] = {
|
||||
|
||||
@@ -361,7 +361,7 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
|
||||
break;
|
||||
}
|
||||
/* Now kick off ATA set up */
|
||||
return ata_pci_sff_init_one(dev, ppi, &hpt36x_sht, hpriv);
|
||||
return ata_pci_sff_init_one(dev, ppi, &hpt36x_sht, hpriv, 0);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
@@ -987,7 +987,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
|
||||
}
|
||||
|
||||
/* Now kick off ATA set up */
|
||||
return ata_pci_sff_init_one(dev, ppi, &hpt37x_sht, private_data);
|
||||
return ata_pci_sff_init_one(dev, ppi, &hpt37x_sht, private_data, 0);
|
||||
}
|
||||
|
||||
static const struct pci_device_id hpt37x[] = {
|
||||
|
||||
@@ -548,7 +548,7 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id)
|
||||
outb(inb(iobase + 0x9c) | 0x04, iobase + 0x9c);
|
||||
|
||||
/* Now kick off ATA set up */
|
||||
return ata_pci_sff_init_one(dev, ppi, &hpt3x2n_sht, hpriv);
|
||||
return ata_pci_sff_init_one(dev, ppi, &hpt3x2n_sht, hpriv, 0);
|
||||
}
|
||||
|
||||
static const struct pci_device_id hpt3x2n[] = {
|
||||
|
||||
@@ -273,7 +273,7 @@ static int it8213_init_one (struct pci_dev *pdev, const struct pci_device_id *en
|
||||
dev_printk(KERN_DEBUG, &pdev->dev,
|
||||
"version " DRV_VERSION "\n");
|
||||
|
||||
return ata_pci_sff_init_one(pdev, ppi, &it8213_sht, NULL);
|
||||
return ata_pci_sff_init_one(pdev, ppi, &it8213_sht, NULL, 0);
|
||||
}
|
||||
|
||||
static const struct pci_device_id it8213_pci_tbl[] = {
|
||||
|
||||
@@ -932,7 +932,7 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
else
|
||||
ppi[0] = &info_smart;
|
||||
}
|
||||
return ata_pci_sff_init_one(pdev, ppi, &it821x_sht, NULL);
|
||||
return ata_pci_sff_init_one(pdev, ppi, &it821x_sht, NULL, 0);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
@@ -144,7 +144,7 @@ static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *i
|
||||
};
|
||||
const struct ata_port_info *ppi[] = { &info, NULL };
|
||||
|
||||
return ata_pci_sff_init_one(pdev, ppi, &jmicron_sht, NULL);
|
||||
return ata_pci_sff_init_one(pdev, ppi, &jmicron_sht, NULL, 0);
|
||||
}
|
||||
|
||||
static const struct pci_device_id jmicron_pci_tbl[] = {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user