* [PATCH 0/2] sh: Fix IDE on landisk
@ 2026-10-17 4:14 Daniel Palmer
2026-10-17 4:14 ` [PATCH 1/2] ata: pata_artop: read the ATP865 mode register through pci_iomap Daniel Palmer
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Daniel Palmer @ 2026-10-17 4:14 UTC (permalink / raw)
To: ysato, dalias, glaubitz, dlemoal, cassel, linux-sh, linux-ide
Cc: geert, linux-kernel, Daniel Palmer
I dug out my landisk to look at kexec for Geert. Since I'm lazy and
LLMs are good at fixing bitrot I let my LLM work out how to get
it to boot again.
There are some other issues (perf is apparently borken, there are
some issues with the decompresor and big kernels..) but this
seems to be the only thing stopping it booting with the defconfig.
Disclaimer since we don't need to give LLM tags anymore:
- LLM debugged the issue.
- It has been checked on real hardware.
- I have checked the IDE driver patch, cleaned it up and
cleaned out massive walls of text that LLMs seem to like
to add but I have left its summary of the issue in the commit
message.
Daniel Palmer (2):
ata: pata_artop: read the ATP865 mode register through pci_iomap
sh: landisk_defconfig: enable PATA_ARTOP for the ATP865
arch/sh/configs/landisk_defconfig | 2 +-
drivers/ata/pata_artop.c | 12 ++++++++++--
2 files changed, 11 insertions(+), 3 deletions(-)
--
2.55.0
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 1/2] ata: pata_artop: read the ATP865 mode register through pci_iomap 2026-10-17 4:14 [PATCH 0/2] sh: Fix IDE on landisk Daniel Palmer @ 2026-10-17 4:14 ` Daniel Palmer 2026-10-17 4:14 ` [PATCH 2/2] sh: landisk_defconfig: enable PATA_ARTOP for the ATP865 Daniel Palmer 2026-10-17 7:48 ` [PATCH 0/2] sh: Fix IDE on landisk John Paul Adrian Glaubitz 2 siblings, 0 replies; 5+ messages in thread From: Daniel Palmer @ 2026-10-17 4:14 UTC (permalink / raw) To: ysato, dalias, glaubitz, dlemoal, cassel, linux-sh, linux-ide Cc: geert, linux-kernel, Daniel Palmer artop_init_one() probes the 6280's "fast" bit with inb() on the raw start address of BAR 4. That address is a PCI I/O address, which is only a usable port number on platforms whose I/O port base maps PCI I/O space one to one. On an SH7751 LANDISK (identity io_port_base, PCI I/O window at 0xfe240000) the resource starts at 0x1400 and inb(0x1400) dereferences that address: BUG: unable to handle kernel paging request at 00001400 PC is at artop_init_one+0x10e/0x170 Map the BAR with pci_iomap() and use ioread8(), as libata-sff does for the BMDMA registers later on. Signed-off-by: Daniel Palmer <daniel@0x0f.com> --- drivers/ata/pata_artop.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c index 9f8d41639a62..351ff4c8e48e 100644 --- a/drivers/ata/pata_artop.c +++ b/drivers/ata/pata_artop.c @@ -405,13 +405,21 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id) case 1: /* 6260 */ ppi[0] = &info_626x; break; - case 2: /* 6280 or 6280 + fast */ - if (inb(pci_resource_start(pdev, 4)) & 0x10) + case 2: { /* 6280 or 6280 + fast */ + void __iomem *bmdma = pci_iomap(pdev, 4, 1); + u8 cfg; + + if (!bmdma) + return -ENOMEM; + cfg = ioread8(bmdma); + pci_iounmap(pdev, bmdma); + if (cfg & 0x10) ppi[0] = &info_628x_fast; else ppi[0] = &info_628x; break; } + } BUG_ON(ppi[0] == NULL); -- 2.55.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] sh: landisk_defconfig: enable PATA_ARTOP for the ATP865 2026-10-17 4:14 [PATCH 0/2] sh: Fix IDE on landisk Daniel Palmer 2026-10-17 4:14 ` [PATCH 1/2] ata: pata_artop: read the ATP865 mode register through pci_iomap Daniel Palmer @ 2026-10-17 4:14 ` Daniel Palmer 2026-10-17 7:48 ` [PATCH 0/2] sh: Fix IDE on landisk John Paul Adrian Glaubitz 2 siblings, 0 replies; 5+ messages in thread From: Daniel Palmer @ 2026-10-17 4:14 UTC (permalink / raw) To: ysato, dalias, glaubitz, dlemoal, cassel, linux-sh, linux-ide Cc: geert, linux-kernel, Daniel Palmer The landisk defconfig currently has a similar but incorrect IDE driver selected so IDE doesn't work out of the box. Select the right one. Signed-off-by: Daniel Palmer <daniel@0x0f.com> --- arch/sh/configs/landisk_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sh/configs/landisk_defconfig b/arch/sh/configs/landisk_defconfig index 2b7e10c9acee..6b5ec1f3ad71 100644 --- a/arch/sh/configs/landisk_defconfig +++ b/arch/sh/configs/landisk_defconfig @@ -28,7 +28,7 @@ CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_RAM=y CONFIG_ATA=y CONFIG_ATA_GENERIC=y -CONFIG_PATA_ATP867X=y +CONFIG_PATA_ARTOP=y CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y CONFIG_BLK_DEV_SR=y -- 2.55.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] sh: Fix IDE on landisk 2026-10-17 4:14 [PATCH 0/2] sh: Fix IDE on landisk Daniel Palmer 2026-10-17 4:14 ` [PATCH 1/2] ata: pata_artop: read the ATP865 mode register through pci_iomap Daniel Palmer 2026-10-17 4:14 ` [PATCH 2/2] sh: landisk_defconfig: enable PATA_ARTOP for the ATP865 Daniel Palmer @ 2026-10-17 7:48 ` John Paul Adrian Glaubitz 2026-10-18 14:48 ` Geert Uytterhoeven 2 siblings, 1 reply; 5+ messages in thread From: John Paul Adrian Glaubitz @ 2026-10-17 7:48 UTC (permalink / raw) To: Daniel Palmer, ysato, dalias, dlemoal, cassel, linux-sh, linux-ide Cc: geert, linux-kernel Hi Daniel, On Sat, 2026-10-17 at 13:14 +0900, Daniel Palmer wrote: > I dug out my landisk to look at kexec for Geert. Since I'm lazy and > LLMs are good at fixing bitrot I let my LLM work out how to get > it to boot again. > > There are some other issues (perf is apparently borken, there are > some issues with the decompresor and big kernels..) but this > seems to be the only thing stopping it booting with the defconfig. > > Disclaimer since we don't need to give LLM tags anymore: > - LLM debugged the issue. > - It has been checked on real hardware. > - I have checked the IDE driver patch, cleaned it up and > cleaned out massive walls of text that LLMs seem to like > to add but I have left its summary of the issue in the commit > message. > > Daniel Palmer (2): > ata: pata_artop: read the ATP865 mode register through pci_iomap > sh: landisk_defconfig: enable PATA_ARTOP for the ATP865 > > arch/sh/configs/landisk_defconfig | 2 +- > drivers/ata/pata_artop.c | 12 ++++++++++-- > 2 files changed, 11 insertions(+), 3 deletions(-) Great, thanks for fixing this. While I have LANDISK hardware myself, I cannot probably set it up fast enough now to test your patches as I don't know where I put it after moving places. I hope Geert can test and review your patches and I'll pick them up with his Reviewed-by and Tested-by signatures. Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] sh: Fix IDE on landisk 2026-10-17 7:48 ` [PATCH 0/2] sh: Fix IDE on landisk John Paul Adrian Glaubitz @ 2026-10-18 14:48 ` Geert Uytterhoeven 0 siblings, 0 replies; 5+ messages in thread From: Geert Uytterhoeven @ 2026-10-18 14:48 UTC (permalink / raw) To: Daniel Palmer Cc: John Paul Adrian Glaubitz, dalias, dlemoal, cassel, linux-sh, linux-ide, linux-kernel, Yoshinori Sato Hi Daniel, On Sat, 17 Oct 2026 at 09:48, John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> wrote: > On Sat, 2026-10-17 at 13:14 +0900, Daniel Palmer wrote: > > I dug out my landisk to look at kexec for Geert. Since I'm lazy and > > LLMs are good at fixing bitrot I let my LLM work out how to get > > it to boot again. > > > > There are some other issues (perf is apparently borken, there are > > some issues with the decompresor and big kernels..) but this > > seems to be the only thing stopping it booting with the defconfig. > > > > Disclaimer since we don't need to give LLM tags anymore: > > - LLM debugged the issue. > > - It has been checked on real hardware. > > - I have checked the IDE driver patch, cleaned it up and > > cleaned out massive walls of text that LLMs seem to like > > to add but I have left its summary of the issue in the commit > > message. > > > > Daniel Palmer (2): > > ata: pata_artop: read the ATP865 mode register through pci_iomap > > sh: landisk_defconfig: enable PATA_ARTOP for the ATP865 > > > > arch/sh/configs/landisk_defconfig | 2 +- > > drivers/ata/pata_artop.c | 12 ++++++++++-- > > 2 files changed, 11 insertions(+), 3 deletions(-) > > Great, thanks for fixing this. While I have LANDISK hardware myself, > I cannot probably set it up fast enough now to test your patches as > I don't know where I put it after moving places. > > I hope Geert can test and review your patches and I'll pick them up > with his Reviewed-by and Tested-by signatures. Sorry, I must have different hardware, as mine doesn't have an ATP865 PCI device: # lspci 00:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 20) 00:02.0 USB Controller: NEC Corporation USB (rev 43) 00:02.1 USB Controller: NEC Corporation USB (rev 43) 00:02.2 USB Controller: NEC Corporation USB 2.0 (rev 04) My CF rootfs uses pata_platform, which is enabled in my working .config. landisk_defconfig lacks CONFIG_PATA_PLATFORM=y, so it hangs during boot. After enabling that, the boot gets further, but it still hangs: INIT: Id "1" respawning too fast: disabled for 5 minutes INIT: Id "2" respawning too fast: disabled for 5 minutes INIT: no more processes left in this runlevel Adding CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y to landisk_defconfig fixes that. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-10-18 14:48 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2026-10-17 4:14 [PATCH 0/2] sh: Fix IDE on landisk Daniel Palmer 2026-10-17 4:14 ` [PATCH 1/2] ata: pata_artop: read the ATP865 mode register through pci_iomap Daniel Palmer 2026-10-17 4:14 ` [PATCH 2/2] sh: landisk_defconfig: enable PATA_ARTOP for the ATP865 Daniel Palmer 2026-10-17 7:48 ` [PATCH 0/2] sh: Fix IDE on landisk John Paul Adrian Glaubitz 2026-10-18 14:48 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®