Go to file
Ji-Ze Hong 88da174369 can: usb: f81604: add Fintek F81604 support
This patch adds support for Fintek USB to 2CAN controller.

Changelog:
v7: https://lore.kernel.org/all/20230509073821.25289-1-peter_hong@fintek.com.tw
  1. Fix consistency of coding style for "break" in f81604_register_urbs().
  2. Remove goto statement in f81604_open().

v6: https://lore.kernel.org/all/20230505022317.22417-1-peter_hong@fintek.com.tw
  1. Remove non-used define and change constant mask to GENMASK().
  2. Move some variables declaration from function start to block start.
  3. Move some variables initization into declaration.
  4. Change variable "id" in f81604_start_xmit() only for CAN ID usage.

v5: https://lore.kernel.org/all/20230420024403.13830-1-peter_hong@fintek.com.tw
  1. Change all u8 *buff to struct f81604_int_data/f81604_can_frame.
  2. Change all netdev->dev_id to netdev->dev_port.
  3. Remove over design for f81604_process_rx_packet(). This device only
     report a frame at once, so the f81604_process_rx_packet() are reduced
     to process 1 frame.

v4: https://lore.kernel.org/all/20230413084253.1524-1-peter_hong@fintek.com.tw
  1. Remove f81604_prepare_urbs/f81604_remove_urbs() and alloc URB/buffer
     dynamically in f81604_register_urbs(), using "urbs_anchor" for manage
     all rx/int URBs.
  2. Add F81604 to MAINTAINERS list.
  3. Change handle_clear_reg_work/handle_clear_overrun_work to single
     clear_reg_work and using bitwise "clear_flags" to record it.
  4. Move __f81604_set_termination in front of f81604_probe() to avoid
     rarely racing condition.
  5. Add __aligned to struct f81604_int_data / f81604_sff / f81604_eff.
  6. Add aligned operations in f81604_start_xmit/f81604_process_rx_packet().
  7. Change lots of CANBUS functions first parameter from struct usb_device*
     to struct f81604_port_priv *priv. But remain f81604_write / f81604_read
     / f81604_update_bits() as struct usb_device* for
     __f81604_set_termination() in probe() stage.
  8. Simplify f81604_read_int_callback() and separate into
     f81604_handle_tx / f81604_handle_can_bus_errors() functions.

v3: https://lore.kernel.org/all/20230327051048.11589-1-peter_hong@fintek.com.tw
  1. Change CAN clock to using MEGA units.
  2. Remove USB set/get retry, only remain SJA1000 reset/operation retry.
  3. Fix all numberic constant to define.
  4. Add terminator control. (only 0 & 120 ohm)
  5. Using struct data to represent INT/TX/RX endpoints data instead byte
     arrays.
  6. Error message reports changed from %d to %pe for mnemotechnic values.
  7. Some bit operations are changed to FIELD_PREP().
  8. Separate TX functions from f81604_read_int_callback().
  9. cf->can_id |= CAN_ERR_CNT in f81604_read_int_callback to report valid
     TX/RX error counts.
  10. Move f81604_prepare_urbs/f81604_remove_urbs() from CAN open/close() to
      USB probe/disconnect().
  11. coding style refactoring.

v2: https://lore.kernel.org/all/20230321081152.26510-1-peter_hong@fintek.com.tw
  1. coding style refactoring.
  2. some const number are defined to describe itself.
  3. fix wrong usage for can_get_echo_skb() in f81604_write_bulk_callback().

v1: https://lore.kernel.org/all/20230317093352.3979-1-peter_hong@fintek.com.tw

Signed-off-by: Ji-Ze Hong (Peter Hong) <peter_hong@fintek.com.tw>
Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Link: https://lore.kernel.org/all/20230509073821.25289-1-peter_hong@fintek.com.tw
[mkl: add changelog, fix printf format]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2023-05-15 22:53:49 +02:00
arch s390: remove the unneeded select GCC12_NO_ARRAY_BOUNDS 2023-05-05 18:56:23 -07:00
block for-6.4/block-2023-05-06 2023-05-06 08:28:58 -07:00
certs KEYS: Add missing function documentation 2023-04-24 16:15:52 +03:00
crypto This push fixes the following problems: 2023-05-07 10:57:14 -07:00
Documentation docs: octeontx2: Add Documentation for QOS 2023-05-15 09:31:08 +01:00
drivers can: usb: f81604: add Fintek F81604 support 2023-05-15 22:53:49 +02:00
fs \n 2023-05-10 17:07:42 -05:00
include sch_htb: Allow HTB priority parameter in offload mode 2023-05-15 09:31:07 +01:00
init Objtool changes for v6.4: 2023-04-28 14:02:54 -07:00
io_uring for-6.4/io_uring-2023-05-07 2023-05-07 10:00:09 -07:00
ipc Merge branch 'work.namespace' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2023-02-24 19:20:07 -08:00
kernel Minor tracing updates: 2023-05-05 13:11:02 -07:00
lib Networking fixes for 6.4-rc2, including fixes from netfilter 2023-05-11 08:42:47 -05:00
LICENSES LICENSES: Add the copyleft-next-0.3.1 license 2022-11-08 15:44:01 +01:00
mm Reinstate the dmapool changes which were accidentally removed by 2023-05-06 11:43:08 -07:00
net nfc: llcp: fix possible use of uninitialized variable in nfc_llcp_send_connect() 2023-05-15 13:03:34 +01:00
rust Rust changes for v6.4 2023-04-30 11:20:22 -07:00
samples LoongArch changes for v6.4 2023-05-04 12:40:16 -07:00
scripts Locking changes in v6.4: 2023-05-05 12:56:55 -07:00
security integrity-v6.4 2023-04-29 10:11:32 -07:00
sound sound fixes for 6.4-rc1 2023-05-06 08:07:11 -07:00
tools selftests: net: vxlan: Add tests for vxlan nolocalbypass option. 2023-05-13 17:02:33 +01:00
usr initramfs: Check negative timestamp to prevent broken cpio archive 2023-04-16 17:37:01 +09:00
virt s390: 2023-05-01 12:06:20 -07:00
.clang-format cxl for v6.4 2023-04-30 11:51:51 -07:00
.cocciconfig
.get_maintainer.ignore get_maintainer: add Alan to .get_maintainer.ignore 2022-08-20 15:17:44 -07:00
.gitattributes .gitattributes: use 'dts' diff driver for *.dtso files 2023-02-26 15:28:23 +09:00
.gitignore linux-kselftest-kunit-6.4-rc1 2023-04-24 12:31:32 -07:00
.mailmap for-6.4/block-2023-05-06 2023-05-06 08:28:58 -07:00
.rustfmt.toml rust: add .rustfmt.toml 2022-09-28 09:02:20 +02:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS A handful of late-arriving documentation fixes, plus one Spanish 2023-05-05 13:16:42 -07:00
Kbuild Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS can: usb: f81604: add Fintek F81604 support 2023-05-15 22:53:49 +02:00
Makefile Linux 6.4-rc1 2023-05-07 13:34:35 -07:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.