1. 23 11月, 2015 1 次提交
    • M
      can: sja1000: clear interrupts on start · 7cecd9ab
      Mirza Krak 提交于
      According to SJA1000 data sheet error-warning (EI) interrupt is not
      cleared by setting the controller in to reset-mode.
      
      Then if we have the following case:
      - system is suspended (echo mem > /sys/power/state) and SJA1000 is left
        in operating state
      - A bus error condition occurs which activates EI interrupt, system is
        still suspended which means EI interrupt will be not be handled nor
        cleared.
      
      If the above two events occur, on resume there is no way to return the
      SJA1000 to operating state, except to cycle power to it.
      
      By simply reading the IR register on start we will clear any previous
      conditions that could be present.
      Signed-off-by: NMirza Krak <mirza.krak@hostmobility.com>
      Reported-by: NChristian Magnusson <Christian.Magnusson@semcon.com>
      Cc: linux-stable <stable@vger.kernel.org>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      7cecd9ab
  2. 30 10月, 2015 1 次提交
  3. 28 10月, 2015 1 次提交
  4. 13 10月, 2015 3 次提交
  5. 30 9月, 2015 1 次提交
  6. 21 9月, 2015 7 次提交
  7. 18 9月, 2015 1 次提交
  8. 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
  9. 20 8月, 2015 2 次提交
  10. 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
  11. 15 7月, 2015 12 次提交
  12. 13 7月, 2015 7 次提交
  13. 22 6月, 2015 1 次提交