diff options
author | David S. Miller <davem@davemloft.net> | 2018-03-23 11:24:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-23 11:31:58 -0400 |
commit | 03fe2debbb2771fb90881e4ce8109b09cf772a5c (patch) | |
tree | fbaf8738296b2e9dcba81c6daef2d515b6c4948c /drivers/mmc | |
parent | 6686c459e1449a3ee5f3fd313b0a559ace7a700e (diff) | |
parent | f36b7534b83357cf52e747905de6d65b4f7c2512 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Fun set of conflict resolutions here...
For the mac80211 stuff, these were fortunately just parallel
adds. Trivially resolved.
In drivers/net/phy/phy.c we had a bug fix in 'net' that moved the
function phy_disable_interrupts() earlier in the file, whilst in
'net-next' the phy_error() call from this function was removed.
In net/ipv4/xfrm4_policy.c, David Ahern's changes to remove the
'rt_table_id' member of rtable collided with a bug fix in 'net' that
added a new struct member "rt_mtu_locked" which needs to be copied
over here.
The mlxsw driver conflict consisted of net-next separating
the span code and definitions into separate files, whilst
a 'net' bug fix made some changes to that moved code.
The mlx5 infiniband conflict resolution was quite non-trivial,
the RDMA tree's merge commit was used as a guide here, and
here are their notes:
====================
Due to bug fixes found by the syzkaller bot and taken into the for-rc
branch after development for the 4.17 merge window had already started
being taken into the for-next branch, there were fairly non-trivial
merge issues that would need to be resolved between the for-rc branch
and the for-next branch. This merge resolves those conflicts and
provides a unified base upon which ongoing development for 4.17 can
be based.
Conflicts:
drivers/infiniband/hw/mlx5/main.c - Commit 42cea83f9524
(IB/mlx5: Fix cleanup order on unload) added to for-rc and
commit b5ca15ad7e61 (IB/mlx5: Add proper representors support)
add as part of the devel cycle both needed to modify the
init/de-init functions used by mlx5. To support the new
representors, the new functions added by the cleanup patch
needed to be made non-static, and the init/de-init list
added by the representors patch needed to be modified to
match the init/de-init list changes made by the cleanup
patch.
Updates:
drivers/infiniband/hw/mlx5/mlx5_ib.h - Update function
prototypes added by representors patch to reflect new function
names as changed by cleanup patch
drivers/infiniband/hw/mlx5/ib_rep.c - Update init/de-init
stage list to match new order from cleanup patch
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/block.c | 19 | ||||
-rw-r--r-- | drivers/mmc/core/card.h | 1 | ||||
-rw-r--r-- | drivers/mmc/core/quirks.h | 6 | ||||
-rw-r--r-- | drivers/mmc/host/dw_mmc-exynos.c | 8 | ||||
-rw-r--r-- | drivers/mmc/host/dw_mmc.c | 15 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci-acpi.c | 2 |
6 files changed, 44 insertions, 7 deletions
diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index 20135a5de748..2cfb963d9f37 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c | |||
@@ -72,6 +72,7 @@ MODULE_ALIAS("mmc:block"); | |||
72 | #define MMC_BLK_TIMEOUT_MS (10 * 1000) | 72 | #define MMC_BLK_TIMEOUT_MS (10 * 1000) |
73 | #define MMC_SANITIZE_REQ_TIMEOUT 240000 | 73 | #define MMC_SANITIZE_REQ_TIMEOUT 240000 |
74 | #define MMC_EXTRACT_INDEX_FROM_ARG(x) ((x & 0x00FF0000) >> 16) | 74 | #define MMC_EXTRACT_INDEX_FROM_ARG(x) ((x & 0x00FF0000) >> 16) |
75 | #define MMC_EXTRACT_VALUE_FROM_ARG(x) ((x & 0x0000FF00) >> 8) | ||
75 | 76 | ||
76 | #define mmc_req_rel_wr(req) ((req->cmd_flags & REQ_FUA) && \ | 77 | #define mmc_req_rel_wr(req) ((req->cmd_flags & REQ_FUA) && \ |
77 | (rq_data_dir(req) == WRITE)) | 78 | (rq_data_dir(req) == WRITE)) |
@@ -587,6 +588,24 @@ static int __mmc_blk_ioctl_cmd(struct mmc_card *card, struct mmc_blk_data *md, | |||
587 | } | 588 | } |
588 | 589 | ||
589 | /* | 590 | /* |
591 | * Make sure the cache of the PARTITION_CONFIG register and | ||
592 | * PARTITION_ACCESS bits is updated in case the ioctl ext_csd write | ||
593 | * changed it successfully. | ||
594 | */ | ||
595 | if ((MMC_EXTRACT_INDEX_FROM_ARG(cmd.arg) == EXT_CSD_PART_CONFIG) && | ||
596 | (cmd.opcode == MMC_SWITCH)) { | ||
597 | struct mmc_blk_data *main_md = dev_get_drvdata(&card->dev); | ||
598 | u8 value = MMC_EXTRACT_VALUE_FROM_ARG(cmd.arg); | ||
599 | |||
600 | /* | ||
601 | * Update cache so the next mmc_blk_part_switch call operates | ||
602 | * on up-to-date data. | ||
603 | */ | ||
604 | card->ext_csd.part_config = value; | ||
605 | main_md->part_curr = value & EXT_CSD_PART_CONFIG_ACC_MASK; | ||
606 | } | ||
607 | |||
608 | /* | ||
590 | * According to the SD specs, some commands require a delay after | 609 | * According to the SD specs, some commands require a delay after |
591 | * issuing the command. | 610 | * issuing the command. |
592 | */ | 611 | */ |
diff --git a/drivers/mmc/core/card.h b/drivers/mmc/core/card.h index 79a5b985ccf5..9c821eedd156 100644 --- a/drivers/mmc/core/card.h +++ b/drivers/mmc/core/card.h | |||
@@ -82,6 +82,7 @@ struct mmc_fixup { | |||
82 | #define CID_MANFID_APACER 0x27 | 82 | #define CID_MANFID_APACER 0x27 |
83 | #define CID_MANFID_KINGSTON 0x70 | 83 | #define CID_MANFID_KINGSTON 0x70 |
84 | #define CID_MANFID_HYNIX 0x90 | 84 | #define CID_MANFID_HYNIX 0x90 |
85 | #define CID_MANFID_NUMONYX 0xFE | ||
85 | 86 | ||
86 | #define END_FIXUP { NULL } | 87 | #define END_FIXUP { NULL } |
87 | 88 | ||
diff --git a/drivers/mmc/core/quirks.h b/drivers/mmc/core/quirks.h index 75d317623852..5153577754f0 100644 --- a/drivers/mmc/core/quirks.h +++ b/drivers/mmc/core/quirks.h | |||
@@ -109,6 +109,12 @@ static const struct mmc_fixup mmc_ext_csd_fixups[] = { | |||
109 | */ | 109 | */ |
110 | MMC_FIXUP_EXT_CSD_REV(CID_NAME_ANY, CID_MANFID_HYNIX, | 110 | MMC_FIXUP_EXT_CSD_REV(CID_NAME_ANY, CID_MANFID_HYNIX, |
111 | 0x014a, add_quirk, MMC_QUIRK_BROKEN_HPI, 5), | 111 | 0x014a, add_quirk, MMC_QUIRK_BROKEN_HPI, 5), |
112 | /* | ||
113 | * Certain Micron (Numonyx) eMMC 4.5 cards might get broken when HPI | ||
114 | * feature is used so disable the HPI feature for such buggy cards. | ||
115 | */ | ||
116 | MMC_FIXUP_EXT_CSD_REV(CID_NAME_ANY, CID_MANFID_NUMONYX, | ||
117 | 0x014e, add_quirk, MMC_QUIRK_BROKEN_HPI, 6), | ||
112 | 118 | ||
113 | END_FIXUP | 119 | END_FIXUP |
114 | }; | 120 | }; |
diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c index fa41d9422d57..a84aa3f1ae85 100644 --- a/drivers/mmc/host/dw_mmc-exynos.c +++ b/drivers/mmc/host/dw_mmc-exynos.c | |||
@@ -165,9 +165,15 @@ static void dw_mci_exynos_set_clksel_timing(struct dw_mci *host, u32 timing) | |||
165 | static int dw_mci_exynos_runtime_resume(struct device *dev) | 165 | static int dw_mci_exynos_runtime_resume(struct device *dev) |
166 | { | 166 | { |
167 | struct dw_mci *host = dev_get_drvdata(dev); | 167 | struct dw_mci *host = dev_get_drvdata(dev); |
168 | int ret; | ||
169 | |||
170 | ret = dw_mci_runtime_resume(dev); | ||
171 | if (ret) | ||
172 | return ret; | ||
168 | 173 | ||
169 | dw_mci_exynos_config_smu(host); | 174 | dw_mci_exynos_config_smu(host); |
170 | return dw_mci_runtime_resume(dev); | 175 | |
176 | return ret; | ||
171 | } | 177 | } |
172 | 178 | ||
173 | /** | 179 | /** |
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index d9b4acefed31..06d47414d0c1 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c | |||
@@ -413,7 +413,9 @@ static inline void dw_mci_set_cto(struct dw_mci *host) | |||
413 | cto_div = (mci_readl(host, CLKDIV) & 0xff) * 2; | 413 | cto_div = (mci_readl(host, CLKDIV) & 0xff) * 2; |
414 | if (cto_div == 0) | 414 | if (cto_div == 0) |
415 | cto_div = 1; | 415 | cto_div = 1; |
416 | cto_ms = DIV_ROUND_UP(MSEC_PER_SEC * cto_clks * cto_div, host->bus_hz); | 416 | |
417 | cto_ms = DIV_ROUND_UP_ULL((u64)MSEC_PER_SEC * cto_clks * cto_div, | ||
418 | host->bus_hz); | ||
417 | 419 | ||
418 | /* add a bit spare time */ | 420 | /* add a bit spare time */ |
419 | cto_ms += 10; | 421 | cto_ms += 10; |
@@ -562,6 +564,7 @@ static int dw_mci_idmac_init(struct dw_mci *host) | |||
562 | (sizeof(struct idmac_desc_64addr) * | 564 | (sizeof(struct idmac_desc_64addr) * |
563 | (i + 1))) >> 32; | 565 | (i + 1))) >> 32; |
564 | /* Initialize reserved and buffer size fields to "0" */ | 566 | /* Initialize reserved and buffer size fields to "0" */ |
567 | p->des0 = 0; | ||
565 | p->des1 = 0; | 568 | p->des1 = 0; |
566 | p->des2 = 0; | 569 | p->des2 = 0; |
567 | p->des3 = 0; | 570 | p->des3 = 0; |
@@ -584,6 +587,7 @@ static int dw_mci_idmac_init(struct dw_mci *host) | |||
584 | i++, p++) { | 587 | i++, p++) { |
585 | p->des3 = cpu_to_le32(host->sg_dma + | 588 | p->des3 = cpu_to_le32(host->sg_dma + |
586 | (sizeof(struct idmac_desc) * (i + 1))); | 589 | (sizeof(struct idmac_desc) * (i + 1))); |
590 | p->des0 = 0; | ||
587 | p->des1 = 0; | 591 | p->des1 = 0; |
588 | } | 592 | } |
589 | 593 | ||
@@ -1799,8 +1803,8 @@ static bool dw_mci_reset(struct dw_mci *host) | |||
1799 | } | 1803 | } |
1800 | 1804 | ||
1801 | if (host->use_dma == TRANS_MODE_IDMAC) | 1805 | if (host->use_dma == TRANS_MODE_IDMAC) |
1802 | /* It is also recommended that we reset and reprogram idmac */ | 1806 | /* It is also required that we reinit idmac */ |
1803 | dw_mci_idmac_reset(host); | 1807 | dw_mci_idmac_init(host); |
1804 | 1808 | ||
1805 | ret = true; | 1809 | ret = true; |
1806 | 1810 | ||
@@ -1948,8 +1952,9 @@ static void dw_mci_set_drto(struct dw_mci *host) | |||
1948 | drto_div = (mci_readl(host, CLKDIV) & 0xff) * 2; | 1952 | drto_div = (mci_readl(host, CLKDIV) & 0xff) * 2; |
1949 | if (drto_div == 0) | 1953 | if (drto_div == 0) |
1950 | drto_div = 1; | 1954 | drto_div = 1; |
1951 | drto_ms = DIV_ROUND_UP(MSEC_PER_SEC * drto_clks * drto_div, | 1955 | |
1952 | host->bus_hz); | 1956 | drto_ms = DIV_ROUND_UP_ULL((u64)MSEC_PER_SEC * drto_clks * drto_div, |
1957 | host->bus_hz); | ||
1953 | 1958 | ||
1954 | /* add a bit spare time */ | 1959 | /* add a bit spare time */ |
1955 | drto_ms += 10; | 1960 | drto_ms += 10; |
diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index 4065da58789d..32321bd596d8 100644 --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c | |||
@@ -680,7 +680,7 @@ static int sdhci_acpi_probe(struct platform_device *pdev) | |||
680 | host->hw_name = "ACPI"; | 680 | host->hw_name = "ACPI"; |
681 | host->ops = &sdhci_acpi_ops_dflt; | 681 | host->ops = &sdhci_acpi_ops_dflt; |
682 | host->irq = platform_get_irq(pdev, 0); | 682 | host->irq = platform_get_irq(pdev, 0); |
683 | if (host->irq <= 0) { | 683 | if (host->irq < 0) { |
684 | err = -EINVAL; | 684 | err = -EINVAL; |
685 | goto err_free; | 685 | goto err_free; |
686 | } | 686 | } |