1. 20 10月, 2009 1 次提交
    • W
      can: provide library functions for skb allocation · 7b6856a0
      Wolfgang Grandegger 提交于
      This patch makes the private functions alloc_can_skb() and
      alloc_can_err_skb() of the at91_can driver public and adapts all
      drivers to use these. While making the patch I realized, that
      the skb's are *not* setup consistently. It's now done as shown
      below:
      
        skb->protocol = htons(ETH_P_CAN);
        skb->pkt_type = PACKET_BROADCAST;
        skb->ip_summed = CHECKSUM_UNNECESSARY;
        *cf = (struct can_frame *)skb_put(skb, sizeof(struct can_frame));
        memset(*cf, 0, sizeof(struct can_frame));
      
      The frame is zeroed out to avoid uninitialized data to be passed to
      user space. Some drivers or library code did not set "pkt_type" or
      "ip_summed". Also,  "__constant_htons()" should not be used for
      runtime invocations, as pointed out by David Miller.
      Signed-off-by: NWolfgang Grandegger <wg@grandegger.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7b6856a0
  2. 13 10月, 2009 1 次提交
  3. 08 10月, 2009 1 次提交
  4. 26 9月, 2009 1 次提交
  5. 25 9月, 2009 1 次提交
  6. 23 9月, 2009 1 次提交
  7. 22 9月, 2009 1 次提交
  8. 15 9月, 2009 1 次提交
  9. 04 9月, 2009 3 次提交
    • W
      can: sja1000: legacy SJA1000 ISA bus driver · 2a6ba39a
      Wolfgang Grandegger 提交于
      This patch adds support for legacy SJA1000 CAN controllers on the ISA
      or PC-104 bus. The I/O port or memory address and the IRQ number must
      be specified via module parameters:
      
        insmod sja1000_isa.ko port=0x310,0x380 irq=7,11
      
      for ISA devices using I/O ports or:
      
        insmod sja1000_isa.ko mem=0xd1000,0xd1000 irq=7,11
      
      for memory mapped ISA devices.
      
      Indirect access via address and data port is supported as well:
      
        insmod sja1000_isa.ko port=0x310,0x380 indirect=1 irq=7,11
      
      Here is a full list of the supported module parameters:
      
        port:I/O port number (array of ulong)
        mem:I/O memory address (array of ulong)
        indirect:Indirect access via address and data port (array of byte)
        irq:IRQ number (array of int)
        clk:External oscillator clock frequency (default=16000000 [16 MHz])
            (array of int)
        cdr:Clock divider register (default=0x48 [CDR_CBP | CDR_CLK_OFF])
            (array of byte)
        ocr:Output clock register (default=0x18 [OCR_TX0_PUSHPULL])
            (array of byte)
      
      Note: for clk, cdr, ocr, the first argument re-defines the default
      for all other devices, e.g.:
      
       insmod sja1000_isa.ko mem=0xd1000,0xd1000 irq=7,11 clk=24000000
      
      is equivalent to
      
       insmod sja1000_isa.ko mem=0xd1000,0xd1000 irq=7,11 \
                             clk=24000000,24000000
      Signed-off-by: NWolfgang Grandegger <wg@grandegger.com>
      Tested-by: NOliver Hartkopp <oliver@hartkopp.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2a6ba39a
    • W
      can: sja1000: fix network statistics update · 8935f57e
      Wolfgang Grandegger 提交于
      The member "tx_bytes" of "struct net_device_stats" should be
      incremented when the interrupt is done and an "arbitration
      lost error" is a TX error and the statistics should be updated
      accordingly.
      Signed-off-by: NWolfgang Grandegger <wg@grandegger.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8935f57e
    • W
      can: add can_free_echo_skb() for upcoming drivers · 39e3ab6f
      Wolfgang Grandegger 提交于
      This patch adds the function can_free_echo_skb to the CAN
      device interface to allow upcoming drivers to release echo
      skb's in case of error.
      Signed-off-by: NWolfgang Grandegger <wg@grandegger.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      39e3ab6f
  10. 03 9月, 2009 1 次提交
  11. 01 9月, 2009 2 次提交
  12. 14 8月, 2009 1 次提交
  13. 24 7月, 2009 1 次提交
  14. 21 7月, 2009 3 次提交
  15. 06 7月, 2009 1 次提交
  16. 23 6月, 2009 1 次提交
    • H
      can: let SJA1000 driver depend on HAS_IOMEM · fec37ab5
      Heiko Carstens 提交于
      Fixes this compile error on s390:
      
      drivers/net/can/sja1000/sja1000_platform.c: In function 'sp_read_reg':
      drivers/net/can/sja1000/sja1000_platform.c:42: error: implicit declaration of function 'ioread8'
      drivers/net/can/sja1000/sja1000_platform.c: In function 'sp_write_reg':
      drivers/net/can/sja1000/sja1000_platform.c:47: error: implicit declaration of function 'iowrite8'
      drivers/net/can/sja1000/sja1000_platform.c: In function 'sp_probe':
      drivers/net/can/sja1000/sja1000_platform.c:79: error: implicit declaration of function 'ioremap_nocache'
      
      Cc: Wolfgang Grandegger <wg@grandegger.com>
      Cc: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fec37ab5
  17. 10 6月, 2009 1 次提交
  18. 01 6月, 2009 3 次提交
  19. 19 5月, 2009 5 次提交
  20. 18 12月, 2008 1 次提交
  21. 16 12月, 2008 1 次提交
  22. 29 1月, 2008 1 次提交