Skip to content

Commit 16ea0fc

Browse files
Alan CoxJeff Garzik
authored andcommitted
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>
1 parent cb6643e commit 16ea0fc

40 files changed

Lines changed: 44 additions & 42 deletions

‎drivers/ata/ata_generic.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_id
155155
return rc;
156156
pcim_pin_device(dev);
157157
}
158-
return ata_pci_sff_init_one(dev, ppi, &generic_sht, NULL);
158+
return ata_pci_sff_init_one(dev, ppi, &generic_sht, NULL, 0);
159159
}
160160

161161
static struct pci_device_id ata_generic[] = {

‎drivers/ata/libata-sff.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3037,6 +3037,7 @@ EXPORT_SYMBOL_GPL(ata_pci_sff_activate_host);
30373037
* @ppi: array of port_info, must be enough for two ports
30383038
* @sht: scsi_host_template to use when registering the host
30393039
* @host_priv: host private_data
3040+
* @hflag: host flags
30403041
*
30413042
* This is a helper function which can be called from a driver's
30423043
* xxx_init_one() probe function if the hardware uses traditional
@@ -3057,8 +3058,8 @@ EXPORT_SYMBOL_GPL(ata_pci_sff_activate_host);
30573058
* Zero on success, negative on errno-based value on error.
30583059
*/
30593060
int ata_pci_sff_init_one(struct pci_dev *pdev,
3060-
const struct ata_port_info * const *ppi,
3061-
struct scsi_host_template *sht, void *host_priv)
3061+
const struct ata_port_info * const *ppi,
3062+
struct scsi_host_template *sht, void *host_priv, int hflag)
30623063
{
30633064
struct device *dev = &pdev->dev;
30643065
const struct ata_port_info *pi = NULL;
@@ -3093,6 +3094,7 @@ int ata_pci_sff_init_one(struct pci_dev *pdev,
30933094
if (rc)
30943095
goto out;
30953096
host->private_data = host_priv;
3097+
host->flags |= hflag;
30963098

30973099
pci_set_master(pdev);
30983100
rc = ata_pci_sff_activate_host(host, ata_sff_interrupt, sht);

‎drivers/ata/pata_acpi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ static int pacpi_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
259259
return rc;
260260
pcim_pin_device(pdev);
261261
}
262-
return ata_pci_sff_init_one(pdev, ppi, &pacpi_sht, NULL);
262+
return ata_pci_sff_init_one(pdev, ppi, &pacpi_sht, NULL, 0);
263263
}
264264

265265
static const struct pci_device_id pacpi_pci_tbl[] = {

‎drivers/ata/pata_ali.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
583583
ppi[0] = &info_20_udma;
584584
}
585585

586-
return ata_pci_sff_init_one(pdev, ppi, &ali_sht, NULL);
586+
return ata_pci_sff_init_one(pdev, ppi, &ali_sht, NULL, 0);
587587
}
588588

589589
#ifdef CONFIG_PM

‎drivers/ata/pata_amd.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
574574
}
575575

576576
/* And fire it up */
577-
return ata_pci_sff_init_one(pdev, ppi, &amd_sht, hpriv);
577+
return ata_pci_sff_init_one(pdev, ppi, &amd_sht, hpriv, 0);
578578
}
579579

580580
#ifdef CONFIG_PM

‎drivers/ata/pata_artop.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
421421

422422
BUG_ON(ppi[0] == NULL);
423423

424-
return ata_pci_sff_init_one(pdev, ppi, &artop_sht, NULL);
424+
return ata_pci_sff_init_one(pdev, ppi, &artop_sht, NULL, 0);
425425
}
426426

427427
static const struct pci_device_id artop_pci_tbl[] = {

‎drivers/ata/pata_atiixp.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ static int atiixp_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
237237
if (!pci_test_config_bits(pdev, &atiixp_enable_bits[i]))
238238
ppi[i] = &ata_dummy_port_info;
239239

240-
return ata_pci_sff_init_one(pdev, ppi, &atiixp_sht, NULL);
240+
return ata_pci_sff_init_one(pdev, ppi, &atiixp_sht, NULL, 0);
241241
}
242242

243243
static const struct pci_device_id atiixp[] = {

‎drivers/ata/pata_cmd640.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ static int cmd640_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
223223

224224
cmd640_hardware_init(pdev);
225225

226-
return ata_pci_sff_init_one(pdev, ppi, &cmd640_sht, NULL);
226+
return ata_pci_sff_init_one(pdev, ppi, &cmd640_sht, NULL, 0);
227227
}
228228

229229
#ifdef CONFIG_PM

‎drivers/ata/pata_cmd64x.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
367367
pci_write_config_byte(pdev, UDIDETCR0, 0xF0);
368368
#endif
369369

370-
return ata_pci_sff_init_one(pdev, ppi, &cmd64x_sht, NULL);
370+
return ata_pci_sff_init_one(pdev, ppi, &cmd64x_sht, NULL, 0);
371371
}
372372

373373
#ifdef CONFIG_PM

‎drivers/ata/pata_cs5530.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
324324
ppi[1] = &info_palmax_secondary;
325325

326326
/* Now kick off ATA set up */
327-
return ata_pci_sff_init_one(pdev, ppi, &cs5530_sht, NULL);
327+
return ata_pci_sff_init_one(pdev, ppi, &cs5530_sht, NULL, 0);
328328
}
329329

330330
#ifdef CONFIG_PM

0 commit comments

Comments
 (0)