summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * net: hns: fix ethtool loopback fail bugKejian Yan2016-06-211-21/+14Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When run ethtool cmd(ethtool -t ethx) again and again for a long time, it will be probabilistically fail. The PHYs' registers may be on different pages, so it must be switch to the right page before setting PHYs' registers. And __lb_up() calls phy_start() to startup the PHYs device, but this function may change Copper Control Register(Page 0, Register 0) to an other value. It would cause phy loopback test fail. if we remove phy_start(), we have to remove the relative phy_stop(), phy_disconnect() when doing phy loopback to keep the phy stay in right status. Reported-by: hejun <hjat2005@huawei.com> Signed-off-by: Kejian Yan <yankejian@huawei.com> Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: hns: select Hilink before serdes loopback for HNS V2Kejian Yan2016-06-211-6/+20
| | | | | | | | | | | | | | | | | | | | As Hilink3 and Hilink4 use the same xge training and xge u adaptor for HNSv2, it needs to select which Hilink to be set before relative serdes being configed. The hilink_access_sel is the register to do that. Signed-off-by: Kejian Yan <yankejian@huawei.com> Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: hns: fix the error info when dma_set_mask_and_coherent failQianqian Xie2016-06-211-1/+1
| | | | | | | | | | | | | | | | | | The error info should be printed as "set mask to 64bit fail!" instead of "set mask to 32bit fail!" in dma_set_mask_and_coherent(). Signed-off-by: Qianqian Xie <xieqianqian@huawei.com> Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: hns: Remove unnecessary device resource freeQianqian Xie2016-06-211-35/+4Star
| | | | | | | | | | | | | | | | | | | | The driver uses devm_ioremap_resource, it will unmap the map automatically, remove the unnecessary the resource free. Signed-off-by: Qianqian Xie <xieqianqian@huawei.com> Reported-by: Kefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: hns: typo fix of annotation info for hns_nic_reset_subtask()Qianqian Xie2016-06-211-1/+1
| | | | | | | | | | | | | | | | | | The annotation info for hns_nic_reset_subtask() should be "for resetting subtask" instead of "for resetting suntask". Signed-off-by: Qianqian Xie <xieqianqian@huawei.com> Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: hns: add skb_reset_mac_header() after skb being allocKejian Yan2016-06-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | HNS receives a packet without doing anything, but it should call skb_reset_mac_header() to initialize the header before using eth_hdr(). Fixes: 0d6b425a3773c3445b0f51b2f333821beaacb619 Signed-off-by: Kejian Yan <yankejian@huawei.com> Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: hns: fix hns dsaf v1 dont support tx_pause closeQianqian Xie2016-06-211-3/+3
| | | | | | | | | | | | | | | | | | | | For service port, hns dsaf v1 support to close tx_pause. However, the port will be invalid when it run command ethtool to close tx_pause. This patch will fix it. Signed-off-by: Qianqian Xie <xieqiaqian@huawei.com> Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: hns: bug fix of ge reset sequenceQianqian Xie2016-06-211-1/+5
|/ | | | | | | | | | | The bit fileds of PPE reset register are different between HNS v1 and HNS v2, but the current procedure just only match HNS v1. Here is a patch to fix it. Signed-off-by: Kejian Yan <yankejian@huawei.com> Signed-off-by: Qianqian Xie <xieqianqian@huawei.com> Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'dsa-mv88e6xxx-probe-compatible'David S. Miller2016-06-212-216/+385
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vivien Didelot says: ==================== net: dsa: mv88e6xxx: probe compatible This patchset factorizes the legacy and new SMI probing and abstracts the switch register accesses. This simplifies adding support for new chips or alternative register accesses. This will allow us to use a compatible chip info to describe how to access the SMI device and its switch ID register at probe time. For the legacy probe, we fix the compatible info to 88E6085. For the MDIO probe, we will use the compatible info from the device node data. All patches are reviewed. Changes since v4: - fix debug printing (was 'val' instead of '*val') Changes since v3 [3]: - better register access abstraction using the chip structure Changes since v2 [2]: - do not guess compatible model in legacy probe - add low level SMI API using a chip structure - allocate before probe and detection - add 3 cosmetic patches Changes since v1 [1]: - merge style fix from Ben Dooks - add Acked-by/Reviewed-by tags - drop one compatible string per model - detect the SMI device based on the compatible info - add an SMI ops structure [1] https://lkml.org/lkml/2016/6/8/1201 [2] https://lkml.org/lkml/2016/6/14/671 [3] https://lkml.org/lkml/2016/6/17/995 ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: mv88e6xxx: abstract switch registers accessesVivien Didelot2016-06-212-60/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the SMI address of the switch chip is zero, the chip assumes to be the only one on the SMI master bus and thus responds to all its known SMI devices addresses (port registers, Global2, etc.) When its SMI address is not zero, some chips (e.g. 88E6352) use an indirect access through two SMI Command and Data registers. Other models (e.g. 88E6060) using less than 16 internal SMI addresses always use a direct access. Add a capability flag to describe chips supporting the (indirect) Multi-chip Addressing Mode, and a low-level API to access the registers via SMI. Other accesses (like Ethernet management frames) may be added later. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: mv88e6xxx: add port base address to infoVivien Didelot2016-06-212-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | The switch ID is located at address 0x3 of every Port Registers bank. But not all Marvell switches have their Port Registers SMI Addresses starting at 0x10. 88E6060 starts at 0x8 and 88E6390 starts at 0x0. Add this data in the info structure and use it in the detection code. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: mv88e6xxx: pass compatible infoVivien Didelot2016-06-211-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | After allocating the chip structure, pass it a compatible info pointer. The compatible info structure will be used later to describe how to access the switch registers and where to read the switch ID. For the standard MDIO probe, get it from the device node data. For the legacy DSA driver probing, pass it the 88E6085 info. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: mv88e6xxx: add detection helperVivien Didelot2016-06-211-34/+30Star
| | | | | | | | | | | | | | | | | | Extract the common detection code which assigns the info structure to the chip given the read switch ID. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: mv88e6xxx: add SMI init helperVivien Didelot2016-06-211-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an helper function to isolate SMI specific assignments and checks. This function will later help choosing the different SMI accesses based of the compatible info. Since the chip structure is already allocated in the legacy probe, use the mv88e6xxx_reg_read access routine instead of __mv88e6xxx_reg_read. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: mv88e6xxx: add chip allocation helperVivien Didelot2016-06-211-12/+27
| | | | | | | | | | | | | | | | | | Add an helper function to allocate the chip structure at the beginning of the probe functions. It will be used to initialize the SMI access. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: mv88e6xxx: rename smi_mutex to reg_lockVivien Didelot2016-06-212-65/+62Star
| | | | | | | | | | | | | | | | | | | | | | | | The chip smi_mutex mutex is used to protect the access to the internal switch registers, not only the Multi-chip Addressing Mode, as commented. Since we will isolate SMI-specific pieces of code, avoid the confusion now by renaming smi_mutex to reg_lock. No functional changes here. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: mv88e6xxx: remove table args in info lookupVivien Didelot2016-06-211-10/+6Star
| | | | | | | | | | | | | | | | | | The mv88e6xxx_table array and the mv88e6xxx_lookup_info function are static, so remove the table and size arguments from the lookup function. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: mv88e6xxx: use gpio get optional variantVivien Didelot2016-06-211-10/+3Star
| | | | | | | | | | | | | | | | | | Use the optional variant to get the reset GPIO line, instead of checking for the -ENOENT error. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: mv88e6xxx: add switch register helpersVivien Didelot2016-06-211-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mixed assignments, allocations and registrations in the probe code make it hard to follow the logic and figure out what is DSA or chip specific. Extract the struct dsa_switch related code in a simple mv88e6xxx_register_switch helper function. For symmetry in the code, add a mv88e6xxx_unregister_switch function. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: mv88e6xxx: do not increment bus refcountVivien Didelot2016-06-211-3/+0Star
| | | | | | | | | | | | | | | | | | | | The MDIO device probe and remove functions are respectively incrementing and decrementing the bus refcount themselves. Since these bus level actions are out of the device scope, remove them. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Acked-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: mv88e6xxx: use already declared variablesVivien Didelot2016-06-211-3/+3
| | | | | | | | | | | | | | | | | | In the MDIO probing function, dev is already assigned to &mdiodev->dev and np is already assigned to mdiodev->dev.of_node, so use them. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: mv88e6xxx: remove redundant assignmentsVivien Didelot2016-06-211-3/+0Star
| | | | | | | | | | | | | | | | | | | | | | The chip->ds and ds->slave_mii_bus assignments are common to both legacy and new MDIO probing and are already done in the later setup code. Remove the duplicated assignments from the MDIO probing code. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: mv88e6xxx: fix style issuesVivien Didelot2016-06-211-19/+23
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes 5 style problems reported by checkpatch: WARNING: suspect code indent for conditional statements (8, 24) #492: FILE: drivers/net/dsa/mv88e6xxx.c:492: + if (phydev->link) + reg |= PORT_PCS_CTRL_LINK_UP; CHECK: Logical continuations should be on the previous line #1318: FILE: drivers/net/dsa/mv88e6xxx.c:1318: + oldstate == PORT_CONTROL_STATE_FORWARDING) + && (state == PORT_CONTROL_STATE_DISABLED || CHECK: multiple assignments should be avoided #1662: FILE: drivers/net/dsa/mv88e6xxx.c:1662: + vlan->vid_begin = vlan->vid_end = next.vid; WARNING: line over 80 characters #2097: FILE: drivers/net/dsa/mv88e6xxx.c:2097: + const struct switchdev_obj_port_vlan *vlan, WARNING: suspect code indent for conditional statements (16, 32) #2734: FILE: drivers/net/dsa/mv88e6xxx.c:2734: + if (mv88e6xxx_6352_family(ps) || mv88e6xxx_6351_family(ps) || [...] + reg |= PORT_CONTROL_EGRESS_ADD_TAG; total: 0 errors, 3 warnings, 2 checks, 3805 lines checked It also rebases and integrates changes sent by Ben Dooks [1]: The driver has a number of functions that are not exported or declared elsewhere, so make them static to avoid the following warnings from sparse: drivers/net/dsa/mv88e6xxx.c:113:5: warning: symbol 'mv88e6xxx_reg_read' was not declared. Should it be static? drivers/net/dsa/mv88e6xxx.c:167:5: warning: symbol 'mv88e6xxx_reg_write' was not declared. Should it be static? drivers/net/dsa/mv88e6xxx.c:231:5: warning: symbol 'mv88e6xxx_set_addr' was not declared. Should it be static? drivers/net/dsa/mv88e6xxx.c:367:6: warning: symbol 'mv88e6xxx_ppu_state_init' was not declared. Should it be static? drivers/net/dsa/mv88e6xxx.c:3157:5: warning: symbol 'mv88e6xxx_phy_page_read' was not declared. Should it be static? drivers/net/dsa/mv88e6xxx.c:3169:5: warning: symbol 'mv88e6xxx_phy_page_write' was not declared. Should it be static? drivers/net/dsa/mv88e6xxx.c:3583:26: warning: symbol 'mv88e6xxx_switch_driver' was not declared. Should it be static? drivers/net/dsa/mv88e6xxx.c:3621:5: warning: symbol 'mv88e6xxx_probe' was not declared. Should it be static? [1] http://patchwork.ozlabs.org/patch/632708/ Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: bcmsysport: use phy_ethtool_{get|set}_link_ksettingsPhilippe Reynes2016-06-201-20/+2Star
| | | | | | | | | There are two generics functions phy_ethtool_{get|set}_link_ksettings, so we can use them instead of defining the same code in the driver. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: bcmsysport: use phydev from struct net_devicePhilippe Reynes2016-06-202-18/+14Star
| | | | | | | | | | | The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phydev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: nb8800: use phy_ethtool_{get|set}_link_ksettingsPhilippe Reynes2016-06-191-22/+2Star
| | | | | | | | | There are two generics functions phy_ethtool_{get|set}_link_ksettings, so we can use them instead of defining the same code in the driver. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Acked-by: Mans Rullgard <mans@mansr.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: nb8800: use phydev from struct net_devicePhilippe Reynes2016-06-192-29/+29
| | | | | | | | | | | The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phydev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Acked-by: Mans Rullgard <mans@mansr.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'ipv6-better-traceroute-sit-gre'David S. Miller2016-06-198-43/+92
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eric Dumazet says: ==================== ipv6: better traceroute support in sit and gre In commit ca15a078bd90 ("sit: generate icmpv6 error when receiving icmpv4 error"), Oussama Ghorbel added minimal support for SIT tunnels to generate ICMPv6 messages when receiving ICMPv4 messages. This patch series extends this to GRE tunnels. It also adds support for ICMPV6_TIME_EXCEED. Partial support for RFC 4884 is added, to forward ICMP Multi-part extensions eventually found in the ICMPv4 message. v2: replaced an overlapping memcpy() by memmove() ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * ipv6: RFC 4884 partial support for SIT/GRE tunnelsEric Dumazet2016-06-195-7/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When receiving an ICMPv4 message containing extensions as defined in RFC 4884, and translating it to ICMPv6 at SIT or GRE tunnel, we need some extra manipulation in order to properly forward the extensions. This patch only takes care of Time Exceeded messages as they are the ones that typically carry information from various routers in a fabric during a traceroute session. It also avoids complex skb logic if the data_len is not a multiple of 8. RFC states : The "original datagram" field MUST contain at least 128 octets. If the original datagram did not contain 128 octets, the "original datagram" field MUST be zero padded to 128 octets. In practice routers use 128 bytes of original datagram, not more. Initial translation was added in commit ca15a078bd90 ("sit: generate icmpv6 error when receiving icmpv4 error") Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Oussama Ghorbel <ghorbel@pivasoftware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * gre: better support for ICMP messages for gre+ipv6Eric Dumazet2016-06-193-0/+8
| | | | | | | | | | | | | | | | | | ipgre_err() can call ip6_err_gen_icmpv6_unreach() for proper support of ipv4+gre+icmp+ipv6+... frames, used for example by traceroute/mtr. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ipv6: translate ICMP_TIME_EXCEEDED to ICMPV6_TIME_EXCEEDEric Dumazet2016-06-193-7/+13
| | | | | | | | | | | | | | | | | | | | | | For better traceroute/mtr support for SIT and GRE tunnels, we translate IPV4 ICMP ICMP_TIME_EXCEEDED to ICMPV6_TIME_EXCEED We also have to translate the IPv4 source IP address of ICMP message to IPv6 v4mapped. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ip6: move ipip6_err_gen_icmpv6_unreach()Eric Dumazet2016-06-193-37/+41
| | | | | | | | | | | | | | | | | | | | | | We want to use this helper from GRE as well, so this is the time to move it in net/ipv6/icmp.c Also add a @nhs parameter, since SIT and GRE have different values for the header(s) to skip. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ipv6: icmp: add a force_saddr param to icmp6_send()Eric Dumazet2016-06-193-4/+8
|/ | | | | | | | | | | SIT or GRE tunnels might want to translate an IPV4 address into a v4mapped one when translating ICMP to ICMPv6. This patch adds the parameter to icmp6_send() but does not change icmpv6_send() signature. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: et131x: use phy_ethtool_{get|set}_link_ksettingsPhilippe Reynes2016-06-181-14/+2Star
| | | | | | | | There are two generics functions phy_ethtool_{get|set}_link_ksettings, so we can use them instead of defining the same code in the driver. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: et131x: use phydev from struct net_devicePhilippe Reynes2016-06-181-30/+18Star
| | | | | | | | | | The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phydev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* RDS: TCP: Fix non static symbol warningsWei Yongjun2016-06-181-2/+2
| | | | | | | | | | | | | | Fixes the following sparse warnings: net/rds/tcp.c:59:5: warning: symbol 'rds_tcp_min_sndbuf' was not declared. Should it be static? net/rds/tcp.c:60:5: warning: symbol 'rds_tcp_min_rcvbuf' was not declared. Should it be static? Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net:liquidio: remove unused including <linux/version.h>Wei Yongjun2016-06-181-1/+0Star
| | | | | | | Remove including <linux/version.h> that don't need it. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
* gtp: remove unused including <linux/version.h>Wei Yongjun2016-06-181-1/+0Star
| | | | | | | Remove including <linux/version.h> that don't need it. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge tag 'linux-can-next-for-4.8-20160617' of ↵David S. Miller2016-06-1818-255/+2219
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2016-06-17 this is a pull request of 14 patches for net-next/master. Geert Uytterhoeven contributes a patch that adds a file patterns for CAN device tree bindings to MAINTAINERS. A patch by Alexander Aring fixes warnings when building without proc support. A patch by me improves the sample point calculation. Marek Vasut's patch converts the slcan driver to use CAN_MTU. A patch by William Breathitt Gray converts the tscan1 driver to use module_isa_driver. Two patches by Maximilian Schneider for the gs_usb driver fix coding style and add support for set_phys_id callback. 5 patches by Oliver Hartkopp add support for CANFD to the bcm. And finally two patches by Ramesh Shanmugasundaram, which add support for the rcar_canfd driver. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * can: rcar_can: Move Renesas CAN driver to rcar dirRamesh Shanmugasundaram2016-06-175-12/+12
| | | | | | | | | | | | | | This patch clubs the Renesas controller drivers in one rcar dir. Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * can: rcar_canfd: Add Renesas R-Car CAN FD driverRamesh Shanmugasundaram2016-06-176-0/+1802
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the CAN FD controller found in Renesas R-Car SoCs. The controller operates in CAN FD only mode by default. CAN FD mode supports both Classical CAN & CAN FD frame formats. The controller supports ISO 11898-1:2015 CAN FD format only. This controller supports two channels and the driver can enable either or both of the channels. Driver uses Rx FIFOs (one per channel) for reception & Common FIFOs (one per channel) for transmission. Rx filter rules are configured to the minimum (one per channel) and it accepts Standard, Extended, Data & Remote Frame combinations. Note: There are few documentation errors in R-Car Gen3 Hardware User Manual v0.5E with respect to CAN FD controller. They are listed below: 1. CAN FD interrupt numbers 29 & 30 are listed as per channel interrupts. However, they are common to both channels (i.e.) they are global and channel interrupts respectively. 2. CANFD clock is derived from PLL1. This is not documented. 3. CANFD clock is further divided by (1/2) within the CAN FD controller. This is not documented. 4. The minimum value of NTSEG1 in RSCFDnCFDCmNCFG register is 2 Tq. It is specified 4 Tq in the manual. 5. The maximum number of message RAM area the controller can use is 3584 bytes. It is specified 10752 bytes in the manual. Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> Acked-by: Rob Herring <robh@kernel.org> Reviewed-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * can: bcm: add documentation for CAN FD supportOliver Hartkopp2016-06-171-1/+24
| | | | | | | | | | Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * can: bcm: add support for CAN FD framesOliver Hartkopp2016-06-172-88/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The programming API of the CAN_BCM depends on struct can_frame which is given as array directly behind the bcm_msg_head structure. To follow this schema for the CAN FD frames a new flag 'CAN_FD_FRAME' in the bcm_msg_head flags indicates that the concatenated CAN frame structures behind the bcm_msg_head are defined as struct canfd_frame. This patch adds the support to handle CAN and CAN FD frames on a per BCM-op base. Main changes: - generally use struct canfd_frames instead if struct can_frames - use canfd_frame.flags instead of can_frame.can_dlc for private BCM flags - make all CAN frame sizes depending on the new CAN_FD_FRAME flags - separate between CAN and CAN FD when sending/receiving frames Due to the dependence of the CAN_FD_FRAME flag the former binary interface for classic CAN frames remains stable. Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * can: bcm: unify bcm_msg_head handling and prepare function parametersOliver Hartkopp2016-06-171-25/+29
| | | | | | | | | | Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * can: bcm: use CAN frame instead of can_frame in commentsOliver Hartkopp2016-06-171-16/+16
| | | | | | | | | | | | | | | | can_frame is the name of the struct can_frame which is not meant in the corrected comments. Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * can: bcm: fix indention and other minor style issuesOliver Hartkopp2016-06-171-14/+12Star
| | | | | | | | | | Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * can: gs_usb: add ethtool set_phys_id callback to locate physical deviceMaximilian Schneider2016-06-171-31/+85
| | | | | | | | | | | | | | | | | | | | | | This patch Implements the ethtool set_phys_id callback to ease the locating of specific physical devices. Currently only supported on candleLight interfaces. Signed-off-by: Hubert Denkmair <hubert@denkmair.de> Signed-off-by: Maximilian Schneider <max@schneidersoft.net> [mkl: split codingstyle change sinto separate patch] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * can: gs_usb: codingstyle: introduce use of BIT() + fix indentionMaximilian Schneider2016-06-171-11/+14
| | | | | | | | | | | | | | | | | | | | This patch converts "1 << n" by BIT(n) and fixes the indention. No functional change. Signed-off-by: Hubert Denkmair <hubert@denkmair.de> Signed-off-by: Maximilian Schneider <max@schneidersoft.net> [mkl: split codingstyle changes into separate patch] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * can: tscan1: Utilize the module_isa_driver macroWilliam Breathitt Gray2016-06-171-11/+1Star
| | | | | | | | | | | | | | | | | | This driver does not do anything special in module init/exit. This patch eliminates the module init/exit boilerplate code by utilizing the module_isa_driver macro. Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * can: slcan: Replace sizeof struct can_frame with CAN_MTUMarek Vasut2016-06-171-2/+2
| | | | | | | | | | | | | | | | | | | | Use CAN_MTU macro instead of sizeof(struct can_frame) just like the other drivers do. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Oliver Hartkopp <socketcan@hartkopp.net> Cc: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>