Xilinx Temac
Hello all, I'm upgrading the kernel on an embedded system and the network driver I was using seems to have changed and the new one doesn't seem to work: My working config, from 2.6.38 (I believe): $ grep NET\|MII\|TEMAC\|MARVELL ../linux-2.6-xlnx-CodalemaC/.config | grep -v ^# CONFIG_NET=y CONFIG_INET=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y CONFIG_NETDEVICES=y CONFIG_NETDEV_1000=y CONFIG_XILINX_LLTEMAC=y CONFIG_XILINX_LLTEMAC_MARVELL_88E_MII=y CONFIG_NET_DMA=y CONFIG_NETWORK_FILESYSTEMS=y And the new one: $ grep NET\|MII\|TEMAC\|MARVELL .config | grep -v ^# CONFIG_NET=y CONFIG_INET=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y CONFIG_OF_NET=y CONFIG_NETDEVICES=y CONFIG_NET_CORE=y CONFIG_ETHERNET=y CONFIG_NET_VENDOR_MARVELL=y CONFIG_NET_VENDOR_XILINX=y CONFIG_XILINX_LL_TEMAC=y CONFIG_NET_DMA=y On boot the device gets probed, but not activated: # dmesg | grep -i net\|mac [0.017515] NET: Registered protocol family 16 [0.102621] device class 'net': registering [0.241017] NET: Registered protocol family 2 [0.249435] NET: Registered protocol family 1 [5.098813] device: 'xps-ll-temac.1': device_add [5.098984] bus: 'platform': add device xps-ll-temac.1 [5.101050] device: '8188.ethernet': device_add [5.101221] bus: 'platform': add device 8188.ethernet [5.484077] bus: 'platform': add driver xilinx_temac [5.484491] bus: 'platform': driver_probe_device: matched device 8188.ethernet with driver xilinx_temac [5.484726] bus: 'platform': really_probe: probing driver xilinx_temac with device 8188.ethernet [5.487175] Xilinx TEMAC MDIO: probed [5.495719] driver: '8188.ethernet': driver_bound: bound to device 'xilinx_temac' [5.495827] bus: 'platform': really_probe: bound device 8188.ethernet to driver xilinx_temac [5.530592] NET: Registered protocol family 17 Is there something I'm missing about this LLTEMAC to LL_TEMAC change ? Thanks -- Guillaume Dargaud http://www.gdargaud.net/ ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH v2] powerpc, dma: move bestcomm driver from arch/powerpc/sysdev to drivers/dma
The bestcomm dma hardware, and some of its users like the FEC ethernet component, is used in different FreeScale parts, including non-powerpc parts like the ColdFire MCF547x MCF548x families. Don't keep the driver hidden in arch/powerpc where it is inaccessible for other arches. .c files are moved to arch/drivers/dma/bestcomm, while .h files are moved to include/linux/fsl/bestcomm. Makefiles, Kconfigs and #include directives are updated for the new file locations. Tested by recompiling for MPC5200 with all bestcomm users enabled. Signed-off-by: Philippe De Muyter p...@macqel.be --- arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c |6 +++--- arch/powerpc/platforms/Kconfig |2 -- arch/powerpc/sysdev/Makefile |1 - drivers/Makefile |2 +- drivers/ata/pata_mpc52xx.c |6 +++--- drivers/dma/Kconfig|2 ++ drivers/dma/Makefile |1 + .../sysdev = drivers/dma}/bestcomm/Kconfig|0 .../sysdev = drivers/dma}/bestcomm/Makefile |0 .../powerpc/sysdev = drivers/dma}/bestcomm/ata.c |6 +++--- .../dma}/bestcomm/bcom_ata_task.c |0 .../dma}/bestcomm/bcom_fec_rx_task.c |0 .../dma}/bestcomm/bcom_fec_tx_task.c |0 .../dma}/bestcomm/bcom_gen_bd_rx_task.c|0 .../dma}/bestcomm/bcom_gen_bd_tx_task.c|0 .../sysdev = drivers/dma}/bestcomm/bestcomm.c |6 +++--- .../powerpc/sysdev = drivers/dma}/bestcomm/fec.c |6 +++--- .../sysdev = drivers/dma}/bestcomm/gen_bd.c |6 +++--- .../powerpc/sysdev = drivers/dma}/bestcomm/sram.c |2 +- drivers/net/ethernet/freescale/fec_mpc52xx.c |4 ++-- .../sysdev = include/linux/fsl}/bestcomm/ata.h|0 .../linux/fsl}/bestcomm/bestcomm.h |0 .../linux/fsl}/bestcomm/bestcomm_priv.h|0 .../sysdev = include/linux/fsl}/bestcomm/fec.h|0 .../sysdev = include/linux/fsl}/bestcomm/gen_bd.h |0 .../sysdev = include/linux/fsl}/bestcomm/sram.h |0 sound/soc/fsl/mpc5200_dma.c|4 ++-- 27 files changed, 27 insertions(+), 27 deletions(-) rename {arch/powerpc/sysdev = drivers/dma}/bestcomm/Kconfig (100%) rename {arch/powerpc/sysdev = drivers/dma}/bestcomm/Makefile (100%) rename {arch/powerpc/sysdev = drivers/dma}/bestcomm/ata.c (97%) rename {arch/powerpc/sysdev = drivers/dma}/bestcomm/bcom_ata_task.c (100%) rename {arch/powerpc/sysdev = drivers/dma}/bestcomm/bcom_fec_rx_task.c (100%) rename {arch/powerpc/sysdev = drivers/dma}/bestcomm/bcom_fec_tx_task.c (100%) rename {arch/powerpc/sysdev = drivers/dma}/bestcomm/bcom_gen_bd_rx_task.c (100%) rename {arch/powerpc/sysdev = drivers/dma}/bestcomm/bcom_gen_bd_tx_task.c (100%) rename {arch/powerpc/sysdev = drivers/dma}/bestcomm/bestcomm.c (99%) rename {arch/powerpc/sysdev = drivers/dma}/bestcomm/fec.c (98%) rename {arch/powerpc/sysdev = drivers/dma}/bestcomm/gen_bd.c (98%) rename {arch/powerpc/sysdev = drivers/dma}/bestcomm/sram.c (99%) rename {arch/powerpc/sysdev = include/linux/fsl}/bestcomm/ata.h (100%) rename {arch/powerpc/sysdev = include/linux/fsl}/bestcomm/bestcomm.h (100%) rename {arch/powerpc/sysdev = include/linux/fsl}/bestcomm/bestcomm_priv.h (100%) rename {arch/powerpc/sysdev = include/linux/fsl}/bestcomm/fec.h (100%) rename {arch/powerpc/sysdev = include/linux/fsl}/bestcomm/gen_bd.h (100%) rename {arch/powerpc/sysdev = include/linux/fsl}/bestcomm/sram.h (100%) diff --git a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c index 2351f9e..089e665 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c @@ -20,9 +20,9 @@ #include asm/mpc52xx.h #include asm/time.h -#include sysdev/bestcomm/bestcomm.h -#include sysdev/bestcomm/bestcomm_priv.h -#include sysdev/bestcomm/gen_bd.h +#include linux/fsl/bestcomm/bestcomm.h +#include linux/fsl/bestcomm/bestcomm_priv.h +#include linux/fsl/bestcomm/gen_bd.h MODULE_AUTHOR(Grant Likely grant.lik...@secretlab.ca); MODULE_DESCRIPTION(MPC5200 LocalPlus FIFO device driver); diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig index e7a896a..405f763 100644 --- a/arch/powerpc/platforms/Kconfig +++ b/arch/powerpc/platforms/Kconfig @@ -351,8 +351,6 @@ config OF_RTC Uses information from the OF or flattened device tree to instantiate platform devices for direct mapped RTC chips like the DS1742 or DS1743. -source arch/powerpc/sysdev/bestcomm/Kconfig - config SIMPLE_GPIO bool Support for simple, memory-mapped GPIO controllers depends on PPC diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile index a57600b..3884776 100644 --- a/arch/powerpc/sysdev/Makefile +++ b/arch/powerpc/sysdev/Makefile @@ -26,7
Re: [PATCH v3 1/2] powerpc/PCI: move DMA IRQ init to device_add() notification path
On Mon, Jun 18, 2012 at 4:55 PM, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Mon, 2012-06-18 at 15:06 -0600, Bjorn Helgaas wrote: We're moving the CardBus IRQ config from before pci_bus_add_devices() to after. I see why you did that: we're proposing to do the powerpc DMA IRQ setup in pci_bus_add_devices(), so we don't want to have the powerpc IRQ init clobber the CardBus IRQ config. But a driver can claim the device as soon as we call pci_bus_add_devices(), so we're potentially changing dev-irq after a driver has already looked at it, which sounds like a bug. There are only five possibilities for powerpc pci_irq_fixup: ppc47x_pci_irq_fixup mpc85xx_cds_pci_irq_fixup maple_pci_irq_fixup pmac_pci_irq_fixup rtas_msi_pci_irq_fixup If these were normal PCI header quirks instead, they could run earlier, and we wouldn't need to move this cardbus_config_irq_and_cls() call. Is it possible to make these quirks, Ben? Wait ... why are those fixups relevant ? They have to run after pci_read_irq_line() (which should have been called pcibios_read_irq_line really) but that's fine, we call both back to back The problem has to do with the fact that we setup pdev-irq inside pci_bus_add_devices() with the new proposed code (the fixup itself is just a detail). You want cardbus to quirk the irq after that's been fixed up... maybe that's a case for moving cardbus_config_irq_and_cls() to pci_enable_device() ? Or add another hook inside pci_bus_add_devices()... This thread has languished a long time, and I think the original problem (hot-added e1000e devices on powerpc don't work) still exists, doesn't it? I'd like to get a kernel bugzilla opened so (a) this doesn't get forgotten and (b) we can attach things like dmesg logs showing the issue. The current patch does this: pci_bus_add_devices(bus); + cardbus_config_irq_and_cls(bus, s-pci_irq); I don't think we can do this, because pci_bus_add_devices() can bind a driver to the device, and we can't change dev-irq after that point. cardbus_config_irq_and_cls() has to do with the way CardBus interrupts work, so it seems like it should be better integrated into the PCI core. For example, maybe it could be integrated into the PCI_HEADER_TYPE_CARDBUS case in pci_setup_device(). I think that would still require the powerpc IRQ fixups to be done earlier, e.g., as a header quirk or a pcibios hook. Bjorn ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 5/10] memory-hotplug : memory-hotplug: check page type in get_page_bootmem
On Thu, Oct 4, 2012 at 10:32 PM, Yasuaki Ishimatsu isimatu.yasu...@jp.fujitsu.com wrote: The function get_page_bootmem() may be called more than one time to the same page. There is no need to set page's type, private if the function is not the first time called to the page. Note: the patch is just optimization and does not fix any problem. CC: David Rientjes rient...@google.com CC: Jiang Liu liu...@gmail.com CC: Len Brown len.br...@intel.com CC: Christoph Lameter c...@linux.com Cc: Minchan Kim minchan@gmail.com CC: Andrew Morton a...@linux-foundation.org CC: KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com CC: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Yasuaki Ishimatsu isimatu.yasu...@jp.fujitsu.com --- mm/memory_hotplug.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) Index: linux-3.6/mm/memory_hotplug.c === --- linux-3.6.orig/mm/memory_hotplug.c 2012-10-04 18:29:58.284676075 +0900 +++ linux-3.6/mm/memory_hotplug.c 2012-10-04 18:30:03.454680542 +0900 @@ -95,10 +95,17 @@ static void release_memory_resource(stru static void get_page_bootmem(unsigned long info, struct page *page, unsigned long type) { - page-lru.next = (struct list_head *) type; - SetPagePrivate(page); - set_page_private(page, info); - atomic_inc(page-_count); + unsigned long page_type; + + page_type = (unsigned long)page-lru.next; If I understand correctly, page-lru.next might be uninitialized yet. Moreover, I have no seen any good effect in this patch. I don't understand why we need to increase code complexity. + if (page_type MEMORY_HOTPLUG_MIN_BOOTMEM_TYPE || + page_type MEMORY_HOTPLUG_MAX_BOOTMEM_TYPE){ + page-lru.next = (struct list_head *)type; + SetPagePrivate(page); + set_page_private(page, info); + atomic_inc(page-_count); + } else + atomic_inc(page-_count); } /* reference to __meminit __free_pages_bootmem is valid -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majord...@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: a href=mailto:d...@kvack.org; em...@kvack.org /a ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev