Skip to content

Commit fe81ba1

Browse files
committed
Merge tag 'ata-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/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 ...
2 parents 3bf6a9e + 237fe88 commit fe81ba1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1272
-1439
lines changed

drivers/ata/Kconfig

Lines changed: 16 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ config SATA_AHCI_PLATFORM
146146
config AHCI_BRCM
147147
tristate "Broadcom AHCI SATA support"
148148
depends on ARCH_BRCMSTB || BMIPS_GENERIC || ARCH_BCM_NSP || \
149-
ARCH_BCM_63XX
149+
ARCH_BCM_63XX || COMPILE_TEST
150150
select SATA_HOST
151151
help
152152
This option enables support for the AHCI SATA3 controller found on
@@ -156,7 +156,7 @@ config AHCI_BRCM
156156

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

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

207207
config AHCI_MTK
208208
tristate "MediaTek AHCI SATA support"
209-
depends on ARCH_MEDIATEK
209+
depends on ARCH_MEDIATEK || COMPILE_TEST
210210
select MFD_SYSCON
211211
select SATA_HOST
212212
help
@@ -217,7 +217,7 @@ config AHCI_MTK
217217

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

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

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

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

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

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

435-
config SATA_DWC_DEBUG
436-
bool "Debugging driver version"
437-
depends on SATA_DWC
438-
help
439-
This option enables debugging output in the driver.
440-
441-
config SATA_DWC_VDEBUG
442-
bool "Verbose debug output"
443-
depends on SATA_DWC_DEBUG
444-
help
445-
This option enables the taskfile dumping and NCQ debugging.
446-
447435
config SATA_HIGHBANK
448436
tristate "Calxeda Highbank SATA support"
449437
depends on ARCH_HIGHBANK || COMPILE_TEST
@@ -611,7 +599,7 @@ config PATA_ATP867X
611599

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

650638
config PATA_CS5535
651639
tristate "CS5535 PATA support (Experimental)"
652-
depends on PCI && X86_32
640+
depends on PCI && (X86_32 || (X86_64 && COMPILE_TEST))
653641
help
654642
This option enables support for the NatSemi/AMD CS5535
655643
companion chip used with the Geode processor family.
@@ -697,7 +685,7 @@ config PATA_EP93XX
697685
config PATA_FTIDE010
698686
tristate "Faraday Technology FTIDE010 PATA support"
699687
depends on OF
700-
depends on ARM
688+
depends on ARM || COMPILE_TEST
701689
depends on SATA_GEMINI
702690
help
703691
This option enables support for the Faraday FTIDE010
@@ -760,7 +748,7 @@ config PATA_ICSIDE
760748

761749
config PATA_IMX
762750
tristate "PATA support for Freescale iMX"
763-
depends on ARCH_MXC
751+
depends on ARCH_MXC || COMPILE_TEST
764752
select PATA_TIMINGS
765753
help
766754
This option enables support for the PATA host available on Freescale
@@ -981,7 +969,7 @@ config PATA_VIA
981969

982970
config PATA_PXA
983971
tristate "PXA DMA-capable PATA support"
984-
depends on ARCH_PXA
972+
depends on ARCH_PXA || COMPILE_TEST
985973
help
986974
This option enables support for harddrive attached to PXA CPU's bus.
987975

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

11581146
config PATA_SAMSUNG_CF
11591147
tristate "Samsung SoC PATA support"
1160-
depends on SAMSUNG_DEV_IDE
1148+
depends on SAMSUNG_DEV_IDE || COMPILE_TEST
11611149
select PATA_TIMINGS
11621150
help
11631151
This option enables basic support for Samsung's S3C/S5P board

drivers/ata/acard-ahci.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,6 @@ static unsigned int acard_ahci_fill_sg(struct ata_queued_cmd *qc, void *cmd_tbl)
185185
struct acard_sg *acard_sg = cmd_tbl + AHCI_CMD_TBL_HDR_SZ;
186186
unsigned int si, last_si = 0;
187187

188-
VPRINTK("ENTER\n");
189-
190188
/*
191189
* Next, the S/G list.
192190
*/
@@ -362,8 +360,6 @@ static int acard_ahci_init_one(struct pci_dev *pdev, const struct pci_device_id
362360
struct ata_host *host;
363361
int n_ports, i, rc;
364362

365-
VPRINTK("ENTER\n");
366-
367363
WARN_ON((int)ATA_MAX_QUEUE > AHCI_MAX_CMDS);
368364

369365
ata_print_version_once(&pdev->dev, DRV_VERSION);

drivers/ata/ahci.c

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ enum board_ids {
5151
board_ahci,
5252
board_ahci_ign_iferr,
5353
board_ahci_mobile,
54+
board_ahci_no_debounce_delay,
5455
board_ahci_nomsi,
5556
board_ahci_noncq,
5657
board_ahci_nosntf,
@@ -141,6 +142,13 @@ static const struct ata_port_info ahci_port_info[] = {
141142
.udma_mask = ATA_UDMA6,
142143
.port_ops = &ahci_ops,
143144
},
145+
[board_ahci_no_debounce_delay] = {
146+
.flags = AHCI_FLAG_COMMON,
147+
.link_flags = ATA_LFLAG_NO_DEBOUNCE_DELAY,
148+
.pio_mask = ATA_PIO4,
149+
.udma_mask = ATA_UDMA6,
150+
.port_ops = &ahci_ops,
151+
},
144152
[board_ahci_nomsi] = {
145153
AHCI_HFLAGS (AHCI_HFLAG_NO_MSI),
146154
.flags = AHCI_FLAG_COMMON,
@@ -437,6 +445,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
437445
board_ahci_al },
438446
/* AMD */
439447
{ PCI_VDEVICE(AMD, 0x7800), board_ahci }, /* AMD Hudson-2 */
448+
{ PCI_VDEVICE(AMD, 0x7801), board_ahci_no_debounce_delay }, /* AMD Hudson-2 (AHCI mode) */
440449
{ PCI_VDEVICE(AMD, 0x7900), board_ahci }, /* AMD CZ */
441450
{ PCI_VDEVICE(AMD, 0x7901), board_ahci_mobile }, /* AMD Green Sardine */
442451
/* AMD is using RAID class only for ahci controllers */
@@ -684,7 +693,7 @@ static void ahci_pci_init_controller(struct ata_host *host)
684693

685694
/* clear port IRQ */
686695
tmp = readl(port_mmio + PORT_IRQ_STAT);
687-
VPRINTK("PORT_IRQ_STAT 0x%x\n", tmp);
696+
dev_dbg(&pdev->dev, "PORT_IRQ_STAT 0x%x\n", tmp);
688697
if (tmp)
689698
writel(tmp, port_mmio + PORT_IRQ_STAT);
690699
}
@@ -700,17 +709,13 @@ static int ahci_vt8251_hardreset(struct ata_link *link, unsigned int *class,
700709
bool online;
701710
int rc;
702711

703-
DPRINTK("ENTER\n");
704-
705712
hpriv->stop_engine(ap);
706713

707714
rc = sata_link_hardreset(link, sata_ehc_deb_timing(&link->eh_context),
708715
deadline, &online, NULL);
709716

710717
hpriv->start_engine(ap);
711718

712-
DPRINTK("EXIT, rc=%d, class=%u\n", rc, *class);
713-
714719
/* vt8251 doesn't clear BSY on signature FIS reception,
715720
* request follow-up softreset.
716721
*/
@@ -790,8 +795,6 @@ static int ahci_avn_hardreset(struct ata_link *link, unsigned int *class,
790795
bool online;
791796
int rc, i;
792797

793-
DPRINTK("ENTER\n");
794-
795798
hpriv->stop_engine(ap);
796799

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

832-
DPRINTK("EXIT, rc=%d, class=%u\n", rc, *class);
833835
return rc;
834836
}
835837

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

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

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

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

16631663
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)
16731673
int n_ports, i, rc;
16741674
int ahci_pci_bar = AHCI_PCI_BAR_STANDARD;
16751675

1676-
VPRINTK("ENTER\n");
1677-
16781676
WARN_ON((int)ATA_MAX_QUEUE > AHCI_MAX_CMDS);
16791677

16801678
ata_print_version_once(&pdev->dev, DRV_VERSION);

drivers/ata/ahci_brcm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ static void brcm_sata_init(struct brcm_ahci_priv *priv)
246246
}
247247

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

334334
static const struct ata_port_info ahci_brcm_port_info = {
335335
.flags = AHCI_FLAG_COMMON | ATA_FLAG_NO_DIPM,
336-
.link_flags = ATA_LFLAG_NO_DB_DELAY,
336+
.link_flags = ATA_LFLAG_NO_DEBOUNCE_DELAY,
337337
.pio_mask = ATA_PIO4,
338338
.udma_mask = ATA_UDMA6,
339339
.port_ops = &ahci_brcm_platform_ops,

drivers/ata/ahci_ceva.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,8 @@ struct ceva_ahci_priv {
9292
};
9393

9494
static unsigned int ceva_ahci_read_id(struct ata_device *dev,
95-
struct ata_taskfile *tf, u16 *id)
95+
struct ata_taskfile *tf, __le16 *id)
9696
{
97-
__le16 *__id = (__le16 *)id;
9897
u32 err_mask;
9998

10099
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,
104103
* Since CEVA controller does not support device sleep feature, we
105104
* need to clear DEVSLP (bit 8) in word78 of the IDENTIFY DEVICE data.
106105
*/
107-
__id[ATA_ID_FEATURE_SUPP] &= cpu_to_le16(~(1 << 8));
106+
id[ATA_ID_FEATURE_SUPP] &= cpu_to_le16(~(1 << 8));
108107

109108
return 0;
110109
}

drivers/ata/ahci_qoriq.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@ static int ahci_qoriq_hardreset(struct ata_link *link, unsigned int *class,
103103
int rc;
104104
bool ls1021a_workaround = (qoriq_priv->type == AHCI_LS1021A);
105105

106-
DPRINTK("ENTER\n");
107-
108106
hpriv->stop_engine(ap);
109107

110108
/*
@@ -146,8 +144,6 @@ static int ahci_qoriq_hardreset(struct ata_link *link, unsigned int *class,
146144

147145
if (online)
148146
*class = ahci_dev_classify(ap);
149-
150-
DPRINTK("EXIT, rc=%d, class=%u\n", rc, *class);
151147
return rc;
152148
}
153149

drivers/ata/ahci_xgene.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ static unsigned int xgene_ahci_qc_issue(struct ata_queued_cmd *qc)
193193
struct xgene_ahci_context *ctx = hpriv->plat_data;
194194
int rc = 0;
195195
u32 port_fbs;
196-
void *port_mmio = ahci_port_base(ap);
196+
void __iomem *port_mmio = ahci_port_base(ap);
197197

198198
/*
199199
* Write the pmp value to PxFBS.DEV
@@ -237,7 +237,7 @@ static bool xgene_ahci_is_memram_inited(struct xgene_ahci_context *ctx)
237237
* does not support DEVSLP.
238238
*/
239239
static unsigned int xgene_ahci_read_id(struct ata_device *dev,
240-
struct ata_taskfile *tf, u16 *id)
240+
struct ata_taskfile *tf, __le16 *id)
241241
{
242242
u32 err_mask;
243243

@@ -454,7 +454,7 @@ static int xgene_ahci_pmp_softreset(struct ata_link *link, unsigned int *class,
454454
int pmp = sata_srst_pmp(link);
455455
struct ata_port *ap = link->ap;
456456
u32 rc;
457-
void *port_mmio = ahci_port_base(ap);
457+
void __iomem *port_mmio = ahci_port_base(ap);
458458
u32 port_fbs;
459459

460460
/*
@@ -499,7 +499,7 @@ static int xgene_ahci_softreset(struct ata_link *link, unsigned int *class,
499499
struct ata_port *ap = link->ap;
500500
struct ahci_host_priv *hpriv = ap->host->private_data;
501501
struct xgene_ahci_context *ctx = hpriv->plat_data;
502-
void *port_mmio = ahci_port_base(ap);
502+
void __iomem *port_mmio = ahci_port_base(ap);
503503
u32 port_fbs;
504504
u32 port_fbs_save;
505505
u32 retry = 1;
@@ -588,8 +588,6 @@ static irqreturn_t xgene_ahci_irq_intr(int irq, void *dev_instance)
588588
void __iomem *mmio;
589589
u32 irq_stat, irq_masked;
590590

591-
VPRINTK("ENTER\n");
592-
593591
hpriv = host->private_data;
594592
mmio = hpriv->mmio;
595593

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

613611
spin_unlock(&host->lock);
614612

615-
VPRINTK("EXIT\n");
616-
617613
return IRQ_RETVAL(rc);
618614
}
619615

0 commit comments

Comments
 (0)