1. 15 1月, 2015 1 次提交
    • A
      can: kvaser_usb: Don't free packets when tight on URBs · b442723f
      Ahmed S. Darwish 提交于
      Flooding the Kvaser CAN to USB dongle with multiple reads and
      writes in high frequency caused seemingly-random panics in the
      kernel.
      
      On further inspection, it seems the driver erroneously freed the
      to-be-transmitted packet upon getting tight on URBs and returning
      NETDEV_TX_BUSY, leading to invalid memory writes and double frees
      at a later point in time.
      
      Note:
      
      Finding no more URBs/transmit-contexts and returning NETDEV_TX_BUSY
      is a driver bug in and out of itself: it means that our start/stop
      queue flow control is broken.
      
      This patch only fixes the (buggy) error handling code; the root
      cause shall be fixed in a later commit.
      Acked-by: NOlivier Sobrie <olivier@sobrie.be>
      Signed-off-by: NAhmed S. Darwish <ahmed.darwish@valeo.com>
      Cc: linux-stable <stable@vger.kernel.org>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      b442723f
  2. 25 4月, 2014 2 次提交
  3. 17 3月, 2014 2 次提交
    • C
      can: populate netdev::dev_id for udev discrimination · 3e66d013
      Christopher R. Baker 提交于
      My objective is to be able to totally discriminate CAN ports on multi-port
      cards via udev so as to rename them to semantically interesting/unique names
      for my system (e.g., "ecuCAN" and "auxCAN" instead of "can0" and "can1").
      
      The following patch assigns the dev_id field to match the channel number on all
      multi-channel devices. I can only test my two-port Peak PCI card, but it works
      as expected: ATTRS{dev_id} now expresses the port number and my udev rules now
      unambiguously pick out and rename my individual CAN ports.
      Signed-off-by: NChristopher R. Baker <cbaker@rec.ri.cmu.edu>
      Tested-by: Oliver Hartkopp <socketcan@hartkopp.net> [PEAK PCAN-USB pro and EMS PCMCIA]
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      3e66d013
    • O
      can: Unify MTU settings for CAN interfaces · c971fa2a
      Oliver Hartkopp 提交于
      CAN interfaces only support MTU values of 16 (CAN 2.0) and 72 (CAN FD).
      Setting the MTU to other values is pointless but it does not really hurt.
      With the introduction of the CAN FD support in drivers/net/can a new
      function to switch the MTU for CAN FD has been introduced.
      
      This patch makes use of this can_change_mtu() function to check for correct
      MTU settings also in legacy CAN (2.0) devices.
      Signed-off-by: NOliver Hartkopp <socketcan@hartkopp.net>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      c971fa2a
  4. 12 2月, 2014 1 次提交
  5. 17 1月, 2014 1 次提交
  6. 01 11月, 2013 1 次提交
  7. 03 6月, 2013 1 次提交
  8. 05 2月, 2013 1 次提交
  9. 27 11月, 2012 1 次提交
    • O
      can: kvaser_usb: Add support for Kvaser CAN/USB devices · 080f40a6
      Olivier Sobrie 提交于
      This driver provides support for several Kvaser CAN/USB devices.
      Such kind of devices supports up to three CAN network interfaces.
      
      It has been tested with a Kvaser USB Leaf Light (one network interface)
      connected to a pch_can interface.
      The firmware version of the Kvaser device was 2.5.205.
      
      List of Kvaser devices supported by the driver:
        - Kvaser Leaf Light
        - Kvaser Leaf Professional HS
        - Kvaser Leaf SemiPro HS
        - Kvaser Leaf Professional LS
        - Kvaser Leaf Professional SWC
        - Kvaser Leaf Professional LIN
        - Kvaser Leaf SemiPro LS
        - Kvaser Leaf SemiPro SWC
        - Kvaser Memorator II HS/HS
        - Kvaser USBcan Professional HS/HS
        - Kvaser Leaf Light GI
        - Kvaser Leaf Professional HS (OBD-II connector)
        - Kvaser Memorator Professional HS/LS
        - Kvaser Leaf Light "China"
        - Kvaser BlackBird SemiPro
        - Kvaser USBcan R
      Signed-off-by: NDaniel Berglund <db@kvaser.com>
      Signed-off-by: NOlivier Sobrie <olivier@sobrie.be>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      080f40a6