Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Sergey Shtylyov <s.shtylyov@omp.ru>
To: Damien Le Moal <dlemoal@kernel.org>, <linux-ide@vger.kernel.org>,
	Niklas Cassel <cassel@kernel.org>
Cc: <lvc-project@linuxtesting.org>
Subject: Re: [PATCH] ata: ata_generic: use IS_ENABLED() macro
Date: Wed, 11 Sep 2024 20:14:32 +0300	[thread overview]
Message-ID: <5bed15cf-b6c2-62e9-c23d-7a3c94f2dcc2@omp.ru> (raw)
In-Reply-To: <9d7e0d4f-1445-4729-9e4d-9058c35db1b2@kernel.org>

On 9/11/24 1:22 AM, Damien Le Moal wrote:
[...]
>> [Resending after adding the missed test, please ignore the previus reply.)

   Oops, some more typos! :-)

[...]
>>>>>> with the new-fangled IS_ENABLED() macro in the ata_generic[] definition.
>>>>>
>>>>> Please mention that CONFIG_PATA_TOSHIBA_MODULE actually does not exist at all
>>>>> and so can be removed.
>>>>
>>>>    Huh? =)
>>>>    CONFIG_PATA_TOSHIBA is a tristate option, so CONFIG_PATA_TOSHIBA_MODULE
>>>> does exist; else there would be no point in using IS_ENABLED() at all...
>>>
>>> Oops... Indeed. Got confused with something else :)
>>
>>    There's something to be confused about this driver vs its Kconfig option
>> naming: the driver is called pata_piccolo.c and its option CONFIG_PATA_TOSHIBA.
>> However, Toshiba seemingly has more than one family of the PATA controllers:
>> there's also TC86C001 PCI multi-function chip (dubbed GOKU-S by Toshiba) which
>> supports up to UDMA66 and doesn't seem compatible with Piccolo, judging by the
>> driver code and Toshiba GOKU-S datasheet I have: the timing regs are mapped @
>> AR5 and not in the PCI config space, like with the Piccolo chips.

   I'm sure I typed BAR5 but apparently B went somewhere with further editing... :-)

>>    If somebody like me (it was me who submitted the reworked Toshiba's TC86C001
>> driver for drivers/ide/ back in 2007) added TC86C001 libata driver, the confusion
>> would probably worsen... :-/ Luckily, the chip is a bit tricky (I had to somewhat

   If you want to see the original patch:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=33dced2ea5ed03dda10e7f9f41f0910f32e02eaa

   Some fragments of the patch lived thru the drivers/ide/ removal, see e.g.:

https://elixir.bootlin.com/linux/v6.11-rc1/source/drivers/pci/quirks.c#L2319

>> abuse drivers/ide/ to work around some "limitations", as Toshiba calls their errata)
>> and I don't have access to the chip to properly test the driver anymore.  Obviously, there should be a little interest now in adding the "new" PATA drivers... :-)

   The interesting fact is that the TC86C001 (GOUKU-S) USB device controller (PCI function #2) is still supported by its own driver (drivers/usb/gadget/udc/goku_udc.c), mereg back in 2004... :-)

>>    Any thoughts on the naming confusion?
> 
> Maybe rename the option to CONFIG_PATA_TOSHIBA_PICCCOLO ?

   Nah, that doesn't make much sense to me; if we rename it, we should match the driver's name, i.e. make it CONFIG_PATA_PICCOLO.  I'm mainly concerned about the
Linux distros which would have to handle such rename somehow, IIUC...

[...[

MBR, Sergey

  reply	other threads:[~2024-09-11 17:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-09 20:51 [PATCH] ata: ata_generic: use IS_ENABLED() macro Sergey Shtylyov
2024-09-10  4:50 ` Damien Le Moal
2024-09-10  8:52   ` Sergey Shtylyov
2024-09-10 13:09     ` Damien Le Moal
2024-09-10 14:32       ` Sergey Shtylyov
2024-09-10 14:36       ` Sergey Shtylyov
2024-09-10 22:22         ` Damien Le Moal
2024-09-11 17:14           ` Sergey Shtylyov [this message]
2024-09-13  6:57             ` Niklas Cassel
2024-09-13 19:36               ` Sergey Shtylyov
2024-09-14 17:53           ` Sergey Shtylyov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5bed15cf-b6c2-62e9-c23d-7a3c94f2dcc2@omp.ru \
    --to=s.shtylyov@omp.ru \
    --cc=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox