Skip to content

Commit

Permalink
Merge tag 'ata-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/dlemoal/libata

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
  ...
  • Loading branch information
torvalds committed Jan 18, 2022
2 parents 3bf6a9e + 237fe88 commit fe81ba1
Show file tree
Hide file tree
Showing 59 changed files with 1,272 additions and 1,439 deletions.
44 changes: 16 additions & 28 deletions drivers/ata/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions drivers/ata/acard-ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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);
Expand Down
24 changes: 11 additions & 13 deletions drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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);
}
Expand All @@ -700,17 +709,13 @@ 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),
deadline, &online, NULL);

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.
*/
Expand Down Expand Up @@ -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++) {
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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);
Expand All @@ -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);
}
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions drivers/ata/ahci_brcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
5 changes: 2 additions & 3 deletions drivers/ata/ahci_ceva.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}
Expand Down
4 changes: 0 additions & 4 deletions drivers/ata/ahci_qoriq.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ static int ahci_qoriq_hardreset(struct ata_link *link, unsigned int *class,
int rc;
bool ls1021a_workaround = (qoriq_priv->type == AHCI_LS1021A);

DPRINTK("ENTER\n");

hpriv->stop_engine(ap);

/*
Expand Down Expand Up @@ -146,8 +144,6 @@ static int ahci_qoriq_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;
}

Expand Down
12 changes: 4 additions & 8 deletions drivers/ata/ahci_xgene.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ static unsigned int xgene_ahci_qc_issue(struct ata_queued_cmd *qc)
struct xgene_ahci_context *ctx = hpriv->plat_data;
int rc = 0;
u32 port_fbs;
void *port_mmio = ahci_port_base(ap);
void __iomem *port_mmio = ahci_port_base(ap);

/*
* Write the pmp value to PxFBS.DEV
Expand Down Expand Up @@ -237,7 +237,7 @@ static bool xgene_ahci_is_memram_inited(struct xgene_ahci_context *ctx)
* does not support DEVSLP.
*/
static unsigned int xgene_ahci_read_id(struct ata_device *dev,
struct ata_taskfile *tf, u16 *id)
struct ata_taskfile *tf, __le16 *id)
{
u32 err_mask;

Expand Down Expand Up @@ -454,7 +454,7 @@ static int xgene_ahci_pmp_softreset(struct ata_link *link, unsigned int *class,
int pmp = sata_srst_pmp(link);
struct ata_port *ap = link->ap;
u32 rc;
void *port_mmio = ahci_port_base(ap);
void __iomem *port_mmio = ahci_port_base(ap);
u32 port_fbs;

/*
Expand Down Expand Up @@ -499,7 +499,7 @@ static int xgene_ahci_softreset(struct ata_link *link, unsigned int *class,
struct ata_port *ap = link->ap;
struct ahci_host_priv *hpriv = ap->host->private_data;
struct xgene_ahci_context *ctx = hpriv->plat_data;
void *port_mmio = ahci_port_base(ap);
void __iomem *port_mmio = ahci_port_base(ap);
u32 port_fbs;
u32 port_fbs_save;
u32 retry = 1;
Expand Down Expand Up @@ -588,8 +588,6 @@ static irqreturn_t xgene_ahci_irq_intr(int irq, void *dev_instance)
void __iomem *mmio;
u32 irq_stat, irq_masked;

VPRINTK("ENTER\n");

hpriv = host->private_data;
mmio = hpriv->mmio;

Expand All @@ -612,8 +610,6 @@ static irqreturn_t xgene_ahci_irq_intr(int irq, void *dev_instance)

spin_unlock(&host->lock);

VPRINTK("EXIT\n");

return IRQ_RETVAL(rc);
}

Expand Down
Loading

0 comments on commit fe81ba1

Please sign in to comment.