Skip to content

i2c: SMBus ARP support

Heikki Krogerus linux-i2c lkml netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 13 repliesIn review
  2. v14 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- Using kzalloc instead of kzalloc_obj. kzalloc_obj() is clearly not ready yet (scripts/checkpatch.pl should not promote it yet).

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4i2c: SMBus Address Resolution Protocol implementation for host sidedrivers/i2c/Makefile drivers/i2c/i2c-core-arp.c drivers/i2c/i2c-core-base.c +6 more+503 -100 replies
2/4i2c: Sysfs attribute files for the Unique Device Identifier fieldsDocumentation/ABI/testing/sysfs-bus-i2c drivers/i2c/i2c-core-base.c+159 -10 replies
3/4mctp i2c: Enable SMBus ARP discoverydrivers/net/mctp/mctp-i2c.c+8 -05 replies
4/4i2c: Add SMBus ARP target mode test driverdrivers/i2c/Kconfig drivers/i2c/Makefile drivers/i2c/i2c-target-arp.c+208 -00 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchJakub Kicinski
1/4
2/4
3/4A-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/4] i2c: SMBus ARP support

Hi,

Changed in v2:

- Using kzalloc instead of kzalloc_obj. kzalloc_obj() is clearly not ready yet (scripts/checkpatch.pl should not promote it yet).

Original cover letter:

I know there has been a couple of PoCs for ARP over the years, but for what ever reason none of them were ever made part of the kernel. I don't know how common ARP-capable devices are, but since they do exist, we really should enumerate them as intended. I'm guessing that in Linux ARP-capable devices have so far been left mostly undetected.

The problem I'm trying to tackle with these is to detect SMBus devices on discrete components like PCIe cards. We obviously won't have any kind ACPI or DT description for those, so we would always have to create the device for them in the drivers. Unfortunately in some cases it's actually very difficult to know what exactly is attached to the I2C on those cards because the vendors can put what ever they like there - this is the case at least with some of the GPUs it seems. But luckily those I2C/SMBus devices are at least in some cases fully ARP-capable.

I'm including a patch that binds the detected ARP-capable MCTP devices to the driver. There is also a target mode test driver.

thanks,

Heikki Krogerus (4):
i2c: SMBus Address Resolution Protocol implementation for host side
i2c: Sysfs attribute files for the Unique Device Identifier fields mctp i2c: Enable SMBus ARP discovery
i2c: Add SMBus ARP target mode test driver

 Documentation/ABI/testing/sysfs-bus-i2c |  53 ++++
 drivers/i2c/Kconfig                     |   6 +
 drivers/i2c/Makefile                    |   3 +-
 drivers/i2c/i2c-core-arp.c              | 334 ++++++++++++++++++++++++
 drivers/i2c/i2c-core-base.c             | 154 ++++++++++-
 drivers/i2c/i2c-core.h                  |   8 +
 drivers/i2c/i2c-target-arp.c            | 201 ++++++++++++++
 drivers/net/mctp/mctp-i2c.c             |   8 +
 include/linux/i2c-smbus.h               |  67 +++++
 include/linux/i2c.h                     |  10 +
 include/linux/mod_devicetable.h         |  13 +
 scripts/mod/devicetable-offsets.c       |   8 +
 scripts/mod/file2alias.c                |  24 ++
 13 files changed, 878 insertions(+), 11 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-bus-i2c
 create mode 100644 drivers/i2c/i2c-core-arp.c
 create mode 100644 drivers/i2c/i2c-target-arp.c
Signature · 1 line
2.50.1