Message ID | 20170309135714.GJ21222@n2100.armlinux.org.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi, On Thursday, March 09, 2017 01:57:15 PM Russell King - ARM Linux wrote: > On Thu, Mar 09, 2017 at 03:24:56PM +0300, Sergei Shtylyov wrote: > > On 03/09/2017 03:20 PM, Sekhar Nori wrote: > > > > >[...] > > > > >>>diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c > > >>>b/arch/arm/mach-davinci/board-dm644x-evm.c > > >>>index 023480b75244..60a1f23890cd 100644 > > >>>--- a/arch/arm/mach-davinci/board-dm644x-evm.c > > >>>+++ b/arch/arm/mach-davinci/board-dm644x-evm.c > > >>>@@ -744,7 +744,7 @@ static int davinci_phy_fixup(struct phy_device > > >>>*phydev) > > >>> return 0; > > >>> } > > >>> > > >>>-#define HAS_ATA IS_ENABLED(CONFIG_BLK_DEV_PALMCHIP_BK3710) > > >>>+#define HAS_ATA IS_ENABLED(CONFIG_PATA_BK3710) > > >> > > >> I think it would be more correct to check for both libata and IDE > > >>drivers here... > > > > > >As I understand, the plan is to remove the IDE driver soon. > > > > I'm not sure DaveM would support any removals in drivers/ide/. He has > > explicitly expressed his will to maintain the IDE driuver forever. > > As I keep saying, there are ARM machines where the IDE driver works but > the PATA driver doesn't. EBSA110's PCMCIA slots for instance. Please be more specific, I'll be happy to help with migrating this machines to libata PATA. BTW the example you're giving has never worked with the old IDE driver in the upstream kernel. > Yes, it's very obscure - but what it comes down to is the silly way the > "ISA" IO is handled on the platform (which depends whether it's an 8-bit > or 16-bit ISA-style peripheral.) The old IDE CS driver _could_ be bent > to work via a patch like this: > > ARM: EBSA110: Enable 16-bit IO type for ide-iops > > diff --git a/arch/arm/Makefile b/arch/arm/Makefile > index 047a20780fc1..2eb501d6b5fe 100644 > --- a/arch/arm/Makefile > +++ b/arch/arm/Makefile > @@ -217,7 +217,8 @@ ifeq ($(CONFIG_ARCH_EBSA110),y) > # This is what happens if you forget the IOCS16 line. > # PCMCIA cards stop working. > CFLAGS_3c589_cs.o :=-DISA_SIXTEEN_BIT_PERIPHERAL > -export CFLAGS_3c589_cs.o > +CFLAGS_ide-io-std.o :=-DISA_SIXTEEN_BIT_PERIPHERAL > +export CFLAGS_3c589_cs.o CFLAGS_ide-io-std.o > endif As I've already explained in the past, the proper fix for the problem (for both old IDE and libata) is to define custom transport ops in ide-cs.c/ata_pcmcia.c and use them on affected platforms. > # The byte offset of the kernel image in RAM from the start of RAM. > > but the PATA driver is much harder. There are a lot examples of using your own transport operations in existing code (i.e. pata_octeon_cf.c or drivers/ata/sata_rcar.c). Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics
On Thu, Mar 09, 2017 at 03:42:49PM +0100, Bartlomiej Zolnierkiewicz wrote: > > Hi, > > On Thursday, March 09, 2017 01:57:15 PM Russell King - ARM Linux wrote: > > On Thu, Mar 09, 2017 at 03:24:56PM +0300, Sergei Shtylyov wrote: > > > On 03/09/2017 03:20 PM, Sekhar Nori wrote: > > > > > > >[...] > > > > > > >>>diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c > > > >>>b/arch/arm/mach-davinci/board-dm644x-evm.c > > > >>>index 023480b75244..60a1f23890cd 100644 > > > >>>--- a/arch/arm/mach-davinci/board-dm644x-evm.c > > > >>>+++ b/arch/arm/mach-davinci/board-dm644x-evm.c > > > >>>@@ -744,7 +744,7 @@ static int davinci_phy_fixup(struct phy_device > > > >>>*phydev) > > > >>> return 0; > > > >>> } > > > >>> > > > >>>-#define HAS_ATA IS_ENABLED(CONFIG_BLK_DEV_PALMCHIP_BK3710) > > > >>>+#define HAS_ATA IS_ENABLED(CONFIG_PATA_BK3710) > > > >> > > > >> I think it would be more correct to check for both libata and IDE > > > >>drivers here... > > > > > > > >As I understand, the plan is to remove the IDE driver soon. > > > > > > I'm not sure DaveM would support any removals in drivers/ide/. He has > > > explicitly expressed his will to maintain the IDE driuver forever. > > > > As I keep saying, there are ARM machines where the IDE driver works but > > the PATA driver doesn't. EBSA110's PCMCIA slots for instance. > > Please be more specific, I'll be happy to help with migrating this > machines to libata PATA. > > BTW the example you're giving has never worked with the old IDE > driver in the upstream kernel. That's where you are wrong. It worked for 10+ years with no modifications in the upstream IDE driver or ide-cs driver - only the patch I quoted was required.
On Thursday, March 09, 2017 03:42:49 PM Bartlomiej Zolnierkiewicz wrote: > > Yes, it's very obscure - but what it comes down to is the silly way the > > "ISA" IO is handled on the platform (which depends whether it's an 8-bit > > or 16-bit ISA-style peripheral.) The old IDE CS driver _could_ be bent > > to work via a patch like this: > > > > ARM: EBSA110: Enable 16-bit IO type for ide-iops > > > > diff --git a/arch/arm/Makefile b/arch/arm/Makefile > > index 047a20780fc1..2eb501d6b5fe 100644 > > --- a/arch/arm/Makefile > > +++ b/arch/arm/Makefile > > @@ -217,7 +217,8 @@ ifeq ($(CONFIG_ARCH_EBSA110),y) > > # This is what happens if you forget the IOCS16 line. > > # PCMCIA cards stop working. > > CFLAGS_3c589_cs.o :=-DISA_SIXTEEN_BIT_PERIPHERAL > > -export CFLAGS_3c589_cs.o > > +CFLAGS_ide-io-std.o :=-DISA_SIXTEEN_BIT_PERIPHERAL > > +export CFLAGS_3c589_cs.o CFLAGS_ide-io-std.o > > endif > > As I've already explained in the past, the proper fix for the problem > (for both old IDE and libata) is to define custom transport ops in > ide-cs.c/ata_pcmcia.c and use them on affected platforms. > > > # The byte offset of the kernel image in RAM from the start of RAM. > > > > but the PATA driver is much harder. > > There are a lot examples of using your own transport operations in > existing code (i.e. pata_octeon_cf.c or drivers/ata/sata_rcar.c). Basically it should come down to copypasting all transport ops from libata-sff.c and replacing all ioread8()/iowrite8() with __inb16()__outb16(). Then you need to add detection of EBSA1100 which should also be as simple as using machine_is_ebsa110() in the proper place. If you ever get to running current upstream on your EBSA110 I can provide you with the draft patch doing this. Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics
On Thursday, March 09, 2017 02:51:47 PM Russell King - ARM Linux wrote: > On Thu, Mar 09, 2017 at 03:42:49PM +0100, Bartlomiej Zolnierkiewicz wrote: > > > > Hi, > > > > On Thursday, March 09, 2017 01:57:15 PM Russell King - ARM Linux wrote: > > > On Thu, Mar 09, 2017 at 03:24:56PM +0300, Sergei Shtylyov wrote: > > > > On 03/09/2017 03:20 PM, Sekhar Nori wrote: > > > > > > > > >[...] > > > > > > > > >>>diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c > > > > >>>b/arch/arm/mach-davinci/board-dm644x-evm.c > > > > >>>index 023480b75244..60a1f23890cd 100644 > > > > >>>--- a/arch/arm/mach-davinci/board-dm644x-evm.c > > > > >>>+++ b/arch/arm/mach-davinci/board-dm644x-evm.c > > > > >>>@@ -744,7 +744,7 @@ static int davinci_phy_fixup(struct phy_device > > > > >>>*phydev) > > > > >>> return 0; > > > > >>> } > > > > >>> > > > > >>>-#define HAS_ATA IS_ENABLED(CONFIG_BLK_DEV_PALMCHIP_BK3710) > > > > >>>+#define HAS_ATA IS_ENABLED(CONFIG_PATA_BK3710) > > > > >> > > > > >> I think it would be more correct to check for both libata and IDE > > > > >>drivers here... > > > > > > > > > >As I understand, the plan is to remove the IDE driver soon. > > > > > > > > I'm not sure DaveM would support any removals in drivers/ide/. He has > > > > explicitly expressed his will to maintain the IDE driuver forever. > > > > > > As I keep saying, there are ARM machines where the IDE driver works but > > > the PATA driver doesn't. EBSA110's PCMCIA slots for instance. > > > > Please be more specific, I'll be happy to help with migrating this > > machines to libata PATA. > > > > BTW the example you're giving has never worked with the old IDE > > driver in the upstream kernel. > > That's where you are wrong. It worked for 10+ years with no > modifications in the upstream IDE driver or ide-cs driver - only the > patch I quoted was required. ..and the patch you quoted is in which upstream kernel version exactly? Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics
On Thu, Mar 09, 2017 at 03:57:37PM +0100, Bartlomiej Zolnierkiewicz wrote: > On Thursday, March 09, 2017 02:51:47 PM Russell King - ARM Linux wrote: > > On Thu, Mar 09, 2017 at 03:42:49PM +0100, Bartlomiej Zolnierkiewicz wrote: > > > > > > Hi, > > > > > > On Thursday, March 09, 2017 01:57:15 PM Russell King - ARM Linux wrote: > > > > On Thu, Mar 09, 2017 at 03:24:56PM +0300, Sergei Shtylyov wrote: > > > > > On 03/09/2017 03:20 PM, Sekhar Nori wrote: > > > > > > > > > > >[...] > > > > > > > > > > >>>diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c > > > > > >>>b/arch/arm/mach-davinci/board-dm644x-evm.c > > > > > >>>index 023480b75244..60a1f23890cd 100644 > > > > > >>>--- a/arch/arm/mach-davinci/board-dm644x-evm.c > > > > > >>>+++ b/arch/arm/mach-davinci/board-dm644x-evm.c > > > > > >>>@@ -744,7 +744,7 @@ static int davinci_phy_fixup(struct phy_device > > > > > >>>*phydev) > > > > > >>> return 0; > > > > > >>> } > > > > > >>> > > > > > >>>-#define HAS_ATA IS_ENABLED(CONFIG_BLK_DEV_PALMCHIP_BK3710) > > > > > >>>+#define HAS_ATA IS_ENABLED(CONFIG_PATA_BK3710) > > > > > >> > > > > > >> I think it would be more correct to check for both libata and IDE > > > > > >>drivers here... > > > > > > > > > > > >As I understand, the plan is to remove the IDE driver soon. > > > > > > > > > > I'm not sure DaveM would support any removals in drivers/ide/. He has > > > > > explicitly expressed his will to maintain the IDE driuver forever. > > > > > > > > As I keep saying, there are ARM machines where the IDE driver works but > > > > the PATA driver doesn't. EBSA110's PCMCIA slots for instance. > > > > > > Please be more specific, I'll be happy to help with migrating this > > > machines to libata PATA. > > > > > > BTW the example you're giving has never worked with the old IDE > > > driver in the upstream kernel. > > > > That's where you are wrong. It worked for 10+ years with no > > modifications in the upstream IDE driver or ide-cs driver - only the > > patch I quoted was required. > > ..and the patch you quoted is in which upstream kernel version exactly? I don't claim that it works with the upstream kernel as a whole. I claim that it works with the ide-cs driver _unmodified_ in the upstream kernel, but with a simple two line patch which is private to the ARM architecture. Please pay attention to what I write, thanks.
On Thursday, March 09, 2017 03:08:29 PM Russell King - ARM Linux wrote: > On Thu, Mar 09, 2017 at 03:57:37PM +0100, Bartlomiej Zolnierkiewicz wrote: > > On Thursday, March 09, 2017 02:51:47 PM Russell King - ARM Linux wrote: > > > On Thu, Mar 09, 2017 at 03:42:49PM +0100, Bartlomiej Zolnierkiewicz wrote: > > > > > > > > Hi, > > > > > > > > On Thursday, March 09, 2017 01:57:15 PM Russell King - ARM Linux wrote: > > > > > On Thu, Mar 09, 2017 at 03:24:56PM +0300, Sergei Shtylyov wrote: > > > > > > On 03/09/2017 03:20 PM, Sekhar Nori wrote: > > > > > > > > > > > > >[...] > > > > > > > > > > > > >>>diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c > > > > > > >>>b/arch/arm/mach-davinci/board-dm644x-evm.c > > > > > > >>>index 023480b75244..60a1f23890cd 100644 > > > > > > >>>--- a/arch/arm/mach-davinci/board-dm644x-evm.c > > > > > > >>>+++ b/arch/arm/mach-davinci/board-dm644x-evm.c > > > > > > >>>@@ -744,7 +744,7 @@ static int davinci_phy_fixup(struct phy_device > > > > > > >>>*phydev) > > > > > > >>> return 0; > > > > > > >>> } > > > > > > >>> > > > > > > >>>-#define HAS_ATA IS_ENABLED(CONFIG_BLK_DEV_PALMCHIP_BK3710) > > > > > > >>>+#define HAS_ATA IS_ENABLED(CONFIG_PATA_BK3710) > > > > > > >> > > > > > > >> I think it would be more correct to check for both libata and IDE > > > > > > >>drivers here... > > > > > > > > > > > > > >As I understand, the plan is to remove the IDE driver soon. > > > > > > > > > > > > I'm not sure DaveM would support any removals in drivers/ide/. He has > > > > > > explicitly expressed his will to maintain the IDE driuver forever. > > > > > > > > > > As I keep saying, there are ARM machines where the IDE driver works but > > > > > the PATA driver doesn't. EBSA110's PCMCIA slots for instance. > > > > > > > > Please be more specific, I'll be happy to help with migrating this > > > > machines to libata PATA. > > > > > > > > BTW the example you're giving has never worked with the old IDE > > > > driver in the upstream kernel. > > > > > > That's where you are wrong. It worked for 10+ years with no > > > modifications in the upstream IDE driver or ide-cs driver - only the > > > patch I quoted was required. > > > > ..and the patch you quoted is in which upstream kernel version exactly? > > I don't claim that it works with the upstream kernel as a whole. I claim > that it works with the ide-cs driver _unmodified_ in the upstream kernel, > but with a simple two line patch which is private to the ARM architecture. > > Please pay attention to what I write, thanks. Out-of-tree patches are on their own, as kernel evolves they need to adapt, nothing new here. For 10+ years you were just extremely lucky with your out-of-tree patch. 8) Anyway, if you ever get to running current upstream on your EBSA110 please ping me and I will provide you with the draft pata_pcmcia patch to make EBSA110 work with libata. Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 047a20780fc1..2eb501d6b5fe 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -217,7 +217,8 @@ ifeq ($(CONFIG_ARCH_EBSA110),y) # This is what happens if you forget the IOCS16 line. # PCMCIA cards stop working. CFLAGS_3c589_cs.o :=-DISA_SIXTEEN_BIT_PERIPHERAL -export CFLAGS_3c589_cs.o +CFLAGS_ide-io-std.o :=-DISA_SIXTEEN_BIT_PERIPHERAL +export CFLAGS_3c589_cs.o CFLAGS_ide-io-std.o endif # The byte offset of the kernel image in RAM from the start of RAM.