1. 21 9月, 2015 6 次提交
  2. 18 9月, 2015 1 次提交
  3. 25 8月, 2015 1 次提交
    • M
      can: pcan_usb: don't provide CAN FD bittimings by non-FD adapters · 06b23f7f
      Marc Kleine-Budde 提交于
      The CAN FD data bittiming constants are provided via netlink only when there
      are valid CAN FD constants available in priv->data_bittiming_const.
      
      Due to the indirection of pointer assignments in the peak_usb driver the
      priv->data_bittiming_const never becomes NULL - not even for non-FD adapters.
      
      The data_bittiming_const points to zero'ed data which leads to this result
      when running 'ip -details link show can0':
      
      35: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10
          link/can  promiscuity 0
          can state STOPPED restart-ms 0
      	  pcan_usb: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
      	  : dtseg1 0..0 dtseg2 0..0 dsjw 1..0 dbrp 0..0 dbrp-inc 0  <== BROKEN!
      	  clock 8000000
      
      This patch changes the struct peak_usb_adapter::bittiming_const and struct
      peak_usb_adapter::data_bittiming_const to pointers to fix the assignemnt
      problems.
      
      Cc: linux-stable <stable@vger.kernel.org> # >= 4.0
      Reported-by: NOliver Hartkopp <socketcan@hartkopp.net>
      Tested-by: NOliver Hartkopp <socketcan@hartkopp.net>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      06b23f7f
  4. 20 8月, 2015 2 次提交
  5. 16 7月, 2015 2 次提交
    • S
      can: mcp251x: get regulators optionally · 69da3f2a
      Stefan Agner 提交于
      The regulators power and transceiver are optional. If those are not
      present, the pointer (or error pointer) is correctly handled by the
      driver, hence we can use devm_regulator_get_optional safely, which
      avoids regulators getting created.
      Signed-off-by: NStefan Agner <stefan@agner.ch>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      69da3f2a
    • S
      can: mcp251x: fix resume when device is down · 25b401c1
      Stefan Agner 提交于
      If a valid power regulator or a dummy regulator is used (which
      happens to be the case when no regulator is specified), restart_work
      is queued no matter whether the device was running or not at suspend
      time. Since work queues get initialized in the ndo_open callback,
      resuming leads to a NULL pointer exception.
      
      Reverse exactly the steps executed at suspend time:
      - Enable the power regulator in any case
      - Enable the transceiver regulator if the device was running, even in
        case we have a power regulator
      - Queue restart_work only in case the device was running
      
      Fixes: bf66f373 ("can: mcp251x: Move to threaded interrupts instead of workqueues.")
      Signed-off-by: NStefan Agner <stefan@agner.ch>
      Cc: linux-stable <stable@vger.kernel.org>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      25b401c1
  6. 15 7月, 2015 12 次提交
  7. 13 7月, 2015 7 次提交
  8. 22 6月, 2015 1 次提交
  9. 09 6月, 2015 1 次提交
  10. 07 5月, 2015 4 次提交
  11. 06 5月, 2015 1 次提交
    • A
      can: janz-ican3: add support for CAL/CANopen firmware · 844e0edf
      Andreas Gröger 提交于
      In our department we are using some older Janz ICAN3-modules in our dekstop
      pcs. There we have slightly different carrier boards than the janz-cmodio
      supported in the kernel sources, called CAN-PCI2 with two submodules. But the
      pci configuration regions are identical. So extending the supported pci devices
      to the corresponding device ids is sufficient to get the drivers working.
      
      * The old ICAN3-modules with firmware 1.28 need more then 250ms for the restart
        after reset. I've increased the timeout to 500ms.
      * The janz_ican3 module uses the raw can services of the Janz-firmware, this
        means firmware must be ICANOS/2. Our ICAN3-modules are equipped with
        CAL/CANopen-firmware, so I must use the appropriate commands for the layer
        management services.
      
      Te driver detects the firmware after module reset and selects the commands
      matching the firmware. This affects the bus on/off-command
      (ican3_set_bus_state) and the configuration of the bittiming
      (ican3_set_bittiming). For better diagnostics the detected firmware string is
      presented as sysfs attribute (fwinfo).
      Signed-off-by: NAndreas Gröger <andreas24groeger@gmail.com>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      844e0edf
  12. 01 5月, 2015 1 次提交
  13. 28 4月, 2015 1 次提交