Commit baf29cc1 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull ata updates from Damien Le Moal:

 - Constify struct pci_device_id (Christophe)

 - Remove unused code in the sata_gemini driver (David)

 - Improve libahci_platform to allow supporting non consecutive port
   numbers as specified in device trees (Josua)

 - Cleanup ahci driver code handling of port numbers with the new helper
   ahci_ignore_port() (me)

 - Use pm_sleep_ptr() to remove CONFIG_PM_SLEEP ifdefs in the ahci_st
   driver (Raphael). More of these changes will be included in the next
   cycle

* tag 'ata-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
  ahci: st: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr()
  ahci: Introduce ahci_ignore_port() helper
  ata: libahci_platform: support non-consecutive port numbers
  ata: sata_gemini: Remove remaining reset glue
  ata: sata_gemini: Remove unused gemini_sata_reset_bridge()
  ata: Constify struct pci_device_id
parents 88e45067 f2809aa4
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -328,7 +328,7 @@ struct ahci_port_priv {
struct ahci_host_priv {
	/* Input fields */
	unsigned int		flags;		/* AHCI_HFLAG_* */
	u32			mask_port_map;	/* mask out particular bits */
	u32			mask_port_map;	/* Mask of valid ports */

	void __iomem *		mmio;		/* bus-independent mem map */
	u32			cap;		/* cap to use */
@@ -379,6 +379,17 @@ struct ahci_host_priv {
						  int port);
};

/*
 * Return true if a port should be ignored because it is excluded from
 * the host port map.
 */
static inline bool ahci_ignore_port(struct ahci_host_priv *hpriv,
				    unsigned int portid)
{
	return portid >= hpriv->nports ||
		!(hpriv->mask_port_map & (1 << portid));
}

extern int ahci_ignore_sss;

extern const struct attribute_group *ahci_shost_groups[];
+3 −0
Original line number Diff line number Diff line
@@ -288,6 +288,9 @@ static unsigned int brcm_ahci_read_id(struct ata_device *dev,

	/* Re-initialize and calibrate the PHY */
	for (i = 0; i < hpriv->nports; i++) {
		if (ahci_ignore_port(hpriv, i))
			continue;

		rc = phy_init(hpriv->phys[i]);
		if (rc)
			goto disable_phys;
+6 −0
Original line number Diff line number Diff line
@@ -206,6 +206,9 @@ static int ceva_ahci_platform_enable_resources(struct ahci_host_priv *hpriv)
		goto disable_clks;

	for (i = 0; i < hpriv->nports; i++) {
		if (ahci_ignore_port(hpriv, i))
			continue;

		rc = phy_init(hpriv->phys[i]);
		if (rc)
			goto disable_rsts;
@@ -215,6 +218,9 @@ static int ceva_ahci_platform_enable_resources(struct ahci_host_priv *hpriv)
	ahci_platform_deassert_rsts(hpriv);

	for (i = 0; i < hpriv->nports; i++) {
		if (ahci_ignore_port(hpriv, i))
			continue;

		rc = phy_power_on(hpriv->phys[i]);
		if (rc) {
			phy_exit(hpriv->phys[i]);
+2 −4
Original line number Diff line number Diff line
@@ -176,7 +176,6 @@ static int st_ahci_probe(struct platform_device *pdev)
	return 0;
}

#ifdef CONFIG_PM_SLEEP
static int st_ahci_suspend(struct device *dev)
{
	struct ata_host *host = dev_get_drvdata(dev);
@@ -221,9 +220,8 @@ static int st_ahci_resume(struct device *dev)

	return ahci_platform_resume_host(dev);
}
#endif

static SIMPLE_DEV_PM_OPS(st_ahci_pm_ops, st_ahci_suspend, st_ahci_resume);
static DEFINE_SIMPLE_DEV_PM_OPS(st_ahci_pm_ops, st_ahci_suspend, st_ahci_resume);

static const struct of_device_id st_ahci_match[] = {
	{ .compatible = "st,ahci", },
@@ -234,7 +232,7 @@ MODULE_DEVICE_TABLE(of, st_ahci_match);
static struct platform_driver st_ahci_driver = {
	.driver = {
		.name = DRV_NAME,
		.pm = &st_ahci_pm_ops,
		.pm = pm_sleep_ptr(&st_ahci_pm_ops),
		.of_match_table = st_ahci_match,
	},
	.probe = st_ahci_probe,
+1 −1
Original line number Diff line number Diff line
@@ -209,7 +209,7 @@ static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_id
	return ata_pci_bmdma_init_one(dev, ppi, &generic_sht, (void *)id, 0);
}

static struct pci_device_id ata_generic[] = {
static const struct pci_device_id ata_generic[] = {
	{ PCI_DEVICE(PCI_VENDOR_ID_PCTECH, PCI_DEVICE_ID_PCTECH_SAMURAI_IDE), },
	{ PCI_DEVICE(PCI_VENDOR_ID_HOLTEK, PCI_DEVICE_ID_HOLTEK_6565), },
	{ PCI_DEVICE(PCI_VENDOR_ID_UMC,    PCI_DEVICE_ID_UMC_UM8673F), },
Loading