openwrt/target/linux/generic/backport-4.14
Koen Vandeputte 2f11a9ed68 cns3xxx: fix writing to wrong PCI registers
Originally, cns3xxx used it's own functions for mapping, reading and writing registers.

Upstream commit 802b7c06adc7 ("ARM: cns3xxx: Convert PCI to use generic config accessors")
removed the internal PCI config write function in favor of the generic one:

cns3xxx_pci_write_config() --> pci_generic_config_write()

cns3xxx_pci_write_config() expected aligned addresses, being produced by cns3xxx_pci_map_bus()
while the generic one pci_generic_config_write() actually expects the real address
as both the function and hardware are capable of byte-aligned writes.

This currently leads to pci_generic_config_write() writing
to the wrong registers on some ocasions.

First issue seen due to this:

- driver ath9k gets loaded
- The driver wants to write value 0xA8 to register PCI_LATENCY_TIMER, located at 0x0D
- cns3xxx_pci_map_bus() aligns the address to 0x0C
- pci_generic_config_write() effectively writes 0xA8 into register 0x0C (CACHE_LINE_SIZE)

This seems to cause some slight instability when certain PCI devices are used.

Another issue example caused by this this is the PCI bus numbering,
where the primary bus is higher than the secondary, which is impossible.

Before:

00:00.0 PCI bridge: Cavium, Inc. Device 3400 (rev 01) (prog-if 00 [Normal decode])
    Flags: bus master, fast devsel, latency 0, IRQ 255
    Bus: primary=02, secondary=01, subordinate=ff, sec-latency=0

After fix:

00:00.0 PCI bridge: Cavium, Inc. Device 3400 (rev 01) (prog-if 00 [Normal decode])
    Flags: bus master, fast devsel, latency 0, IRQ 255
    Bus: primary=00, secondary=01, subordinate=02, sec-latency=0

And very likely some more ..

Fix all by omitting the alignment being done in the mapping function.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-12-18 15:12:06 +01:00
..
010-Kbuild-don-t-hardcode-path-to-awk-in-scripts-ld-vers.patch
011-kbuild-export-SUBARCH.patch kernel: bump 4.14 to 4.14.48 for 18.06 2018-06-07 09:03:24 +02:00
020-backport_netfilter_rtcache.patch
025-tcp-allow-drivers-to-tweak-TSQ-logic.patch kernel: bump 4.14 to 4.14.89 2018-12-18 15:12:06 +01:00
030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch kernel: bump 4.14 to 4.14.80 2018-11-13 11:45:17 +02:00
040-v4.17-0001-mtd-move-code-adding-master-MTD-out-of-mtd_add_devic.patch kernel: backport patches simplifying mtd_device_parse_register code 2018-02-19 16:01:44 +01:00
040-v4.17-0002-mtd-get-rid-of-the-mtd_add_device_partitions.patch kernel: backport patches simplifying mtd_device_parse_register code 2018-02-19 16:01:44 +01:00
041-v4.17-0001-mtd-partitions-add-of_match_table-parser-matching-fo.patch kernel: use accepted mtd patchset adding support for "compatible" string 2018-04-09 07:16:48 +02:00
041-v4.17-0002-mtd-rename-ofpart-parser-to-fixed-partitions-as-it-f.patch kernel: use accepted mtd patchset adding support for "compatible" string 2018-04-09 07:16:48 +02:00
041-v4.17-0003-mtd-ofpart-add-of_match_table-with-fixed-partitions.patch kernel: use accepted mtd patchset adding support for "compatible" string 2018-04-09 07:16:48 +02:00
042-v4.18-0001-mtd-move-code-adding-registering-partitions-to-the-p.patch kernel: backport mtd patch for minor partitioning cleanup 2018-05-12 23:14:07 +02:00
043-v4.18-mtd-bcm47xxpart-improve-handling-TRX-partition-size.patch kernel: use accepted version of bcm47xxpart fix commit 2018-05-12 23:53:44 +02:00
044-v4.18-mtd-bcm47xxpart-add-of_match_table-with-a-new-DT-bin.patch kernel: backport mtd patches with Broadcom of_match_table-s 2018-07-31 10:14:46 +02:00
045-v4.19-mtd-parsers-trx-add-of_match_table-with-the-new-DT-b.patch kernel: backport mtd patches with Broadcom of_match_table-s 2018-07-31 10:14:46 +02:00
046-v4.19-mtd-partitions-use-DT-info-for-parsing-partitions-wi.patch kernel: backport mtd support for subpartitions in DT 2018-07-31 10:14:47 +02:00
071-v4.15-0001-net-bgmac-enable-master-mode-for-BCM54210E-and-B5021.patch
076-v4.15-0001-net-phy-broadcom-support-new-device-flag-for-setting.patch
090-net-bridge-add-support-for-port-isolation.patch kernel: replace bridge port isolate hack with upstream patch backport on 4.14 2018-12-18 09:45:59 +01:00
100-arm-cns3xxx-fix-writing-to-wrong-PCI-registers-after.patch cns3xxx: fix writing to wrong PCI registers 2018-12-18 15:12:06 +01:00
272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch kernel: bump 4.14 to 4.14.48 for 18.06 2018-06-07 09:03:24 +02:00
289-v4.16-netfilter-add-defines-for-arp-decnet-max-hooks.patch kernel: fix build of nftables 2018-12-18 11:28:13 +01:00
290-v4.16-netfilter-core-make-nf_unregister_net_hooks-simple-w.patch kernel: generic: Fix nftables inet table breakage 2018-12-18 11:28:13 +01:00
291-v4.16-netfilter-core-remove-synchronize_net-call-if-nfqueu.patch kernel: generic: Fix nftables inet table breakage 2018-12-18 11:28:13 +01:00
292-v4.16-netfilter-core-free-hooks-with-call_rcu.patch kernel: generic: Fix nftables inet table breakage 2018-12-18 11:28:13 +01:00
293-v4.16-netfilter-reduce-size-of-hook-entry-point-locations.patch kernel: generic: Fix nftables inet table breakage 2018-12-18 11:28:13 +01:00
294-v4.16-netfilter-reduce-hook-array-sizes-to-what-is-needed.patch kernel: generic: Fix nftables inet table breakage 2018-12-18 11:28:13 +01:00
295-v4.16-netfilter-don-t-allocate-space-for-decnet-hooks-unle.patch kernel: generic: Fix nftables inet table breakage 2018-12-18 11:28:13 +01:00
296-v4.16-netfilter-don-t-allocate-space-for-arp-bridge-hooks-.patch kernel: generic: Fix nftables inet table breakage 2018-12-18 11:28:13 +01:00
297-v4.16-netfilter-core-pass-hook-number-family-and-device-to.patch kernel: generic: Fix nftables inet table breakage 2018-12-18 11:28:13 +01:00
298-v4.16-netfilter-core-add-nf_remove_net_hook.patch kernel: generic: Fix nftables inet table breakage 2018-12-18 11:28:13 +01:00
298-v4.16-netfilter-core-pass-family-as-parameter-to-nf_remove.patch kernel: generic: Fix nftables inet table breakage 2018-12-18 11:28:13 +01:00
299-v4.16-netfilter-core-support-for-NFPROTO_INET-hook-registr.patch kernel: generic: Fix nftables inet table breakage 2018-12-18 11:28:13 +01:00
300-v4.16-netfilter-nf_tables-explicit-nft_set_pktinfo-call-fr.patch kernel: mark source kernel for netfilter backports 2018-05-08 09:42:07 +02:00
301-v4.16-netfilter-core-only-allow-one-nat-hook-per-hook-poin.patch kernel: generic: Fix nftables inet table breakage 2018-12-18 11:28:13 +01:00
302-v4.16-netfilter-nf_tables_inet-don-t-use-multihook-infrast.patch kernel: mark source kernel for netfilter backports 2018-05-08 09:42:07 +02:00
303-v4.16-netfilter-nf_tables-remove-multihook-chains-and-fami.patch kernel: bump 4.14 to 4.14.89 2018-12-18 15:12:06 +01:00
304-v4.16-netfilter-move-checksum-indirection-to-struct-nf_ipv.patch kernel: bump 4.14 to 4.14.89 2018-12-18 15:12:06 +01:00
305-v4.16-netfilter-move-checksum_partial-indirection-to-struc.patch kernel: bump 4.14 to 4.14.89 2018-12-18 15:12:06 +01:00
306-v4.16-netfilter-remove-saveroute-indirection-in-struct-nf_.patch kernel: bump 4.14 to 4.14.89 2018-12-18 15:12:06 +01:00
307-v4.16-netfilter-move-route-indirection-to-struct-nf_ipv6_o.patch kernel: bump 4.14 to 4.14.89 2018-12-18 15:12:06 +01:00
308-v4.16-netfilter-move-reroute-indirection-to-struct-nf_ipv6.patch kernel: bump 4.14 to 4.14.89 2018-12-18 15:12:06 +01:00
309-v4.16-netfilter-remove-route_key_size-field-in-struct-nf_a.patch kernel: bump 4.14 to 4.14.89 2018-12-18 15:12:06 +01:00
310-v4.16-netfilter-remove-struct-nf_afinfo-and-its-helper-fun.patch kernel: bump 4.14 to 4.14.89 2018-12-18 15:12:06 +01:00
311-v4.16-netfilter-nf_tables_arp-don-t-set-forward-chain.patch kernel: mark source kernel for netfilter backports 2018-05-08 09:42:07 +02:00
312-v4.16-netfilter-nf_tables-remove-hooks-from-family-definit.patch kernel: bump 4.14 to 4.14.54 for 18.06 2018-07-12 13:54:24 +02:00
313-v4.16-netfilter-remove-defensive-check-on-malformed-packet.patch kernel: mark source kernel for netfilter backports 2018-05-08 09:42:07 +02:00
314-v4.16-netfilter-meta-secpath-support.patch kernel: bump 4.14 to 4.14.54 for 18.06 2018-07-12 13:54:24 +02:00
315-v4.15-netfilter-conntrack-move-nf_ct_netns_-get-put-to-cor.patch kernel: mark source kernel for netfilter backports 2018-05-08 09:42:07 +02:00
320-v4.16-netfilter-nf_conntrack-add-IPS_OFFLOAD-status-bit.patch kernel: bump 4.14 to 4.14.82 2018-11-22 10:51:27 +01:00
321-v4.16-netfilter-nf_tables-add-flow-table-netlink-frontend.patch kernel: bump 4.14 to 4.14.89 2018-12-18 15:12:06 +01:00
322-v4.16-netfilter-add-generic-flow-table-infrastructure.patch kernel: generic: Fix nftables inet table breakage 2018-12-18 11:28:13 +01:00
323-v4.16-netfilter-flow-table-support-for-IPv4.patch kernel: generic: Fix nftables inet table breakage 2018-12-18 11:28:13 +01:00
324-v4.16-netfilter-flow-table-support-for-IPv6.patch kerneL: bump 4.14 to 4.14.73 2018-10-02 13:44:45 +02:00
325-v4.16-netfilter-flow-table-support-for-the-mixed-IPv4-IPv6.patch kernel: generic: Fix nftables inet table breakage 2018-12-18 11:28:13 +01:00
326-v4.16-netfilter-nf_tables-flow-offload-expression.patch kernel: generic: Fix nftables inet table breakage 2018-12-18 11:28:13 +01:00
327-v4.16-netfilter-nf_tables-remove-nhooks-field-from-struct-.patch kernel: bump 4.14 to 4.14.89 2018-12-18 15:12:06 +01:00
328-v4.16-netfilter-nf_tables-fix-a-typo-in-nf_tables_getflowt.patch kernel: bump 4.14 to 4.14.89 2018-12-18 15:12:06 +01:00
329-v4.16-netfilter-improve-flow-table-Kconfig-dependencies.patch kernel: generic: Fix nftables inet table breakage 2018-12-18 11:28:13 +01:00
330-v4.16-netfilter-nf_tables-remove-flag-field-from-struct-nf.patch kernel: bump 4.14 to 4.14.54 for 18.06 2018-07-12 13:54:24 +02:00
331-v4.16-netfilter-nf_tables-no-need-for-struct-nft_af_info-t.patch kernel: bump 4.14 to 4.14.89 2018-12-18 15:12:06 +01:00
332-v4.16-netfilter-nf_tables-remove-struct-nft_af_info-parame.patch kernel: bump 4.14 to 4.14.54 for 18.06 2018-07-12 13:54:24 +02:00
334-v4.15-netfilter-nf_tables-fix-potential-NULL-ptr-deref-in-.patch kernel: bump 4.14 to 4.14.89 2018-12-18 15:12:06 +01:00
335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch kernel: bump 4.14 to 4.14.89 2018-12-18 15:12:06 +01:00
336-v4.15-netfilter-exit_net-cleanup-check-added.patch kernel: bump 4.14 to 4.14.89 2018-12-18 15:12:06 +01:00
337-v4.16-netfilter-nf_tables-get-rid-of-pernet-families.patch kernel: bump 4.14 to 4.14.89 2018-12-18 15:12:06 +01:00
338-v4.16-netfilter-nf_tables-get-rid-of-struct-nft_af_info-ab.patch kernel: bump 4.14 to 4.14.89 2018-12-18 15:12:06 +01:00
339-v4.16-netfilter-nft_flow_offload-wait-for-garbage-collecto.patch kernel: bump 4.14 to 4.14.89 2018-12-18 15:12:06 +01:00
340-v4.16-netfilter-nft_flow_offload-no-need-to-flush-entries-.patch kernel: mark source kernel for netfilter backports 2018-05-08 09:42:07 +02:00
341-v4.16-netfilter-nft_flow_offload-move-flowtable-cleanup-ro.patch kernel: mark source kernel for netfilter backports 2018-05-08 09:42:07 +02:00
342-v4.16-netfilter-nf_tables-fix-flowtable-free.patch kernel: bump 4.14 to 4.14.89 2018-12-18 15:12:06 +01:00
343-netfilter-nft_flow_offload-handle-netdevice-events-f.patch kernel: backport netfilter NAT offload support to 4.14 2018-02-21 20:12:42 +01:00
344-v4.16-netfilter-nf_tables-allocate-handle-and-delete-objec.patch kernel: bump 4.14 to 4.14.89 2018-12-18 15:12:06 +01:00
345-v4.16-netfilter-nf_flow_offload-fix-use-after-free-and-a-r.patch kernel: mark source kernel for netfilter backports 2018-05-08 09:42:07 +02:00
346-v4.16-netfilter-flowtable-infrastructure-depends-on-NETFIL.patch kernel: generic: Fix nftables inet table breakage 2018-12-18 11:28:13 +01:00
347-v4.16-netfilter-remove-duplicated-include.patch kernel: mark source kernel for netfilter backports 2018-05-08 09:42:07 +02:00
348-v4.18-netfilter-nf_flow_table-use-IP_CT_DIR_-values-for-FL.patch kernel: mark source kernel for netfilter backports 2018-05-08 09:42:07 +02:00
349-v4.18-netfilter-nf_flow_table-clean-up-flow_offload_alloc.patch kernel: mark source kernel for netfilter backports 2018-05-08 09:42:07 +02:00
350-v4.18-ipv6-make-ip6_dst_mtu_forward-inline.patch kerneL: bump 4.14 to 4.14.73 2018-10-02 13:44:45 +02:00
351-v4.18-netfilter-nf_flow_table-cache-mtu-in-struct-flow_off.patch kernel: mark source kernel for netfilter backports 2018-05-08 09:42:07 +02:00
352-v4.18-netfilter-nf_flow_table-rename-nf_flow_table.c-to-nf.patch kernel: mark source kernel for netfilter backports 2018-05-08 09:42:07 +02:00
353-v4.18-netfilter-nf_flow_table-move-ipv4-offload-hook-code-.patch kernel: mark source kernel for netfilter backports 2018-05-08 09:42:07 +02:00
354-v4.18-netfilter-nf_flow_table-move-ip-header-check-out-of-.patch kernel: mark source kernel for netfilter backports 2018-05-08 09:42:07 +02:00
355-v4.18-netfilter-nf_flow_table-move-ipv6-offload-hook-code-.patch kernel: mark source kernel for netfilter backports 2018-05-08 09:42:07 +02:00
356-v4.18-netfilter-nf_flow_table-relax-mixed-ipv4-ipv6-flowta.patch kernel: generic: Fix nftables inet table breakage 2018-12-18 11:28:13 +01:00
357-v4.18-netfilter-nf_flow_table-move-init-code-to-nf_flow_ta.patch kernel: bump 4.14 to 4.14.89 2018-12-18 15:12:06 +01:00
358-v4.18-netfilter-nf_flow_table-fix-priv-pointer-for-netdev-.patch kernel: bump 4.14 to 4.14.89 2018-12-18 15:12:06 +01:00
359-v4.18-netfilter-nf_flow_table-track-flow-tables-in-nf_flow.patch kernel: bump 4.14 to 4.14.89 2018-12-18 15:12:06 +01:00
360-v4.18-netfilter-nf_flow_table-make-flow_offload_dead-inlin.patch kernel: mark source kernel for netfilter backports 2018-05-08 09:42:07 +02:00
361-v4.18-netfilter-nf_flow_table-add-a-new-flow-state-for-tea.patch kernel: mark source kernel for netfilter backports 2018-05-08 09:42:07 +02:00
362-v4.18-netfilter-nf_flow_table-in-flow_offload_lookup-skip-.patch kernel: mark source kernel for netfilter backports 2018-05-08 09:42:07 +02:00
363-v4.18-netfilter-nf_flow_table-add-support-for-sending-flow.patch kernel: mark source kernel for netfilter backports 2018-05-08 09:42:07 +02:00
364-v4.18-netfilter-nf_flow_table-tear-down-TCP-flows-if-RST-o.patch kernel: mark source kernel for netfilter backports 2018-05-08 09:42:07 +02:00
365-v4.16-netfilter-nf_flow_table-fix-checksum-when-handling-D.patch kernel: mark source kernel for netfilter backports 2018-05-08 09:42:07 +02:00
366-netfilter-nf_flow_table-clean-up-and-fix-dst-handlin.patch kernel: netfilter: fix dst entries in flowtable offload 2018-03-23 20:56:34 +01:00
367-v4.18-netfilter-nf_flow_table-add-missing-condition-for-TC.patch kernel: mark source kernel for netfilter backports 2018-05-08 09:42:07 +02:00
368-v4.18-netfilter-nf_flow_table-fix-offloading-connections-w.patch kernel: mark source kernel for netfilter backports 2018-05-08 09:42:07 +02:00
369-v4.18-netfilter-nf_flow_table-attach-dst-to-skbs.patch kernel: backport patch to fix dst handling for offloaded connections 2018-06-05 10:19:35 +02:00
370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch kernel: bump 4.14 to 4.14.82 2018-11-22 10:51:27 +01:00
371-netfilter-nf_flow_table-fix-up-ct-state-of-flows-aft.patch kernel: fix conntrack fixup of offloaded flows on timeout 2018-06-14 11:48:05 +02:00
500-ubifs-Handle-re-linking-of-inodes-correctly-while-re.patch kernel: fix ubifs loosing O_TMPFILE data after power cut 2018-11-15 12:34:37 +01:00