Re: [RFC 0/6] pcmcia: separate 16-bit support from cardbus

From: Arnd Bergmann
Date: Mon Feb 27 2023 - 15:00:57 EST


On Mon, Feb 27, 2023, at 20:07, Oliver Hartkopp wrote:
> Hello Arnd,
>
> On 27.02.23 14:34, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> (..)
>
>> The remaining cardbus/yenta support is essentially a PCI hotplug driver
>> with a slightly unusual sysfs interface, and it would still support all
>> 32-bit cardbus hosts and cards, but no longer work with the even older
>> 16-bit cards that require the pcmcia_driver infrastructure.
>
> I'm using a 2005 Samsung X20 laptop (Pentium M 1.6GHz, Centrino) with
> PCMCIA (type 2) CAN bus cards:
>
> - EMS PCMCIA
> https://elixir.bootlin.com/linux/latest/source/drivers/net/can/sja1000/ems_pcmcia.c
>
> - PEAK PCCard
> https://elixir.bootlin.com/linux/latest/source/drivers/net/can/sja1000/peak_pcmcia.c
>
> As I still maintain the EMS PCMCIA and had to tweak and test a patch
> recently (with a 5.16-rc2 kernel):
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/net/can/sja1000/ems_pcmcia.c?id=3ec6ca6b1a8e64389f0212b5a1b0f6fed1909e45
>
> I assume these CAN bus PCMCIA interfaces won't work after your patch
> set, right?

Correct, the patch series in its current form breaks this since
your laptop is cardbus compatible. The options I can see are:

- abandon my series and keep everything unchanged, possibly removing
some of the pcmcia drivers that Dominik identified as candidates

- decide on a future timeline for when you are comfortable with
discontinuing this setup and require any CAN users with cardbus
laptops to move to USB or cardbus CAN adapters, apply the series
then

- duplicate the yenta_socket driver to have two variants of that,
require the user to choose between the cardbus and the pcmcia
variant depending on what card is going to be used.

Can you give more background on who is using the EMS PCMCIA card?
I.e. are there reasons to use this device on modern kernels with
machines that could also support the USB, expresscard or cardbus
variants, or are you likely the only one doing this for the
purpose of maintaining the driver?

Arnd