Commit fe81ba13 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull ATA updates from Damien Le Moal:
 "A larger than usual set of changes for this cycle. The bulk of the
  changes are part of a rework of libata messages and debugging features
  from Hannes. In more detail, the changes are as follows.

   - Small code cleanups in the pata_ali driver (unnecessary variable
     initialization and simplified return statement, from Jason and
     Colin.

   - Switch to using struct_group() in the sata_fsl driver, from Kees.

   - Convert many sysfs attribute show functions to use sysfs_emit()
     instead of snprintf(), from me.

   - sata_dwc_460ex driver code cleanups, from Andy.

   - Improve DMA setup and remove superfluous error message in
     libahci_platform, from Andy

   - A small code cleanup in libata to use min() instead of open coding
     test, from Changcheng.

   - Rework of libata messages from Hannes. This is especially focused
     on replacing compile time defined debugging messages (DPRINTK() and
     VPRINTK()) with regular dynamic debugging messages (pr_debug()) and
     traceipoint events. Both libata-core and many drivers are updated
     to have a consistent debugging level control for all drivers.

   - Extend compile test support to as many drivers as possible in ATA
     Kconfig to improve compile test coverage, from me.

   - Fixes to avoid compile time warnings (W=1) and sparse warnings in
     sata_fsl and ahci_xgene drivers, from me.

   - Fix the interface of the read_id() port operation method to clarify
     that the data buffer passed as an argument is little endian. This
     avoids sparse warnings in the pata_netcell, pata_it821x,
     ahci_xgene, ahci_cevaxi and ahci_brcm drivers. From me.

   - Small code cleanup in the pata_octeon_cf driver, from Minghao.

   - Improved IRQ configuration code in pata_of_platform, from Lad.

   - Simplified implementation of __ata_scsi_queuecmd(), from Wenchao.

   - Debounce delay flag renaming, from Paul.

   - Add support for AMD A85 FCH (Hudson D4) AHCI adapters, from Paul"

* tag 'ata-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: (106 commits)
  ata: pata_ali: remove redundant return statement
  ata: ahci: Add support for AMD A85 FCH (Hudson D4)
  ata: libata: Rename link flag ATA_LFLAG_NO_DB_DELAY
  ata: libata-scsi: simplify __ata_scsi_queuecmd()
  ata: pata_of_platform: Use platform_get_irq_optional() to get the interrupt
  ata: pata_samsung_cf: add compile test support
  ata: pata_pxa: add compile test support
  ata: pata_imx: add compile test support
  ata: pata_ftide010: add compile test support
  ata: pata_cs5535: add compile test support
  ata: pata_octeon_cf: remove redundant val variable
  ata: fix read_id() ata port operation interface
  ata: ahci_xgene: use correct type for port mmio address
  ata: sata_fsl: fix cmdhdr_tbl_entry and prde struct definitions
  ata: sata_fsl: fix scsi host initialization
  ata: pata_bk3710: add compile test support
  ata: ahci_seattle: add compile test support
  ata: ahci_xgene: add compile test support
  ata: ahci_tegra: add compile test support
  ata: ahci_sunxi: add compile test support
  ...
parents 3bf6a9e3 237fe888
Loading
Loading
Loading
Loading
+16 −28
Original line number Diff line number Diff line
@@ -146,7 +146,7 @@ config SATA_AHCI_PLATFORM
config AHCI_BRCM
	tristate "Broadcom AHCI SATA support"
	depends on ARCH_BRCMSTB || BMIPS_GENERIC || ARCH_BCM_NSP || \
		   ARCH_BCM_63XX
		   ARCH_BCM_63XX || COMPILE_TEST
	select SATA_HOST
	help
	  This option enables support for the AHCI SATA3 controller found on
@@ -156,7 +156,7 @@ config AHCI_BRCM

config AHCI_DA850
	tristate "DaVinci DA850 AHCI SATA support"
	depends on ARCH_DAVINCI_DA850
	depends on ARCH_DAVINCI_DA850 || COMPILE_TEST
	select SATA_HOST
	help
	  This option enables support for the DaVinci DA850 SoC's
@@ -166,7 +166,7 @@ config AHCI_DA850

config AHCI_DM816
	tristate "DaVinci DM816 AHCI SATA support"
	depends on ARCH_OMAP2PLUS
	depends on ARCH_OMAP2PLUS || COMPILE_TEST
	select SATA_HOST
	help
	  This option enables support for the DaVinci DM816 SoC's
@@ -206,7 +206,7 @@ config AHCI_CEVA

config AHCI_MTK
	tristate "MediaTek AHCI SATA support"
	depends on ARCH_MEDIATEK
	depends on ARCH_MEDIATEK || COMPILE_TEST
	select MFD_SYSCON
	select SATA_HOST
	help
@@ -217,7 +217,7 @@ config AHCI_MTK

config AHCI_MVEBU
	tristate "Marvell EBU AHCI SATA support"
	depends on ARCH_MVEBU
	depends on ARCH_MVEBU || COMPILE_TEST
	select SATA_HOST
	help
	  This option enables support for the Marvebu EBU SoC's
@@ -236,7 +236,7 @@ config AHCI_OCTEON

config AHCI_SUNXI
	tristate "Allwinner sunxi AHCI SATA support"
	depends on ARCH_SUNXI
	depends on ARCH_SUNXI || COMPILE_TEST
	select SATA_HOST
	help
	  This option enables support for the Allwinner sunxi SoC's
@@ -246,7 +246,7 @@ config AHCI_SUNXI

config AHCI_TEGRA
	tristate "NVIDIA Tegra AHCI SATA support"
	depends on ARCH_TEGRA
	depends on ARCH_TEGRA || COMPILE_TEST
	select SATA_HOST
	help
	  This option enables support for the NVIDIA Tegra SoC's
@@ -256,7 +256,7 @@ config AHCI_TEGRA

config AHCI_XGENE
	tristate "APM X-Gene 6.0Gbps AHCI SATA host controller support"
	depends on PHY_XGENE
	depends on PHY_XGENE || COMPILE_TEST
	select SATA_HOST
	help
	 This option enables support for APM X-Gene SoC SATA host controller.
@@ -273,7 +273,7 @@ config AHCI_QORIQ

config SATA_FSL
	tristate "Freescale 3.0Gbps SATA support"
	depends on FSL_SOC
	depends on FSL_SOC || COMPILE_TEST
	select SATA_HOST
	help
	  This option enables support for Freescale 3.0Gbps SATA controller.
@@ -294,7 +294,7 @@ config SATA_GEMINI

config SATA_AHCI_SEATTLE
	tristate "AMD Seattle 6.0Gbps AHCI SATA host controller support"
	depends on ARCH_SEATTLE
	depends on ARCH_SEATTLE || COMPILE_TEST
	select SATA_HOST
	help
	 This option enables support for AMD Seattle SATA host controller.
@@ -432,18 +432,6 @@ config SATA_DWC_OLD_DMA
	  This option enables support for old device trees without the
	  "dmas" property.

config SATA_DWC_DEBUG
	bool "Debugging driver version"
	depends on SATA_DWC
	help
	  This option enables debugging output in the driver.

config SATA_DWC_VDEBUG
	bool "Verbose debug output"
	depends on SATA_DWC_DEBUG
	help
	  This option enables the taskfile dumping and NCQ debugging.

config SATA_HIGHBANK
	tristate "Calxeda Highbank SATA support"
	depends on ARCH_HIGHBANK || COMPILE_TEST
@@ -611,7 +599,7 @@ config PATA_ATP867X

config PATA_BK3710
	tristate "Palmchip BK3710 PATA support"
	depends on ARCH_DAVINCI
	depends on ARCH_DAVINCI || COMPILE_TEST
	select PATA_TIMINGS
	help
	  This option enables support for the integrated IDE controller on
@@ -649,7 +637,7 @@ config PATA_CS5530

config PATA_CS5535
	tristate "CS5535 PATA support (Experimental)"
	depends on PCI && X86_32
	depends on PCI && (X86_32 || (X86_64 && COMPILE_TEST))
	help
	  This option enables support for the NatSemi/AMD CS5535
	  companion chip used with the Geode processor family.
@@ -697,7 +685,7 @@ config PATA_EP93XX
config PATA_FTIDE010
	tristate "Faraday Technology FTIDE010 PATA support"
	depends on OF
	depends on ARM
	depends on ARM || COMPILE_TEST
	depends on SATA_GEMINI
	help
	  This option enables support for the Faraday FTIDE010
@@ -760,7 +748,7 @@ config PATA_ICSIDE

config PATA_IMX
	tristate "PATA support for Freescale iMX"
	depends on ARCH_MXC
	depends on ARCH_MXC || COMPILE_TEST
	select PATA_TIMINGS
	help
	  This option enables support for the PATA host available on Freescale
@@ -981,7 +969,7 @@ config PATA_VIA

config PATA_PXA
	tristate "PXA DMA-capable PATA support"
	depends on ARCH_PXA
	depends on ARCH_PXA || COMPILE_TEST
	help
	  This option enables support for harddrive attached to PXA CPU's bus.

@@ -1157,7 +1145,7 @@ config PATA_RZ1000

config PATA_SAMSUNG_CF
	tristate "Samsung SoC PATA support"
	depends on SAMSUNG_DEV_IDE
	depends on SAMSUNG_DEV_IDE || COMPILE_TEST
	select PATA_TIMINGS
	help
	  This option enables basic support for Samsung's S3C/S5P board
+0 −4
Original line number Diff line number Diff line
@@ -185,8 +185,6 @@ static unsigned int acard_ahci_fill_sg(struct ata_queued_cmd *qc, void *cmd_tbl)
	struct acard_sg *acard_sg = cmd_tbl + AHCI_CMD_TBL_HDR_SZ;
	unsigned int si, last_si = 0;

	VPRINTK("ENTER\n");

	/*
	 * Next, the S/G list.
	 */
@@ -362,8 +360,6 @@ static int acard_ahci_init_one(struct pci_dev *pdev, const struct pci_device_id
	struct ata_host *host;
	int n_ports, i, rc;

	VPRINTK("ENTER\n");

	WARN_ON((int)ATA_MAX_QUEUE > AHCI_MAX_CMDS);

	ata_print_version_once(&pdev->dev, DRV_VERSION);
+11 −13
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ enum board_ids {
	board_ahci,
	board_ahci_ign_iferr,
	board_ahci_mobile,
	board_ahci_no_debounce_delay,
	board_ahci_nomsi,
	board_ahci_noncq,
	board_ahci_nosntf,
@@ -141,6 +142,13 @@ static const struct ata_port_info ahci_port_info[] = {
		.udma_mask	= ATA_UDMA6,
		.port_ops	= &ahci_ops,
	},
	[board_ahci_no_debounce_delay] = {
		.flags		= AHCI_FLAG_COMMON,
		.link_flags	= ATA_LFLAG_NO_DEBOUNCE_DELAY,
		.pio_mask	= ATA_PIO4,
		.udma_mask	= ATA_UDMA6,
		.port_ops	= &ahci_ops,
	},
	[board_ahci_nomsi] = {
		AHCI_HFLAGS	(AHCI_HFLAG_NO_MSI),
		.flags		= AHCI_FLAG_COMMON,
@@ -437,6 +445,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
		board_ahci_al },
	/* AMD */
	{ PCI_VDEVICE(AMD, 0x7800), board_ahci }, /* AMD Hudson-2 */
	{ PCI_VDEVICE(AMD, 0x7801), board_ahci_no_debounce_delay }, /* AMD Hudson-2 (AHCI mode) */
	{ PCI_VDEVICE(AMD, 0x7900), board_ahci }, /* AMD CZ */
	{ PCI_VDEVICE(AMD, 0x7901), board_ahci_mobile }, /* AMD Green Sardine */
	/* AMD is using RAID class only for ahci controllers */
@@ -684,7 +693,7 @@ static void ahci_pci_init_controller(struct ata_host *host)

		/* clear port IRQ */
		tmp = readl(port_mmio + PORT_IRQ_STAT);
		VPRINTK("PORT_IRQ_STAT 0x%x\n", tmp);
		dev_dbg(&pdev->dev, "PORT_IRQ_STAT 0x%x\n", tmp);
		if (tmp)
			writel(tmp, port_mmio + PORT_IRQ_STAT);
	}
@@ -700,8 +709,6 @@ static int ahci_vt8251_hardreset(struct ata_link *link, unsigned int *class,
	bool online;
	int rc;

	DPRINTK("ENTER\n");

	hpriv->stop_engine(ap);

	rc = sata_link_hardreset(link, sata_ehc_deb_timing(&link->eh_context),
@@ -709,8 +716,6 @@ static int ahci_vt8251_hardreset(struct ata_link *link, unsigned int *class,

	hpriv->start_engine(ap);

	DPRINTK("EXIT, rc=%d, class=%u\n", rc, *class);

	/* vt8251 doesn't clear BSY on signature FIS reception,
	 * request follow-up softreset.
	 */
@@ -790,8 +795,6 @@ static int ahci_avn_hardreset(struct ata_link *link, unsigned int *class,
	bool online;
	int rc, i;

	DPRINTK("ENTER\n");

	hpriv->stop_engine(ap);

	for (i = 0; i < 2; i++) {
@@ -829,7 +832,6 @@ static int ahci_avn_hardreset(struct ata_link *link, unsigned int *class,
	if (online)
		*class = ahci_dev_classify(ap);

	DPRINTK("EXIT, rc=%d, class=%u\n", rc, *class);
	return rc;
}

@@ -1476,7 +1478,6 @@ static irqreturn_t ahci_thunderx_irq_handler(int irq, void *dev_instance)
	u32 irq_stat, irq_masked;
	unsigned int handled = 1;

	VPRINTK("ENTER\n");
	hpriv = host->private_data;
	mmio = hpriv->mmio;
	irq_stat = readl(mmio + HOST_IRQ_STAT);
@@ -1493,7 +1494,6 @@ static irqreturn_t ahci_thunderx_irq_handler(int irq, void *dev_instance)
		irq_stat = readl(mmio + HOST_IRQ_STAT);
		spin_unlock(&host->lock);
	} while (irq_stat);
	VPRINTK("EXIT\n");

	return IRQ_RETVAL(handled);
}
@@ -1657,7 +1657,7 @@ static ssize_t remapped_nvme_show(struct device *dev,
	struct ata_host *host = dev_get_drvdata(dev);
	struct ahci_host_priv *hpriv = host->private_data;

	return sprintf(buf, "%u\n", hpriv->remapped_nvme);
	return sysfs_emit(buf, "%u\n", hpriv->remapped_nvme);
}

static DEVICE_ATTR_RO(remapped_nvme);
@@ -1673,8 +1673,6 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
	int n_ports, i, rc;
	int ahci_pci_bar = AHCI_PCI_BAR_STANDARD;

	VPRINTK("ENTER\n");

	WARN_ON((int)ATA_MAX_QUEUE > AHCI_MAX_CMDS);

	ata_print_version_once(&pdev->dev, DRV_VERSION);
+2 −2
Original line number Diff line number Diff line
@@ -246,7 +246,7 @@ static void brcm_sata_init(struct brcm_ahci_priv *priv)
}

static unsigned int brcm_ahci_read_id(struct ata_device *dev,
				      struct ata_taskfile *tf, u16 *id)
				      struct ata_taskfile *tf, __le16 *id)
{
	struct ata_port *ap = dev->link->ap;
	struct ata_host *host = ap->host;
@@ -333,7 +333,7 @@ static struct ata_port_operations ahci_brcm_platform_ops = {

static const struct ata_port_info ahci_brcm_port_info = {
	.flags		= AHCI_FLAG_COMMON | ATA_FLAG_NO_DIPM,
	.link_flags	= ATA_LFLAG_NO_DB_DELAY,
	.link_flags	= ATA_LFLAG_NO_DEBOUNCE_DELAY,
	.pio_mask	= ATA_PIO4,
	.udma_mask	= ATA_UDMA6,
	.port_ops	= &ahci_brcm_platform_ops,
+2 −3
Original line number Diff line number Diff line
@@ -92,9 +92,8 @@ struct ceva_ahci_priv {
};

static unsigned int ceva_ahci_read_id(struct ata_device *dev,
					struct ata_taskfile *tf, u16 *id)
				      struct ata_taskfile *tf, __le16 *id)
{
	__le16 *__id = (__le16 *)id;
	u32 err_mask;

	err_mask = ata_do_dev_read_id(dev, tf, id);
@@ -104,7 +103,7 @@ static unsigned int ceva_ahci_read_id(struct ata_device *dev,
	 * Since CEVA controller does not support device sleep feature, we
	 * need to clear DEVSLP (bit 8) in word78 of the IDENTIFY DEVICE data.
	 */
	__id[ATA_ID_FEATURE_SUPP] &= cpu_to_le16(~(1 << 8));
	id[ATA_ID_FEATURE_SUPP] &= cpu_to_le16(~(1 << 8));

	return 0;
}
Loading