* Re: [PATCH 2.6.14] mm: 8xx MM fix for
From: Pantelis Antoniou @ 2005-11-07 14:39 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: linuxppc-embedded, Dan Malek
In-Reply-To: <20051107084431.GA15180@logos.cnet>
Marcelo Tosatti wrote:
> Hi folks,
>
> Seems the bug is exposed by the change which avoids flushing the
> TLB when not necessary (in case the pte has not changed), introduced
> recently:
>
[snip]
>
>
Good job Marcelo! :)
FWIW I'd rather have the single exception version if at all possible.
Regards
Pantelis
^ permalink raw reply
* RE: [PATCH 2.6.14] mm: 8xx MM fix for
From: Joakim Tjernlund @ 2005-11-07 14:32 UTC (permalink / raw)
To: Marcelo Tosatti, Pantelis Antoniou; +Cc: Dan Malek, linuxppc-embedded
Hi Marcelo
[SNIP]=20
> The root of the problem are the changes against the 8xx TLB=20
> handlers introduced
> during v2.6. What happens is the TLBMiss handlers load the=20
> zeroed pte into
> the TLB, causing the TLBError handler to be invoked (thats=20
> two TLB faults per=20
> pagefault), which then jumps to the generic MM code to setup the pte.
>=20
> The bug is that the zeroed TLB is not invalidated (the same reason
> for the "dcbst" misbehaviour), resulting in infinite TLBError faults.
>=20
> Dan, I wonder why we just don't go back to v2.4 behaviour.
This is one reason why it is the way it is:
http://ozlabs.org/pipermail/linuxppc-embedded/2005-January/016382.html
This details are little fuzzy ATM, but I think the reason for the
current
impl. was only that it was less intrusive to impl.
Jocke
^ permalink raw reply
* Re: [PATCH 2.6.14] mm: 8xx MM fix for
From: Dan Malek @ 2005-11-07 14:35 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: linuxppc-embedded
In-Reply-To: <20051107084431.GA15180@logos.cnet>
On Nov 7, 2005, at 3:44 AM, Marcelo Tosatti wrote:
> Dan, I wonder why we just don't go back to v2.4 behaviour. It is not
> very
> clear to me that "two exception" speedup offsets the additional code
> required
> for "one exception" version. Have you actually done any measurements?
No, and I didn't actually make these changes, either :-)
I'm working on some 8xx debugging right now, so let's experiment
with some changes. I don't understand why other processors, especially
G2 cores like 82xx, aren't finding the same problems we are having
with 8xx. Logically, we are all doing the same thing, unless there are
some tlb invalidates on these other processors that I'm forgetting
about.
We just seem to be running into stale entries, and we have to fix it.
Thanks.
-- Dan
^ permalink raw reply
* Re: [PATCH 2.6.14] mm: 8xx MM fix for
From: Marcelo Tosatti @ 2005-11-07 8:44 UTC (permalink / raw)
To: Pantelis Antoniou; +Cc: Dan Malek, linuxppc-embedded
In-Reply-To: <200510302203.25390.pantelis.antoniou@gmail.com>
Hi folks,
Seems the bug is exposed by the change which avoids flushing the
TLB when not necessary (in case the pte has not changed), introduced
recently:
__handle_mm_fault():
entry = pte_mkyoung(entry);
if (!pte_same(old_entry, entry)) {
ptep_set_access_flags(vma, address, pte, entry, write_access);
update_mmu_cache(vma, address, entry);
lazy_mmu_prot_update(entry);
} else {
/*
* This is needed only for protection faults but the arch code
* is not yet telling us if this is a protection fault or not.
* This still avoids useless tlb flushes for .text page faults
* with threads.
*/
if (write_access)
flush_tlb_page(vma, address);
}
The "update_mmu_cache()" call was unconditional before, which caused the TLB
to be flushed by:
if (pfn_valid(pfn)) {
struct page *page = pfn_to_page(pfn);
if (!PageReserved(page)
&& !test_bit(PG_arch_1, &page->flags)) {
if (vma->vm_mm == current->active_mm) {
#ifdef CONFIG_8xx
/* On 8xx, cache control instructions (particularly
* "dcbst" from flush_dcache_icache) fault as write
* operation if there is an unpopulated TLB entry
* for the address in question. To workaround that,
* we invalidate the TLB here, thus avoiding dcbst
* misbehaviour.
*/
_tlbie(address);
#endif
__flush_dcache_icache((void *) address);
} else
flush_dcache_icache_page(page);
set_bit(PG_arch_1, &page->flags);
}
Which worked to due to pure luck: PG_arch_1 was always unset before, but
now it isnt.
The root of the problem are the changes against the 8xx TLB handlers introduced
during v2.6. What happens is the TLBMiss handlers load the zeroed pte into
the TLB, causing the TLBError handler to be invoked (thats two TLB faults per
pagefault), which then jumps to the generic MM code to setup the pte.
The bug is that the zeroed TLB is not invalidated (the same reason
for the "dcbst" misbehaviour), resulting in infinite TLBError faults.
Dan, I wonder why we just don't go back to v2.4 behaviour. It is not very
clear to me that "two exception" speedup offsets the additional code required
for "one exception" version. Have you actually done any measurements?
There is chance that the additional code ends up in the same cacheline,
which would mean no huge gain by the "two exception" approach. Might be
even harmful for performance (you need two exceptions instead of one
after all).
The "two exception" approach requires a TLB flush (to nuke the zeroed)
at each PTE update for correct behaviour (which BTW is another slowdown):
--- ../git/linux-2.6/arch/ppc/mm/init.c 2005-11-01 07:58:12.000000000 -0600
+++ linux-2.6-git-wednov02/arch/ppc/mm/init.c 2005-11-07 06:13:58.000000000 -0600
@@ -597,19 +597,12 @@
if (pfn_valid(pfn)) {
struct page *page = pfn_to_page(pfn);
+#ifdef CONFIG_8xx
+ _tlbie(address);
+#endif
if (!PageReserved(page)
&& !test_bit(PG_arch_1, &page->flags)) {
if (vma->vm_mm == current->active_mm) {
-#ifdef CONFIG_8xx
- /* On 8xx, cache control instructions (particularly
- * "dcbst" from flush_dcache_icache) fault as write
- * operation if there is an unpopulated TLB entry
- * for the address in question. To workaround that,
- * we invalidate the TLB here, thus avoiding dcbst
- * misbehaviour.
- */
- _tlbie(address);
-#endif
__flush_dcache_icache((void *) address);
} else
flush_dcache_icache_page(page);
On Sun, Oct 30, 2005 at 11:03:24PM +0300, Pantelis Antoniou wrote:
> Latest MMU changes caused 8xx to stop working. Flushing tlb of the faulting
> address fixes the problem.
>
> ---
> commit 978e2f36b1ae53e37ba27b3ab8f1c5ddbb8c8a10
> tree 7dd0e403c240162b1925db0834d694f4b4a0e95e
> parent ca02ea5aebcda886d1552c6af73ca96c02bf9fed
> author Pantelis Antoniou <panto@pantathon> Sun, 30 Oct 2005 21:53:48 +0200
> committer Pantelis Antoniou <panto@pantathon> Sun, 30 Oct 2005 21:53:48 +0200
>
> arch/ppc/mm/fault.c | 13 +++++++++++++
> 1 files changed, 13 insertions(+), 0 deletions(-)
>
> diff --git a/arch/ppc/mm/fault.c b/arch/ppc/mm/fault.c
> --- a/arch/ppc/mm/fault.c
> +++ b/arch/ppc/mm/fault.c
> @@ -240,6 +240,19 @@ good_area:
> goto bad_area;
> if (!(vma->vm_flags & (VM_READ | VM_EXEC)))
> goto bad_area;
> +
> +#ifdef CONFIG_8xx
> + {
> + /* 8xx is retarded; news at 11 */
> + pte_t *ptep = NULL;
> +
> + if (get_pteptr(mm, address, &ptep) && pte_present(*ptep))
> + _tlbie(address);
> +
> + if (ptep != NULL)
> + pte_unmap(ptep);
> + }
> +#endif
> }
>
> /*
^ permalink raw reply
* [PATCH] Fix 8250 probe on ppc32
From: David Woodhouse @ 2005-11-07 10:04 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
The probe at random I/O locations for 8250 serial ports makes my SMP G4
very unhappy. Theoretically it's supposed to catch the machine check and
recover, but that doesn't actually work very reliably -- the machine
often just locks up hard instead.
This makes ppc32 use the same code for locating 8250 serial ports in the
device tree as ppc64 already uses, and hence makes it refrain from
poking at non-existent ports.
This fairly much obsoletes include/asm-ppc/pc_serial.h -- other machines
with 8250 ports which are currently responsible for the mess in
include/asm-ppc/serial.h itself should be converted to a platform_device
of their own before they become supported in arch/powerpc.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -31,8 +31,6 @@
#include <linux/notifier.h>
#include <linux/cpu.h>
#include <linux/unistd.h>
-#include <linux/serial.h>
-#include <linux/serial_8250.h>
#include <asm/io.h>
#include <asm/prom.h>
#include <asm/processor.h>
@@ -51,7 +49,6 @@
#include <asm/system.h>
#include <asm/rtas.h>
#include <asm/iommu.h>
-#include <asm/serial.h>
#include <asm/cache.h>
#include <asm/page.h>
#include <asm/mmu.h>
@@ -713,187 +710,6 @@ void ppc64_terminate_msg(unsigned int sr
printk("[terminate]%04x %s\n", src, msg);
}
-#ifndef CONFIG_PPC_ISERIES
-/*
- * This function can be used by platforms to "find" legacy serial ports.
- * It works for "serial" nodes under an "isa" node, and will try to
- * respect the "ibm,aix-loc" property if any. It works with up to 8
- * ports.
- */
-
-#define MAX_LEGACY_SERIAL_PORTS 8
-static struct plat_serial8250_port serial_ports[MAX_LEGACY_SERIAL_PORTS+1];
-static unsigned int old_serial_count;
-
-void __init generic_find_legacy_serial_ports(u64 *physport,
- unsigned int *default_speed)
-{
- struct device_node *np;
- u32 *sizeprop;
-
- struct isa_reg_property {
- u32 space;
- u32 address;
- u32 size;
- };
- struct pci_reg_property {
- struct pci_address addr;
- u32 size_hi;
- u32 size_lo;
- };
-
- DBG(" -> generic_find_legacy_serial_port()\n");
-
- *physport = 0;
- if (default_speed)
- *default_speed = 0;
-
- np = of_find_node_by_path("/");
- if (!np)
- return;
-
- /* First fill our array */
- for (np = NULL; (np = of_find_node_by_type(np, "serial"));) {
- struct device_node *isa, *pci;
- struct isa_reg_property *reg;
- unsigned long phys_size, addr_size, io_base;
- u32 *rangesp;
- u32 *interrupts, *clk, *spd;
- char *typep;
- int index, rlen, rentsize;
-
- /* Ok, first check if it's under an "isa" parent */
- isa = of_get_parent(np);
- if (!isa || strcmp(isa->name, "isa")) {
- DBG("%s: no isa parent found\n", np->full_name);
- continue;
- }
-
- /* Now look for an "ibm,aix-loc" property that gives us ordering
- * if any...
- */
- typep = (char *)get_property(np, "ibm,aix-loc", NULL);
-
- /* Get the ISA port number */
- reg = (struct isa_reg_property *)get_property(np, "reg", NULL);
- if (reg == NULL)
- goto next_port;
- /* We assume the interrupt number isn't translated ... */
- interrupts = (u32 *)get_property(np, "interrupts", NULL);
- /* get clock freq. if present */
- clk = (u32 *)get_property(np, "clock-frequency", NULL);
- /* get default speed if present */
- spd = (u32 *)get_property(np, "current-speed", NULL);
- /* Default to locate at end of array */
- index = old_serial_count; /* end of the array by default */
-
- /* If we have a location index, then use it */
- if (typep && *typep == 'S') {
- index = simple_strtol(typep+1, NULL, 0) - 1;
- /* if index is out of range, use end of array instead */
- if (index >= MAX_LEGACY_SERIAL_PORTS)
- index = old_serial_count;
- /* if our index is still out of range, that mean that
- * array is full, we could scan for a free slot but that
- * make little sense to bother, just skip the port
- */
- if (index >= MAX_LEGACY_SERIAL_PORTS)
- goto next_port;
- if (index >= old_serial_count)
- old_serial_count = index + 1;
- /* Check if there is a port who already claimed our slot */
- if (serial_ports[index].iobase != 0) {
- /* if we still have some room, move it, else override */
- if (old_serial_count < MAX_LEGACY_SERIAL_PORTS) {
- DBG("Moved legacy port %d -> %d\n", index,
- old_serial_count);
- serial_ports[old_serial_count++] =
- serial_ports[index];
- } else {
- DBG("Replacing legacy port %d\n", index);
- }
- }
- }
- if (index >= MAX_LEGACY_SERIAL_PORTS)
- goto next_port;
- if (index >= old_serial_count)
- old_serial_count = index + 1;
-
- /* Now fill the entry */
- memset(&serial_ports[index], 0, sizeof(struct plat_serial8250_port));
- serial_ports[index].uartclk = clk ? *clk : BASE_BAUD * 16;
- serial_ports[index].iobase = reg->address;
- serial_ports[index].irq = interrupts ? interrupts[0] : 0;
- serial_ports[index].flags = ASYNC_BOOT_AUTOCONF;
-
- DBG("Added legacy port, index: %d, port: %x, irq: %d, clk: %d\n",
- index,
- serial_ports[index].iobase,
- serial_ports[index].irq,
- serial_ports[index].uartclk);
-
- /* Get phys address of IO reg for port 1 */
- if (index != 0)
- goto next_port;
-
- pci = of_get_parent(isa);
- if (!pci) {
- DBG("%s: no pci parent found\n", np->full_name);
- goto next_port;
- }
-
- rangesp = (u32 *)get_property(pci, "ranges", &rlen);
- if (rangesp == NULL) {
- of_node_put(pci);
- goto next_port;
- }
- rlen /= 4;
-
- /* we need the #size-cells of the PCI bridge node itself */
- phys_size = 1;
- sizeprop = (u32 *)get_property(pci, "#size-cells", NULL);
- if (sizeprop != NULL)
- phys_size = *sizeprop;
- /* we need the parent #addr-cells */
- addr_size = prom_n_addr_cells(pci);
- rentsize = 3 + addr_size + phys_size;
- io_base = 0;
- for (;rlen >= rentsize; rlen -= rentsize,rangesp += rentsize) {
- if (((rangesp[0] >> 24) & 0x3) != 1)
- continue; /* not IO space */
- io_base = rangesp[3];
- if (addr_size == 2)
- io_base = (io_base << 32) | rangesp[4];
- }
- if (io_base != 0) {
- *physport = io_base + reg->address;
- if (default_speed && spd)
- *default_speed = *spd;
- }
- of_node_put(pci);
- next_port:
- of_node_put(isa);
- }
-
- DBG(" <- generic_find_legacy_serial_port()\n");
-}
-
-static struct platform_device serial_device = {
- .name = "serial8250",
- .id = PLAT8250_DEV_PLATFORM,
- .dev = {
- .platform_data = serial_ports,
- },
-};
-
-static int __init serial_dev_init(void)
-{
- return platform_device_register(&serial_device);
-}
-arch_initcall(serial_dev_init);
-
-#endif /* CONFIG_PPC_ISERIES */
-
int check_legacy_ioport(unsigned long base_port)
{
if (ppc_md.check_legacy_ioport == NULL)
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -77,6 +77,11 @@ config SERIAL_8250_CS
If unsure, say N.
+config SERIAL_8250_OF
+ bool
+ default y
+ depends on PPC_OF && SERIAL_8250
+
config SERIAL_8250_ACPI
bool "8250/16550 device discovery via ACPI namespace"
default y if IA64
diff --git a/include/asm-ppc/pc_serial.h b/include/asm-ppc/pc_serial.h
--- a/include/asm-ppc/pc_serial.h
+++ b/include/asm-ppc/pc_serial.h
@@ -26,18 +26,4 @@
#define RS_TABLE_SIZE 4
#endif
-/* Standard COM flags (except for COM4, because of the 8514 problem) */
-#ifdef CONFIG_SERIAL_DETECT_IRQ
-#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ)
-#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ)
-#else
-#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
-#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF
-#endif
-
-#define SERIAL_PORT_DFNS \
- /* UART CLK PORT IRQ FLAGS */ \
- { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \
- { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \
- { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \
- { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */
+#define SERIAL_PORT_DFNS /* */
--- /dev/null 2005-10-08 11:44:47.528646500 +0100
+++ b/drivers/serial/8250_of.c 2005-11-07 09:51:22.000000000 +0000
@@ -0,0 +1,197 @@
+#include <linux/kernel.h>
+#include <linux/serial.h>
+#include <linux/serial_8250.h>
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/pci.h>
+#include <asm/serial.h>
+#include <asm/prom.h>
+
+#if 0
+#define DBG(fmt...) printk(KERN_DEBUG fmt)
+#else
+#define DBG(fmt...) do { } while (0)
+#endif
+
+/*
+ * This function can be used by platforms to "find" legacy serial ports.
+ * It works for "serial" nodes under an "isa" node, and will try to
+ * respect the "ibm,aix-loc" property if any. It works with up to 8
+ * ports.
+ */
+
+#define MAX_LEGACY_SERIAL_PORTS 8
+static int ports_probed = 0;
+
+static struct plat_serial8250_port serial_ports[MAX_LEGACY_SERIAL_PORTS+1];
+static unsigned int old_serial_count;
+
+void __init generic_find_legacy_serial_ports(u64 *physport,
+ unsigned int *default_speed)
+{
+ struct device_node *np;
+ u32 *sizeprop;
+
+ struct isa_reg_property {
+ u32 space;
+ u32 address;
+ u32 size;
+ };
+
+ DBG(" -> generic_find_legacy_serial_port()\n");
+ ports_probed = 1;
+
+ *physport = 0;
+ if (default_speed)
+ *default_speed = 0;
+
+ np = of_find_node_by_path("/");
+ if (!np)
+ return;
+
+ /* First fill our array */
+ for (np = NULL; (np = of_find_node_by_type(np, "serial"));) {
+ struct device_node *isa, *pci;
+ struct isa_reg_property *reg;
+ unsigned long phys_size, addr_size;
+ u64 io_base;
+ u32 *rangesp;
+ u32 *interrupts, *clk, *spd;
+ char *typep;
+ int index, rlen, rentsize;
+
+ /* Ok, first check if it's under an "isa" parent */
+ isa = of_get_parent(np);
+ if (!isa || strcmp(isa->name, "isa")) {
+ DBG("%s: no isa parent found\n", np->full_name);
+ continue;
+ }
+
+ /* Now look for an "ibm,aix-loc" property that gives us ordering
+ * if any...
+ */
+ typep = (char *)get_property(np, "ibm,aix-loc", NULL);
+
+ /* Get the ISA port number */
+ reg = (struct isa_reg_property *)get_property(np, "reg", NULL);
+ if (reg == NULL)
+ goto next_port;
+ /* We assume the interrupt number isn't translated ... */
+ interrupts = (u32 *)get_property(np, "interrupts", NULL);
+ /* get clock freq. if present */
+ clk = (u32 *)get_property(np, "clock-frequency", NULL);
+ /* get default speed if present */
+ spd = (u32 *)get_property(np, "current-speed", NULL);
+ /* Default to locate at end of array */
+ index = old_serial_count; /* end of the array by default */
+
+ /* If we have a location index, then use it */
+ if (typep && *typep == 'S') {
+ index = simple_strtol(typep+1, NULL, 0) - 1;
+ /* if index is out of range, use end of array instead */
+ if (index >= MAX_LEGACY_SERIAL_PORTS)
+ index = old_serial_count;
+ /* if our index is still out of range, that mean that
+ * array is full, we could scan for a free slot but that
+ * make little sense to bother, just skip the port
+ */
+ if (index >= MAX_LEGACY_SERIAL_PORTS)
+ goto next_port;
+ if (index >= old_serial_count)
+ old_serial_count = index + 1;
+ /* Check if there is a port who already claimed our slot */
+ if (serial_ports[index].iobase != 0) {
+ /* if we still have some room, move it, else override */
+ if (old_serial_count < MAX_LEGACY_SERIAL_PORTS) {
+ DBG("Moved legacy port %d -> %d\n", index,
+ old_serial_count);
+ serial_ports[old_serial_count++] =
+ serial_ports[index];
+ } else {
+ DBG("Replacing legacy port %d\n", index);
+ }
+ }
+ }
+ if (index >= MAX_LEGACY_SERIAL_PORTS)
+ goto next_port;
+ if (index >= old_serial_count)
+ old_serial_count = index + 1;
+
+ /* Now fill the entry */
+ memset(&serial_ports[index], 0, sizeof(struct plat_serial8250_port));
+ serial_ports[index].uartclk = (clk && *clk) ? *clk : BASE_BAUD * 16;
+ serial_ports[index].iobase = reg->address;
+ serial_ports[index].irq = interrupts ? interrupts[0] : 0;
+ serial_ports[index].flags = ASYNC_BOOT_AUTOCONF;
+
+ DBG("Added legacy port, index: %d, port: %x, irq: %d, clk: %d\n",
+ index,
+ serial_ports[index].iobase,
+ serial_ports[index].irq,
+ serial_ports[index].uartclk);
+
+ /* Get phys address of IO reg for port 1 */
+ if (index != 0)
+ goto next_port;
+
+ pci = of_get_parent(isa);
+ if (!pci) {
+ DBG("%s: no pci parent found\n", np->full_name);
+ goto next_port;
+ }
+
+ rangesp = (u32 *)get_property(pci, "ranges", &rlen);
+ if (rangesp == NULL) {
+ of_node_put(pci);
+ goto next_port;
+ }
+ rlen /= 4;
+
+ /* we need the #size-cells of the PCI bridge node itself */
+ phys_size = 1;
+ sizeprop = (u32 *)get_property(pci, "#size-cells", NULL);
+ if (sizeprop != NULL)
+ phys_size = *sizeprop;
+ /* we need the parent #addr-cells */
+ addr_size = prom_n_addr_cells(pci);
+ rentsize = 3 + addr_size + phys_size;
+ io_base = 0;
+ for (;rlen >= rentsize; rlen -= rentsize,rangesp += rentsize) {
+ if (((rangesp[0] >> 24) & 0x3) != 1)
+ continue; /* not IO space */
+ io_base = rangesp[3];
+ if (addr_size == 2)
+ io_base = (io_base << 32) | rangesp[4];
+ }
+ if (io_base != 0) {
+ *physport = io_base + reg->address;
+ if (default_speed && spd)
+ *default_speed = *spd;
+ }
+ of_node_put(pci);
+ next_port:
+ of_node_put(isa);
+ }
+
+ DBG(" <- generic_find_legacy_serial_port()\n");
+}
+
+static struct platform_device serial_device = {
+ .name = "serial8250",
+ .id = PLAT8250_DEV_PLATFORM,
+ .dev = {
+ .platform_data = serial_ports,
+ },
+};
+
+static int __init serial_dev_init(void)
+{
+ u64 phys;
+ unsigned int spd;
+
+ if (!ports_probed)
+ generic_find_legacy_serial_ports(&phys, &spd);
+ return platform_device_register(&serial_device);
+}
+arch_initcall(serial_dev_init);
--
dwmw2
^ permalink raw reply
* Re: [PATCH] Fix ppc32 smp build.
From: David Woodhouse @ 2005-11-07 9:47 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <17261.57380.473046.69200@cargo.ozlabs.ibm.com>
On Sun, 2005-11-06 at 21:51 +1100, Paul Mackerras wrote:
> If we really can get unsynchronized timebases still, then I suppose we
> need to bring back the smp_tb_synchronized variable,
We make no attempt to sync the timebases on quad powersurge, as far as I
can tell -- and we never set smp_tb_synchronized there.
--
dwmw2
^ permalink raw reply
* Re: 2.6.14 USB vs. sleep issues
From: Charles-Edouard Ruault @ 2005-11-07 9:13 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, debian-powerpc@lists.debian.org
In-Reply-To: <1130999620.4680.28.camel@gaston>
Benjamin Herrenschmidt wrote:
>For those who experience crashes on sleep and/or wakeup (typically due
>to USB) with 2.6.14, I made a test patch that might help. Please let me
>know if it makes things more reliable.
>
>http://gate.crashing.org/~benh/fix-ohci-sleep.diff
>
>Note that the patch is totally untested here so it may be just plain
>bogus :)
>
>Ben.
>
>
>
>
>
Hi Ben,
i've applied your patch and it seems that when i put my powerbook to
sleep ( by closing the lid ) the kernel just crashes since everytime i
come back, the machine is turned off. I had a look at the logs and i see
that i'm having a reboot almost immediateley after the lid is closed.
However i've got no trace of a kernel panic .....
my conf:
Linux kaluha 2.6.14 #1 PREEMPT Mon Oct 31 10:28:22 CET 2005 ppc GNU/Linux
processor : 0
cpu : 7447/7457, altivec supported
clock : 612MHz
revision : 0.1 (pvr 8002 0101)
bogomips : 406.52
machine : PowerBook5,2
motherboard : PowerBook5,2 MacRISC3 Power Macintosh
detected as : 287 (PowerBook G4 15")
pmac flags : 0000001b
L2 cache : 512K unified
memory : 768MB
pmac-generation : NewWorld
I have a usb mouse that i unplug before closing the lid.
Anything else that can be usefull ?
Thanks for your time.
Regards.
--
Charles-Edouard Ruault
+33 1 55 34 76 65
ce@idtect.com
Idtect SA
37 Bd des Capucines
75002 Paris, France
www.idtect.com
^ permalink raw reply
* Re: [patch 2.6.14] fec_8xx: make CONFIG_FEC_8XX depend on CONFIG_8xx
From: Pantelis Antoniou @ 2005-11-07 7:53 UTC (permalink / raw)
To: John W. Linville; +Cc: netdev, linux-kernel, linuxppc-embedded
In-Reply-To: <20051106025701.GA9698@tuxdriver.com>
John W. Linville wrote:
> Make CONFIG_FEC_8XX depend on CONFIG_8xx. This keeps allmodconfig from
> breaking on non-8xx (PPC) platforms.
>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
> ---
>
> drivers/net/fec_8xx/Kconfig | 2 +-
> 1 files changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/fec_8xx/Kconfig b/drivers/net/fec_8xx/Kconfig
> index 4560026..a84c232 100644
> --- a/drivers/net/fec_8xx/Kconfig
> +++ b/drivers/net/fec_8xx/Kconfig
> @@ -1,6 +1,6 @@
> config FEC_8XX
> tristate "Motorola 8xx FEC driver"
> - depends on NET_ETHERNET
> + depends on NET_ETHERNET && 8xx
> select MII
>
> config FEC_8XX_GENERIC_PHY
Yes, this is the correct approach. Please disregard the other
patches floating about.
Regards
Pantelis
^ permalink raw reply
* Re: problems on isp1362 driver
From: David Jander @ 2005-11-07 7:27 UTC (permalink / raw)
To: linuxppc-embedded; +Cc: David Zhang
In-Reply-To: <61BDFF5614E6D3119B6E00508B446754037CD88D@mail.digital-dispatch.com>
On Friday 15 July 2005 02:14, David Zhang wrote:
>[...]
> We are using Philips ISP1362 USB controller on WinCE 4.2. It seems that we
> are encountering "ATL interrupt" missing problem. I am wondering if any of
> you ever had the similar problem.
Where does this driver come from? Does it have anything to do with linux
kernel versions of that driver? If so, which one, 2.4 or 2.6?
I don't know WinCE, much less how drivers work in WinCE. Please specify what's
the relationship (or expected relationship) with linux. In any case, you'd
have to tell more details about the problem you're experiencing, otherwise
it's unlikely someone here can help you.
I am using the isp116x HCD driver from kernel 2.6 now with a isp1160 chip, and
it runs fine. I suppose you are talking about the Host part of the 1362?
Greetings,
--
David Jander
^ permalink raw reply
* 11-07-2005 2.6.14 can't finish build with yosemite-defconfig
From: KylongMu @ 2005-11-07 6:43 UTC (permalink / raw)
To: Wolfgang Denk; +Cc: Linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 212 bytes --]
Dear Denk
After cg-update today's kernel repository, I test with these steps:
Make yosemite-defconfig
Make uImage
But the build stops with some errors, last cg-update (6 days ago) is ok.
Cordially,
Kylong Mu
[-- Attachment #2: 11-07-2005-build-error-yosemite.txt --]
[-- Type: text/plain, Size: 255 bytes --]
CHK include/linux/version.h
CHK include/linux/compile.h
CHK usr/initramfs_list
make[1]: *** No rule to make target `arch/ppc/syslib/indirect_pci.o', needed by `arch/ppc/syslib/built-in.o'. Stop.
make: *** [arch/ppc/syslib] Error 2
^ permalink raw reply
* [PATCH] ppc: Fix PowerBook HD led on ARCH=powerpc
From: Benjamin Herrenschmidt @ 2005-11-07 5:57 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev list
The PowerBook HD led code uses obsoletes device-tree accessors which do
not work anymore for getting the root of the tree.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Index: linux-work/drivers/ide/ppc/pmac.c
===================================================================
--- linux-work.orig/drivers/ide/ppc/pmac.c 2005-11-03 09:40:54.000000000 +1100
+++ linux-work/drivers/ide/ppc/pmac.c 2005-11-07 15:44:05.000000000 +1100
@@ -497,16 +497,19 @@
if (pmu_get_model() != PMU_KEYLARGO_BASED)
return 0;
- dt = find_devices("device-tree");
+ dt = of_find_node_by_path("/");
if (dt == NULL)
return 0;
model = (const char *)get_property(dt, "model", NULL);
if (model == NULL)
return 0;
if (strncmp(model, "PowerBook", strlen("PowerBook")) != 0 &&
- strncmp(model, "iBook", strlen("iBook")) != 0)
+ strncmp(model, "iBook", strlen("iBook")) != 0) {
+ of_node_put(dt);
return 0;
-
+ }
+ of_node_put(dt);
+
pmu_blink_on.complete = 1;
pmu_blink_off.complete = 1;
spin_lock_init(&pmu_blink_lock);
^ permalink raw reply
* [PATCH] ppc: Fix ARCH=ppc build with xmon
From: Benjamin Herrenschmidt @ 2005-11-07 5:43 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev list
xmon() prototype is inconsistent between ARCH=ppc and ARCH=powerpc, thus causing
ARCH=ppc build breakage.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
I'm not sure you already fixed that, so just in case...
Index: linux-work/arch/ppc/kernel/traps.c
===================================================================
--- linux-work.orig/arch/ppc/kernel/traps.c 2005-11-07 15:10:26.000000000 +1100
+++ linux-work/arch/ppc/kernel/traps.c 2005-11-07 16:28:39.000000000 +1100
@@ -49,7 +49,7 @@
extern int xmon_iabr_match(struct pt_regs *regs);
extern int xmon_dabr_match(struct pt_regs *regs);
-void (*debugger)(struct pt_regs *regs) = xmon;
+int (*debugger)(struct pt_regs *regs) = xmon;
int (*debugger_bpt)(struct pt_regs *regs) = xmon_bpt;
int (*debugger_sstep)(struct pt_regs *regs) = xmon_sstep;
int (*debugger_iabr_match)(struct pt_regs *regs) = xmon_iabr_match;
@@ -57,7 +57,7 @@
void (*debugger_fault_handler)(struct pt_regs *regs);
#else
#ifdef CONFIG_KGDB
-void (*debugger)(struct pt_regs *regs);
+int (*debugger)(struct pt_regs *regs);
int (*debugger_bpt)(struct pt_regs *regs);
int (*debugger_sstep)(struct pt_regs *regs);
int (*debugger_iabr_match)(struct pt_regs *regs);
Index: linux-work/arch/ppc/xmon/xmon.c
===================================================================
--- linux-work.orig/arch/ppc/xmon/xmon.c 2005-11-03 09:40:36.000000000 +1100
+++ linux-work/arch/ppc/xmon/xmon.c 2005-11-07 16:30:03.000000000 +1100
@@ -220,8 +220,7 @@
p[1] = lo;
}
-void
-xmon(struct pt_regs *excp)
+int xmon(struct pt_regs *excp)
{
struct pt_regs regs;
int msr, cmd;
@@ -290,6 +289,8 @@
#endif /* CONFIG_SMP */
set_msr(msr); /* restore interrupt enable */
get_tb(start_tb[smp_processor_id()]);
+
+ return cmd != 'X';
}
irqreturn_t
Index: linux-work/include/asm-ppc/kgdb.h
===================================================================
--- linux-work.orig/include/asm-ppc/kgdb.h 2005-09-22 14:07:27.000000000 +1000
+++ linux-work/include/asm-ppc/kgdb.h 2005-11-07 16:29:07.000000000 +1100
@@ -31,7 +31,7 @@
/* For taking exceptions
* these are defined in traps.c
*/
-extern void (*debugger)(struct pt_regs *regs);
+extern int (*debugger)(struct pt_regs *regs);
extern int (*debugger_bpt)(struct pt_regs *regs);
extern int (*debugger_sstep)(struct pt_regs *regs);
extern int (*debugger_iabr_match)(struct pt_regs *regs);
^ permalink raw reply
* [PATCH] ppc: fix a bunch of warnings
From: Benjamin Herrenschmidt @ 2005-11-07 5:41 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev list
Building a PowerMac kernel with ARCH=powerpc causes a bunch of warnings,
this fixes some of them
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Index: linux-work/arch/powerpc/kernel/prom_init.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/prom_init.c 2005-11-07 15:10:26.000000000 +1100
+++ linux-work/arch/powerpc/kernel/prom_init.c 2005-11-07 16:14:43.000000000 +1100
@@ -403,19 +403,19 @@
}
}
-static int __init prom_getprop(phandle node, const char *pname,
+static int inline prom_getprop(phandle node, const char *pname,
void *value, size_t valuelen)
{
return call_prom("getprop", 4, 1, node, ADDR(pname),
(u32)(unsigned long) value, (u32) valuelen);
}
-static int __init prom_getproplen(phandle node, const char *pname)
+static int inline prom_getproplen(phandle node, const char *pname)
{
return call_prom("getproplen", 2, 1, node, ADDR(pname));
}
-static int __init prom_setprop(phandle node, const char *pname,
+static int inline prom_setprop(phandle node, const char *pname,
void *value, size_t valuelen)
{
return call_prom("setprop", 4, 1, node, ADDR(pname),
@@ -1408,8 +1408,9 @@
struct prom_t *_prom = &RELOC(prom);
char compat[256];
int len, i = 0;
+#ifdef CONFIG_PPC64
phandle rtas;
-
+#endif
len = prom_getprop(_prom->root, "compatible",
compat, sizeof(compat)-1);
if (len > 0) {
Index: linux-work/drivers/macintosh/via-pmu.c
===================================================================
--- linux-work.orig/drivers/macintosh/via-pmu.c 2005-11-07 15:10:26.000000000 +1100
+++ linux-work/drivers/macintosh/via-pmu.c 2005-11-07 16:12:41.000000000 +1100
@@ -2667,10 +2667,10 @@
asleep = 1;
/* Put the CPU into sleep mode */
- asm volatile("mfspr %0,1008" : "=r" (hid0) :);
+ hid0 = mfspr(SPRN_HID0);
hid0 = (hid0 & ~(HID0_NAP | HID0_DOZE)) | HID0_SLEEP;
- asm volatile("mtspr 1008,%0" : : "r" (hid0));
- _nmask_and_or_msr(0, MSR_POW | MSR_EE);
+ mtspr(SPRN_HID0, hid0);
+ mtmsr(mfmsr() | MSR_POW | MSR_EE);
udelay(10);
/* OK, we're awake again, start restoring things */
Index: linux-work/include/asm-ppc/btext.h
===================================================================
--- linux-work.orig/include/asm-ppc/btext.h 2005-09-22 14:07:27.000000000 +1000
+++ linux-work/include/asm-ppc/btext.h 2005-11-07 16:16:52.000000000 +1100
@@ -17,18 +17,18 @@
extern boot_infos_t disp_bi;
extern int boot_text_mapped;
-void btext_init(boot_infos_t *bi);
-void btext_welcome(void);
-void btext_prepare_BAT(void);
-void btext_setup_display(int width, int height, int depth, int pitch,
- unsigned long address);
-void map_boot_text(void);
-void btext_update_display(unsigned long phys, int width, int height,
- int depth, int pitch);
+extern void init_boot_display(void);
+extern void btext_welcome(void);
+extern void btext_prepare_BAT(void);
+extern void btext_setup_display(int width, int height, int depth, int pitch,
+ unsigned long address);
+extern void map_boot_text(void);
+extern void btext_update_display(unsigned long phys, int width, int height,
+ int depth, int pitch);
-void btext_drawchar(char c);
-void btext_drawstring(const char *str);
-void btext_drawhex(unsigned long v);
+extern void btext_drawchar(char c);
+extern void btext_drawstring(const char *str);
+extern void btext_drawhex(unsigned long v);
#endif /* __KERNEL__ */
#endif /* __PPC_BTEXT_H */
Index: linux-work/arch/powerpc/kernel/rtas.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/rtas.c 2005-11-07 15:10:26.000000000 +1100
+++ linux-work/arch/powerpc/kernel/rtas.c 2005-11-07 16:18:49.000000000 +1100
@@ -17,6 +17,7 @@
#include <linux/spinlock.h>
#include <linux/module.h>
#include <linux/init.h>
+#include <linux/delay.h>
#include <asm/prom.h>
#include <asm/rtas.h>
@@ -83,7 +84,7 @@
while (width-- > 0)
call_rtas_display_status(' ');
width = 16;
- udelay(500000);
+ mdelay(500);
pending_newline = 1;
} else {
if (pending_newline) {
Index: linux-work/include/asm-powerpc/xmon.h
===================================================================
--- linux-work.orig/include/asm-powerpc/xmon.h 2005-11-03 09:41:19.000000000 +1100
+++ linux-work/include/asm-powerpc/xmon.h 2005-11-07 16:20:21.000000000 +1100
@@ -7,6 +7,7 @@
extern int xmon(struct pt_regs *excp);
extern void xmon_printf(const char *fmt, ...);
extern void xmon_init(int);
+extern void xmon_map_scc(void);
#endif
#endif
^ permalink raw reply
* [PATCH] ppc: Fix ppc32 build after 64K pages
From: Benjamin Herrenschmidt @ 2005-11-07 5:25 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linuxppc-dev list
Oops, some last minute changes caused the 64K pages patch to break ppc32 build,
this fixes it.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Index: linux-work/arch/powerpc/Kconfig
===================================================================
--- linux-work.orig/arch/powerpc/Kconfig 2005-11-07 15:10:26.000000000 +1100
+++ linux-work/arch/powerpc/Kconfig 2005-11-07 15:42:06.000000000 +1100
@@ -605,6 +605,7 @@
config PPC_64K_PAGES
bool "64k page size"
+ depends on PPC64
help
This option changes the kernel logical page size to 64k. On machines
without processor support for 64k pages, the kernel will simulate
Index: linux-work/arch/powerpc/mm/ppc_mmu_32.c
===================================================================
--- linux-work.orig/arch/powerpc/mm/ppc_mmu_32.c 2005-11-07 15:10:26.000000000 +1100
+++ linux-work/arch/powerpc/mm/ppc_mmu_32.c 2005-11-07 15:43:08.000000000 +1100
@@ -188,9 +188,9 @@
if (Hash == 0)
return;
- pmd = pmd_offset(pgd_offset(vma->vm_mm, address), address);
+ pmd = pmd_offset(pgd_offset(mm, ea), ea);
if (!pmd_none(*pmd))
- add_hash_page(vma->vm_mm->context, address, pmd_val(*pmd));
+ add_hash_page(mm->context, ea, pmd_val(*pmd));
}
/*
^ permalink raw reply
* Re: [PATCH] ppc32 8xx: MPC8xx PCMCIA update
From: Paul Mackerras @ 2005-11-07 1:03 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: Dominik Brodowski, linux-ppc-embedded
In-Reply-To: <20051105150332.GB6577@logos.cnet>
Marcelo Tosatti writes:
> The following patch updates the MPC8xx PCMCIA driver:
This and the following patch look OK as far as I can tell - Dominik,
will you take care of sending them to Linus?
Paul.
^ permalink raw reply
* Re: MPC5200 I2S driver
From: Wolfgang Denk @ 2005-11-06 20:42 UTC (permalink / raw)
To: bennett78; +Cc: linuxppc-embedded
In-Reply-To: <436D068A.7030905@digis.net>
In message <436D068A.7030905@digis.net> you wrote:
>
> I am developing a couple of drivers: one a Data
> Acquisition driver for SPI based AD7683 SAR ADC
> on PSC6/codec and a LCD user interface on PSC3/SPI
> using the DENX Linux distribution. Is arch/ppc/5xxx_io/i2s.c
> a good example of a Bestcomm, Codec, non Ethernet
> example?
The arch/ppc/5xxx_io/i2s.c driver is *not* a good example for
anything usefuil - it is test code used to demonstrate some problems
with (earlier versions of) the BestComm API code. It is not in a
working state.
An example for a working driver is in "i2s_ring.c", but note that
this driver uses a pretty specialized interface to the application,
so you will probably have to adjust this for your needs.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Be careful what you wish for. You never know who will be listening.
- Terry Pratchett, _Soul Music_
^ permalink raw reply
* RAISE OF PRIORITY?
From: ppclinux @ 2005-11-06 15:54 UTC (permalink / raw)
To: linuxppc-embedded
Hello,
Does anyone of you know if there are any problems involved in raising the
priority of a SCHED_OTHER thread to SCHED_RR and then lower it back to
SCHED_OTHER?
Regards // Matias
^ permalink raw reply
* Today's 2.6.14 can't finish build with yosemite-defconfig
From: KylongMu @ 2005-11-06 15:55 UTC (permalink / raw)
To: wd; +Cc: linuxppc-embedded
In-Reply-To: <20051102164644.6D167353A2C@atlas.denx.de>
Dear Denk
After cg-update today's kernel repository, I test with these steps:
Make yosemite-defconfig
Make uImage
But the build stops with some errors, last cg-update (5 days ago) is ok.
Cordially,
Kylong Mu
^ permalink raw reply
* Re: 2.6.14 USB vs. sleep issues
From: Bin Zhang @ 2005-11-06 10:54 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, debian-powerpc@lists.debian.org
In-Reply-To: <1131229041.5229.29.camel@gaston>
On 11/5/05, Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> On Sat, 2005-11-05 at 22:58 +0100, Bin Zhang wrote:
> > On 11/3/05, Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> > > For those who experience crashes on sleep and/or wakeup (typically du=
e
> > > to USB) with 2.6.14, I made a test patch that might help. Please let =
me
> > > know if it makes things more reliable.
> > >
> > I've tried your patch with usb wifi dlink dwl-g122 (my eth1). It works.
> > There are some differences in /var/log/syslog :
>
> I have another patch tho:
>
The new patch works for me.
With or without the new patch, now I get almost the same syslogs.
Thanks,
Bin
> Index: linux-2.6.14-benh/drivers/usb/core/hcd-pci.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- linux-2.6.14-benh.orig/drivers/usb/core/hcd-pci.c 2005-10-31 10:54:=
44.000000000 +1100
> +++ linux-2.6.14-benh/drivers/usb/core/hcd-pci.c 2005-11-05 11:58:=
55.000000000 +1100
> @@ -32,6 +32,13 @@
> #include <linux/usb.h>
> #include "hcd.h"
>
> +#ifdef CONFIG_PPC_PMAC
> +#include <asm/machdep.h>
> +#include <asm/pmac_feature.h>
> +#include <asm/pci-bridge.h>
> +#include <asm/prom.h>
> +#endif
> +
>
> /* PCI-based HCs are common, but plenty of non-PCI HCs are used too */
>
> @@ -278,6 +285,18 @@
> break;
> }
>
> +#ifdef CONFIG_PPC_PMAC
> + if (retval =3D=3D 0 && _machine =3D=3D _MACH_Pmac) {
> + struct device_node *of_node;
> +
> + /* Disable USB PAD & cell clock */
> + of_node =3D pci_device_to_OF_node (to_pci_dev(hcd->self.
> + controller));
> + if (of_node)
> + pmac_call_feature(PMAC_FTR_USB_ENABLE, of_node, 0=
, 0);
> + }
> +#endif /* CONFIG_PPC_PMAC */
> +
> /* update power_state **ONLY** to make sysfs happier */
> if (retval =3D=3D 0)
> dev->dev.power.power_state =3D message;
> @@ -303,6 +322,18 @@
> return 0;
> }
>
> +#ifdef CONFIG_PPC_PMAC
> + if (_machine =3D=3D _MACH_Pmac) {
> + struct device_node *of_node;
> +
> + /* Re-enable USB PAD & cell clock */
> + of_node =3D pci_device_to_OF_node (to_pci_dev(hcd->self.
> + controller));
> + if (of_node)
> + pmac_call_feature(PMAC_FTR_USB_ENABLE, of_node, 0=
, 1);
> + }
> +#endif /* CONFIG_PPC_PMAC */
> +
> /* NOTE: chip docs cover clean "real suspend" cases (what Linux
> * calls "standby", "suspend to RAM", and so on). There are also
> * dirty cases when swsusp fakes a suspend in "shutdown" mode.
> @@ -381,7 +412,6 @@
> usb_hc_died (hcd);
> }
>
> - retval =3D pci_enable_device(dev);
> return retval;
> }
> EXPORT_SYMBOL (usb_hcd_pci_resume);
> Index: linux-2.6.14-benh/drivers/usb/host/ehci-hcd.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- linux-2.6.14-benh.orig/drivers/usb/host/ehci-hcd.c 2005-10-31 10:54:=
44.000000000 +1100
> +++ linux-2.6.14-benh/drivers/usb/host/ehci-hcd.c 2005-11-06 08:26:=
42.000000000 +1100
> @@ -750,6 +750,15 @@
> if (time_before (jiffies, ehci->next_statechange))
> msleep (100);
>
> + /* Disable emission of interrupts during suspend */
> + writel(0, &ehci->regs->intr_enable);
> + mb();
> + clear_bit(HC_FLAG_IRQ_ON, &hcd->bitflags);
> + synchronize_irq(dev->irq);
> +
> + /* Tell root hub not to bother trying to resume */
> + set_bit(HC_FLAG_SUSPEND_RH, &hcd->bitflags);
> +
> #ifdef CONFIG_USB_SUSPEND
> (void) usb_suspend_device (hcd->self.root_hub, message);
> #else
> @@ -776,6 +785,9 @@
> if (time_before (jiffies, ehci->next_statechange))
> msleep (100);
>
> + clear_bit(HC_FLAG_SUSPEND_RH, &hcd->bitflags);
> + set_bit(HC_FLAG_IRQ_ON, &hcd->bitflags);
> +
> /* If any port is suspended (or owned by the companion),
> * we know we can/must resume the HC (and mustn't reset it).
> */
> Index: linux-2.6.14-benh/drivers/usb/host/ehci-q.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- linux-2.6.14-benh.orig/drivers/usb/host/ehci-q.c 2005-10-31 10:54:=
44.000000000 +1100
> +++ linux-2.6.14-benh/drivers/usb/host/ehci-q.c 2005-11-03 17:03:27.00000=
0000 +1100
> @@ -926,6 +926,11 @@
> #endif
>
> spin_lock_irqsave (&ehci->lock, flags);
> + if (HC_IS_SUSPENDED(ehci_to_hcd(ehci)->state)) {
> + spin_unlock_irqrestore (&ehci->lock, flags);
> + return -ESHUTDOWN;
> + }
> +
> qh =3D qh_append_tds (ehci, urb, qtd_list, epnum, &ep->hcpriv);
>
> /* Control/bulk operations through TTs don't need scheduling,
> Index: linux-2.6.14-benh/drivers/usb/host/ehci-sched.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- linux-2.6.14-benh.orig/drivers/usb/host/ehci-sched.c 2005-10-3=
1 10:54:44.000000000 +1100
> +++ linux-2.6.14-benh/drivers/usb/host/ehci-sched.c 2005-11-03 17:05:=
54.000000000 +1100
> @@ -602,6 +602,11 @@
>
> spin_lock_irqsave (&ehci->lock, flags);
>
> + if (HC_IS_SUSPENDED(ehci_to_hcd(ehci)->state)) {
> + spin_unlock_irqrestore (&ehci->lock, flags);
> + return -ESHUTDOWN;
> + }
> +
> /* get qh and force any scheduling errors */
> INIT_LIST_HEAD (&empty);
> qh =3D qh_append_tds (ehci, urb, &empty, epnum, &ep->hcpriv);
> @@ -1456,6 +1461,11 @@
>
> /* schedule ... need to lock */
> spin_lock_irqsave (&ehci->lock, flags);
> + if (HC_IS_SUSPENDED(ehci_to_hcd(ehci)->state)) {
> + spin_unlock_irqrestore (&ehci->lock, flags);
> + status =3D -ESHUTDOWN;
> + goto done;
> + }
> status =3D iso_stream_schedule (ehci, urb, stream);
> if (likely (status =3D=3D 0))
> itd_link_urb (ehci, urb, ehci->periodic_size << 3, stream=
);
> @@ -1815,6 +1825,11 @@
>
> /* schedule ... need to lock */
> spin_lock_irqsave (&ehci->lock, flags);
> + if (HC_IS_SUSPENDED(ehci_to_hcd(ehci)->state)) {
> + spin_unlock_irqrestore (&ehci->lock, flags);
> + status =3D -ESHUTDOWN;
> + goto done;
> + }
> status =3D iso_stream_schedule (ehci, urb, stream);
> if (status =3D=3D 0)
> sitd_link_urb (ehci, urb, ehci->periodic_size << 3, strea=
m);
> Index: linux-2.6.14-benh/drivers/usb/host/ohci-hcd.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- linux-2.6.14-benh.orig/drivers/usb/host/ohci-hcd.c 2005-10-31 10:54:=
44.000000000 +1100
> +++ linux-2.6.14-benh/drivers/usb/host/ohci-hcd.c 2005-11-06 08:34:=
41.000000000 +1100
> @@ -252,6 +252,10 @@
>
> spin_lock_irqsave (&ohci->lock, flags);
>
> + if (HC_IS_SUSPENDED(hcd->state)) {
> + retval =3D -ESHUTDOWN;
> + goto fail;
> + }
> /* don't submit to a dead HC */
> if (!HC_IS_RUNNING(hcd->state)) {
> retval =3D -ENODEV;
> Index: linux-2.6.14-benh/drivers/usb/host/ohci-hub.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- linux-2.6.14-benh.orig/drivers/usb/host/ohci-hub.c 2005-10-31 10:54:=
44.000000000 +1100
> +++ linux-2.6.14-benh/drivers/usb/host/ohci-hub.c 2005-11-05 13:12:=
24.000000000 +1100
> @@ -139,6 +139,9 @@
> u32 temp, enables;
> int status =3D -EINPROGRESS;
>
> + if (test_bit(HC_FLAG_SUSPEND_RH, &hcd->bitflags))
> + return -ESHUTDOWN;
> +
> if (time_before (jiffies, ohci->next_statechange))
> msleep(5);
>
> @@ -219,13 +222,6 @@
> /* Sometimes PCI D3 suspend trashes frame timings ... */
> periodic_reinit (ohci);
>
> - /* interrupts might have been disabled */
> - ohci_writel (ohci, OHCI_INTR_INIT, &ohci->regs->intrenable);
> - if (ohci->ed_rm_list)
> - ohci_writel (ohci, OHCI_INTR_SF, &ohci->regs->intrenable)=
;
> - ohci_writel (ohci, ohci_readl (ohci, &ohci->regs->intrstatus),
> - &ohci->regs->intrstatus);
> -
> /* Then re-enable operations */
> ohci_writel (ohci, OHCI_USB_OPER, &ohci->regs->control);
> (void) ohci_readl (ohci, &ohci->regs->control);
> @@ -241,6 +237,13 @@
> /* TRSMRCY */
> msleep (10);
>
> + /* interrupts might have been disabled */
> + ohci_writel (ohci, OHCI_INTR_INIT, &ohci->regs->intrenable);
> + if (ohci->ed_rm_list)
> + ohci_writel (ohci, OHCI_INTR_SF, &ohci->regs->intrenable)=
;
> + ohci_writel (ohci, ohci_readl (ohci, &ohci->regs->intrstatus),
> + &ohci->regs->intrstatus);
> +
> /* keep it alive for ~5x suspend + resume costs */
> ohci->next_statechange =3D jiffies + msecs_to_jiffies (250);
>
> @@ -308,6 +311,9 @@
> int can_suspend =3D hcd->can_wakeup;
> unsigned long flags;
>
> + if (test_bit(HC_FLAG_SUSPEND_RH, &hcd->bitflags))
> + return 0;
> +
> spin_lock_irqsave (&ohci->lock, flags);
>
> /* handle autosuspended root: finish resuming before
> @@ -441,6 +447,9 @@
> return -EINVAL;
> port--;
>
> + if (test_bit(HC_FLAG_SUSPEND_RH, &hcd->bitflags))
> + return -ESHUTDOWN;
> +
> /* start port reset before HNP protocol times out */
> status =3D ohci_readl(ohci, &ohci->regs->roothub.portstatus [port=
]);
> if (!(status & RH_PS_CCS))
> @@ -526,6 +535,9 @@
> u32 temp;
> int retval =3D 0;
>
> + if (test_bit(HC_FLAG_SUSPEND_RH, &hcd->bitflags))
> + return -ESHUTDOWN;
> +
> switch (typeReq) {
> case ClearHubFeature:
> switch (wValue) {
> Index: linux-2.6.14-benh/drivers/usb/host/ohci-pci.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- linux-2.6.14-benh.orig/drivers/usb/host/ohci-pci.c 2005-10-31 10:52:=
24.000000000 +1100
> +++ linux-2.6.14-benh/drivers/usb/host/ohci-pci.c 2005-11-05 12:46:=
53.000000000 +1100
> @@ -14,13 +14,6 @@
> * This file is licenced under the GPL.
> */
>
> -#ifdef CONFIG_PPC_PMAC
> -#include <asm/machdep.h>
> -#include <asm/pmac_feature.h>
> -#include <asm/pci-bridge.h>
> -#include <asm/prom.h>
> -#endif
> -
> #ifndef CONFIG_PCI
> #error "This file is PCI bus glue. CONFIG_PCI must be defined."
> #endif
> @@ -118,6 +111,15 @@
> if (time_before (jiffies, ohci->next_statechange))
> msleep (100);
>
> + /* Disable emission of interrupts during suspend */
> + ohci_writel(ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);
> + mb();
> + clear_bit(HC_FLAG_IRQ_ON, &hcd->bitflags);
> + synchronize_irq(dev->irq);
> +
> + /* Tell root hub not to bother trying to resume */
> + set_bit(HC_FLAG_SUSPEND_RH, &hcd->bitflags);
> +
> #ifdef CONFIG_USB_SUSPEND
> (void) usb_suspend_device (hcd->self.root_hub, message);
> #else
> @@ -129,16 +131,6 @@
> /* let things settle down a bit */
> msleep (100);
>
> -#ifdef CONFIG_PPC_PMAC
> - if (_machine =3D=3D _MACH_Pmac) {
> - struct device_node *of_node;
> -
> - /* Disable USB PAD & cell clock */
> - of_node =3D pci_device_to_OF_node (to_pci_dev(hcd->self.c=
ontroller));
> - if (of_node)
> - pmac_call_feature(PMAC_FTR_USB_ENABLE, of_node, 0=
, 0);
> - }
> -#endif /* CONFIG_PPC_PMAC */
> return 0;
> }
>
> @@ -148,20 +140,13 @@
> struct ohci_hcd *ohci =3D hcd_to_ohci (hcd);
> int retval =3D 0;
>
> -#ifdef CONFIG_PPC_PMAC
> - if (_machine =3D=3D _MACH_Pmac) {
> - struct device_node *of_node;
> -
> - /* Re-enable USB PAD & cell clock */
> - of_node =3D pci_device_to_OF_node (to_pci_dev(hcd->self.c=
ontroller));
> - if (of_node)
> - pmac_call_feature (PMAC_FTR_USB_ENABLE, of_node, =
0, 1);
> - }
> -#endif /* CONFIG_PPC_PMAC */
> -
> /* resume root hub */
> if (time_before (jiffies, ohci->next_statechange))
> msleep (100);
> +
> + clear_bit(HC_FLAG_SUSPEND_RH, &hcd->bitflags);
> + set_bit(HC_FLAG_IRQ_ON, &hcd->bitflags);
> +
> #ifdef CONFIG_USB_SUSPEND
> /* get extra cleanup even if remote wakeup isn't in use */
> retval =3D usb_resume_device (hcd->self.root_hub);
> Index: linux-2.6.14-benh/drivers/usb/core/hcd.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- linux-2.6.14-benh.orig/drivers/usb/core/hcd.c 2005-10-31 10:54:=
44.000000000 +1100
> +++ linux-2.6.14-benh/drivers/usb/core/hcd.c 2005-11-05 11:56:48.00000=
0000 +1100
> @@ -1600,7 +1600,8 @@
> struct usb_hcd *hcd =3D __hcd;
> int start =3D hcd->state;
>
> - if (start =3D=3D HC_STATE_HALT)
> + if (start =3D=3D HC_STATE_HALT ||
> + !test_bit(HC_FLAG_IRQ_ON, &hcd->bitflags))
> return IRQ_NONE;
> if (hcd->driver->irq (hcd, r) =3D=3D IRQ_NONE)
> return IRQ_NONE;
> @@ -1736,6 +1737,9 @@
> if (hcd->driver->irq) {
> char buf[8], *bufp =3D buf;
>
> + set_bit(HC_FLAG_IRQ_ON, &hcd->bitflags);
> + wmb();
> +
> #ifdef __sparc__
> bufp =3D __irq_itoa(irqnum);
> #else
> Index: linux-2.6.14-benh/drivers/usb/core/hcd.h
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- linux-2.6.14-benh.orig/drivers/usb/core/hcd.h 2005-10-31 10:54:=
44.000000000 +1100
> +++ linux-2.6.14-benh/drivers/usb/core/hcd.h 2005-11-05 12:19:11.00000=
0000 +1100
> @@ -71,6 +71,10 @@
> /*
> * hardware info/state
> */
> + unsigned long bitflags; /* various single-bit fla=
gs */
> +#define HC_FLAG_IRQ_ON 0
> +#define HC_FLAG_SUSPEND_RH 1
> +
> const struct hc_driver *driver; /* hw-specific hooks */
> unsigned saw_irq : 1;
> unsigned can_wakeup:1; /* hw supports wakeup? */
> Index: linux-2.6.14-benh/drivers/usb/host/ehci-hub.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- linux-2.6.14-benh.orig/drivers/usb/host/ehci-hub.c 2005-10-31 10:54:=
44.000000000 +1100
> +++ linux-2.6.14-benh/drivers/usb/host/ehci-hub.c 2005-11-05 13:12:=
39.000000000 +1100
> @@ -90,8 +90,12 @@
> int i;
> int intr_enable;
>
> + if (test_bit(HC_FLAG_SUSPEND_RH, &hcd->bitflags))
> + return -ESHUTDOWN;
> +
> if (time_before (jiffies, ehci->next_statechange))
> msleep(5);
> +
> spin_lock_irq (&ehci->lock);
>
> /* re-init operational registers in case we lost power */
> @@ -215,7 +219,8 @@
> unsigned long flags;
>
> /* if !USB_SUSPEND, root hub timers won't get shut down ... */
> - if (!HC_IS_RUNNING(hcd->state))
> + if (!HC_IS_RUNNING(hcd->state) ||
> + test_bit(HC_FLAG_SUSPEND_RH, &hcd->bitflags))
> return 0;
>
> /* init status to no-changes */
> @@ -313,6 +318,8 @@
> unsigned long flags;
> int retval =3D 0;
>
> + if (test_bit(HC_FLAG_SUSPEND_RH, &hcd->bitflags))
> + return -ESHUTDOWN;
> /*
> * FIXME: support SetPortFeatures USB_PORT_FEAT_INDICATOR.
> * HCS_INDICATOR may say we can change LEDs to off/amber/green.
> Index: linux-2.6.14-benh/drivers/usb/host/uhci-hcd.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- linux-2.6.14-benh.orig/drivers/usb/host/uhci-hcd.c 2005-10-31 10:54:=
44.000000000 +1100
> +++ linux-2.6.14-benh/drivers/usb/host/uhci-hcd.c 2005-11-06 08:35:=
39.000000000 +1100
> @@ -770,6 +770,12 @@
>
> dev_dbg(uhci_dev(uhci), "%s\n", __FUNCTION__);
>
> + /* Disable emission of interrupts during suspend */
> + pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP, 0);
> + mb();
> + clear_bit(HC_FLAG_IRQ_ON, &hcd->bitflags);
> + synchronize_irq(dev->irq);
> +
> spin_lock_irq(&uhci->lock);
> if (uhci->hc_inaccessible) /* Dead or already suspended */
> goto done;
> @@ -787,7 +793,8 @@
> };
>
> /* All PCI host controllers are required to disable IRQ generatio=
n
> - * at the source, so we must turn off PIRQ.
> + * at the source, so we must turn off PIRQ. Already done earlier
> + * but better be safe than sorry...
> */
> pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP, 0);
> uhci->hc_inaccessible =3D 1;
>
>
>
^ permalink raw reply
* Re: [PATCH] Fix ppc32 smp build.
From: Paul Mackerras @ 2005-11-06 10:51 UTC (permalink / raw)
To: David Woodhouse; +Cc: linuxppc-dev
In-Reply-To: <1131264050.10031.265.camel@baythorne.infradead.org>
David Woodhouse writes:
> Fix PPC32 SMP build -- instead of setting the now non-existent
> smp_tb_synchronized when the timebases are synchronised, we clear the
> CPU_FTR_USE_TB bit when they're not. Does this look sane, and did I miss
> cases where they're not synchronised?
I don't like clearing the USE_TB bit, since the alternative is to use
the RTC (a la 601), and most cpus will take an illegal instruction
exception if you try to do that.
If we really can get unsynchronized timebases still, then I suppose we
need to bring back the smp_tb_synchronized variable, but I was
assuming that we could get the timebases synchronized one way or
another. If the to-and-fro involved in synchronizing the timebases
doesn't work then there is an awful lot of other stuff that is going
to fall on its face too... Maybe the solution is just to panic if we
can't get the other cpu to talk to us enough to synchronize the
timebases.
Paul.
^ permalink raw reply
* [PATCH] Fix ppc32 smp build.
From: David Woodhouse @ 2005-11-06 8:00 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
Fix PPC32 SMP build -- instead of setting the now non-existent
smp_tb_synchronized when the timebases are synchronised, we clear the
CPU_FTR_USE_TB bit when they're not. Does this look sane, and did I miss
cases where they're not synchronised?
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -363,8 +363,6 @@ static void __init psurge_dual_sync_tb(i
/* now interrupt the secondary, starting both TBs */
psurge_set_ipi(1);
-
- smp_tb_synchronized = 1;
}
static struct irqaction psurge_irqaction = {
@@ -396,6 +394,8 @@ static void __init smp_psurge_setup_cpu(
if (psurge_type == PSURGE_DUAL)
psurge_dual_sync_tb(cpu_nr);
+ else
+ cur_cpu_spec->cpu_features &= ~CPU_FTR_USE_TB;
}
void __init smp_psurge_take_timebase(void)
@@ -624,10 +624,10 @@ void smp_core99_give_timebase(void)
/* wait for the secondary to have taken it */
for (t = 100000; t > 0 && sec_tb_reset; --t)
udelay(10);
- if (sec_tb_reset)
+ if (sec_tb_reset) {
printk(KERN_WARNING "Timeout waiting sync(2) on second CPU\n");
- else
- smp_tb_synchronized = 1;
+ cur_cpu_spec->cpu_features &= ~CPU_FTR_USE_TB;
+ }
/* Now, restart the timebase by leaving the GPIO to an open collector */
pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, core99_tb_gpio, 0);
--
dwmw2
^ permalink raw reply
* [patch 2.6.14] fec_8xx: make CONFIG_FEC_8XX depend on CONFIG_8xx
From: John W. Linville @ 2005-11-06 2:57 UTC (permalink / raw)
To: linuxppc-embedded; +Cc: netdev, linux-kernel
Make CONFIG_FEC_8XX depend on CONFIG_8xx. This keeps allmodconfig from
breaking on non-8xx (PPC) platforms.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/fec_8xx/Kconfig | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/fec_8xx/Kconfig b/drivers/net/fec_8xx/Kconfig
index 4560026..a84c232 100644
--- a/drivers/net/fec_8xx/Kconfig
+++ b/drivers/net/fec_8xx/Kconfig
@@ -1,6 +1,6 @@
config FEC_8XX
tristate "Motorola 8xx FEC driver"
- depends on NET_ETHERNET
+ depends on NET_ETHERNET && 8xx
select MII
config FEC_8XX_GENERIC_PHY
--
John W. Linville
linville@tuxdriver.com
^ permalink raw reply related
* Re: 2.6.14 USB vs. sleep issues
From: Benjamin Herrenschmidt @ 2005-11-05 22:17 UTC (permalink / raw)
To: Bin Zhang; +Cc: linuxppc-dev list, debian-powerpc@lists.debian.org
In-Reply-To: <51ad2e0d0511051358p2fe15f1i7278615996183eb1@mail.gmail.com>
On Sat, 2005-11-05 at 22:58 +0100, Bin Zhang wrote:
> On 11/3/05, Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> > For those who experience crashes on sleep and/or wakeup (typically due
> > to USB) with 2.6.14, I made a test patch that might help. Please let me
> > know if it makes things more reliable.
> >
> I've tried your patch with usb wifi dlink dwl-g122 (my eth1). It works.
> There are some differences in /var/log/syslog :
I have another patch tho:
Index: linux-2.6.14-benh/drivers/usb/core/hcd-pci.c
===================================================================
--- linux-2.6.14-benh.orig/drivers/usb/core/hcd-pci.c 2005-10-31 10:54:44.000000000 +1100
+++ linux-2.6.14-benh/drivers/usb/core/hcd-pci.c 2005-11-05 11:58:55.000000000 +1100
@@ -32,6 +32,13 @@
#include <linux/usb.h>
#include "hcd.h"
+#ifdef CONFIG_PPC_PMAC
+#include <asm/machdep.h>
+#include <asm/pmac_feature.h>
+#include <asm/pci-bridge.h>
+#include <asm/prom.h>
+#endif
+
/* PCI-based HCs are common, but plenty of non-PCI HCs are used too */
@@ -278,6 +285,18 @@
break;
}
+#ifdef CONFIG_PPC_PMAC
+ if (retval == 0 && _machine == _MACH_Pmac) {
+ struct device_node *of_node;
+
+ /* Disable USB PAD & cell clock */
+ of_node = pci_device_to_OF_node (to_pci_dev(hcd->self.
+ controller));
+ if (of_node)
+ pmac_call_feature(PMAC_FTR_USB_ENABLE, of_node, 0, 0);
+ }
+#endif /* CONFIG_PPC_PMAC */
+
/* update power_state **ONLY** to make sysfs happier */
if (retval == 0)
dev->dev.power.power_state = message;
@@ -303,6 +322,18 @@
return 0;
}
+#ifdef CONFIG_PPC_PMAC
+ if (_machine == _MACH_Pmac) {
+ struct device_node *of_node;
+
+ /* Re-enable USB PAD & cell clock */
+ of_node = pci_device_to_OF_node (to_pci_dev(hcd->self.
+ controller));
+ if (of_node)
+ pmac_call_feature(PMAC_FTR_USB_ENABLE, of_node, 0, 1);
+ }
+#endif /* CONFIG_PPC_PMAC */
+
/* NOTE: chip docs cover clean "real suspend" cases (what Linux
* calls "standby", "suspend to RAM", and so on). There are also
* dirty cases when swsusp fakes a suspend in "shutdown" mode.
@@ -381,7 +412,6 @@
usb_hc_died (hcd);
}
- retval = pci_enable_device(dev);
return retval;
}
EXPORT_SYMBOL (usb_hcd_pci_resume);
Index: linux-2.6.14-benh/drivers/usb/host/ehci-hcd.c
===================================================================
--- linux-2.6.14-benh.orig/drivers/usb/host/ehci-hcd.c 2005-10-31 10:54:44.000000000 +1100
+++ linux-2.6.14-benh/drivers/usb/host/ehci-hcd.c 2005-11-06 08:26:42.000000000 +1100
@@ -750,6 +750,15 @@
if (time_before (jiffies, ehci->next_statechange))
msleep (100);
+ /* Disable emission of interrupts during suspend */
+ writel(0, &ehci->regs->intr_enable);
+ mb();
+ clear_bit(HC_FLAG_IRQ_ON, &hcd->bitflags);
+ synchronize_irq(dev->irq);
+
+ /* Tell root hub not to bother trying to resume */
+ set_bit(HC_FLAG_SUSPEND_RH, &hcd->bitflags);
+
#ifdef CONFIG_USB_SUSPEND
(void) usb_suspend_device (hcd->self.root_hub, message);
#else
@@ -776,6 +785,9 @@
if (time_before (jiffies, ehci->next_statechange))
msleep (100);
+ clear_bit(HC_FLAG_SUSPEND_RH, &hcd->bitflags);
+ set_bit(HC_FLAG_IRQ_ON, &hcd->bitflags);
+
/* If any port is suspended (or owned by the companion),
* we know we can/must resume the HC (and mustn't reset it).
*/
Index: linux-2.6.14-benh/drivers/usb/host/ehci-q.c
===================================================================
--- linux-2.6.14-benh.orig/drivers/usb/host/ehci-q.c 2005-10-31 10:54:44.000000000 +1100
+++ linux-2.6.14-benh/drivers/usb/host/ehci-q.c 2005-11-03 17:03:27.000000000 +1100
@@ -926,6 +926,11 @@
#endif
spin_lock_irqsave (&ehci->lock, flags);
+ if (HC_IS_SUSPENDED(ehci_to_hcd(ehci)->state)) {
+ spin_unlock_irqrestore (&ehci->lock, flags);
+ return -ESHUTDOWN;
+ }
+
qh = qh_append_tds (ehci, urb, qtd_list, epnum, &ep->hcpriv);
/* Control/bulk operations through TTs don't need scheduling,
Index: linux-2.6.14-benh/drivers/usb/host/ehci-sched.c
===================================================================
--- linux-2.6.14-benh.orig/drivers/usb/host/ehci-sched.c 2005-10-31 10:54:44.000000000 +1100
+++ linux-2.6.14-benh/drivers/usb/host/ehci-sched.c 2005-11-03 17:05:54.000000000 +1100
@@ -602,6 +602,11 @@
spin_lock_irqsave (&ehci->lock, flags);
+ if (HC_IS_SUSPENDED(ehci_to_hcd(ehci)->state)) {
+ spin_unlock_irqrestore (&ehci->lock, flags);
+ return -ESHUTDOWN;
+ }
+
/* get qh and force any scheduling errors */
INIT_LIST_HEAD (&empty);
qh = qh_append_tds (ehci, urb, &empty, epnum, &ep->hcpriv);
@@ -1456,6 +1461,11 @@
/* schedule ... need to lock */
spin_lock_irqsave (&ehci->lock, flags);
+ if (HC_IS_SUSPENDED(ehci_to_hcd(ehci)->state)) {
+ spin_unlock_irqrestore (&ehci->lock, flags);
+ status = -ESHUTDOWN;
+ goto done;
+ }
status = iso_stream_schedule (ehci, urb, stream);
if (likely (status == 0))
itd_link_urb (ehci, urb, ehci->periodic_size << 3, stream);
@@ -1815,6 +1825,11 @@
/* schedule ... need to lock */
spin_lock_irqsave (&ehci->lock, flags);
+ if (HC_IS_SUSPENDED(ehci_to_hcd(ehci)->state)) {
+ spin_unlock_irqrestore (&ehci->lock, flags);
+ status = -ESHUTDOWN;
+ goto done;
+ }
status = iso_stream_schedule (ehci, urb, stream);
if (status == 0)
sitd_link_urb (ehci, urb, ehci->periodic_size << 3, stream);
Index: linux-2.6.14-benh/drivers/usb/host/ohci-hcd.c
===================================================================
--- linux-2.6.14-benh.orig/drivers/usb/host/ohci-hcd.c 2005-10-31 10:54:44.000000000 +1100
+++ linux-2.6.14-benh/drivers/usb/host/ohci-hcd.c 2005-11-06 08:34:41.000000000 +1100
@@ -252,6 +252,10 @@
spin_lock_irqsave (&ohci->lock, flags);
+ if (HC_IS_SUSPENDED(hcd->state)) {
+ retval = -ESHUTDOWN;
+ goto fail;
+ }
/* don't submit to a dead HC */
if (!HC_IS_RUNNING(hcd->state)) {
retval = -ENODEV;
Index: linux-2.6.14-benh/drivers/usb/host/ohci-hub.c
===================================================================
--- linux-2.6.14-benh.orig/drivers/usb/host/ohci-hub.c 2005-10-31 10:54:44.000000000 +1100
+++ linux-2.6.14-benh/drivers/usb/host/ohci-hub.c 2005-11-05 13:12:24.000000000 +1100
@@ -139,6 +139,9 @@
u32 temp, enables;
int status = -EINPROGRESS;
+ if (test_bit(HC_FLAG_SUSPEND_RH, &hcd->bitflags))
+ return -ESHUTDOWN;
+
if (time_before (jiffies, ohci->next_statechange))
msleep(5);
@@ -219,13 +222,6 @@
/* Sometimes PCI D3 suspend trashes frame timings ... */
periodic_reinit (ohci);
- /* interrupts might have been disabled */
- ohci_writel (ohci, OHCI_INTR_INIT, &ohci->regs->intrenable);
- if (ohci->ed_rm_list)
- ohci_writel (ohci, OHCI_INTR_SF, &ohci->regs->intrenable);
- ohci_writel (ohci, ohci_readl (ohci, &ohci->regs->intrstatus),
- &ohci->regs->intrstatus);
-
/* Then re-enable operations */
ohci_writel (ohci, OHCI_USB_OPER, &ohci->regs->control);
(void) ohci_readl (ohci, &ohci->regs->control);
@@ -241,6 +237,13 @@
/* TRSMRCY */
msleep (10);
+ /* interrupts might have been disabled */
+ ohci_writel (ohci, OHCI_INTR_INIT, &ohci->regs->intrenable);
+ if (ohci->ed_rm_list)
+ ohci_writel (ohci, OHCI_INTR_SF, &ohci->regs->intrenable);
+ ohci_writel (ohci, ohci_readl (ohci, &ohci->regs->intrstatus),
+ &ohci->regs->intrstatus);
+
/* keep it alive for ~5x suspend + resume costs */
ohci->next_statechange = jiffies + msecs_to_jiffies (250);
@@ -308,6 +311,9 @@
int can_suspend = hcd->can_wakeup;
unsigned long flags;
+ if (test_bit(HC_FLAG_SUSPEND_RH, &hcd->bitflags))
+ return 0;
+
spin_lock_irqsave (&ohci->lock, flags);
/* handle autosuspended root: finish resuming before
@@ -441,6 +447,9 @@
return -EINVAL;
port--;
+ if (test_bit(HC_FLAG_SUSPEND_RH, &hcd->bitflags))
+ return -ESHUTDOWN;
+
/* start port reset before HNP protocol times out */
status = ohci_readl(ohci, &ohci->regs->roothub.portstatus [port]);
if (!(status & RH_PS_CCS))
@@ -526,6 +535,9 @@
u32 temp;
int retval = 0;
+ if (test_bit(HC_FLAG_SUSPEND_RH, &hcd->bitflags))
+ return -ESHUTDOWN;
+
switch (typeReq) {
case ClearHubFeature:
switch (wValue) {
Index: linux-2.6.14-benh/drivers/usb/host/ohci-pci.c
===================================================================
--- linux-2.6.14-benh.orig/drivers/usb/host/ohci-pci.c 2005-10-31 10:52:24.000000000 +1100
+++ linux-2.6.14-benh/drivers/usb/host/ohci-pci.c 2005-11-05 12:46:53.000000000 +1100
@@ -14,13 +14,6 @@
* This file is licenced under the GPL.
*/
-#ifdef CONFIG_PPC_PMAC
-#include <asm/machdep.h>
-#include <asm/pmac_feature.h>
-#include <asm/pci-bridge.h>
-#include <asm/prom.h>
-#endif
-
#ifndef CONFIG_PCI
#error "This file is PCI bus glue. CONFIG_PCI must be defined."
#endif
@@ -118,6 +111,15 @@
if (time_before (jiffies, ohci->next_statechange))
msleep (100);
+ /* Disable emission of interrupts during suspend */
+ ohci_writel(ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);
+ mb();
+ clear_bit(HC_FLAG_IRQ_ON, &hcd->bitflags);
+ synchronize_irq(dev->irq);
+
+ /* Tell root hub not to bother trying to resume */
+ set_bit(HC_FLAG_SUSPEND_RH, &hcd->bitflags);
+
#ifdef CONFIG_USB_SUSPEND
(void) usb_suspend_device (hcd->self.root_hub, message);
#else
@@ -129,16 +131,6 @@
/* let things settle down a bit */
msleep (100);
-#ifdef CONFIG_PPC_PMAC
- if (_machine == _MACH_Pmac) {
- struct device_node *of_node;
-
- /* Disable USB PAD & cell clock */
- of_node = pci_device_to_OF_node (to_pci_dev(hcd->self.controller));
- if (of_node)
- pmac_call_feature(PMAC_FTR_USB_ENABLE, of_node, 0, 0);
- }
-#endif /* CONFIG_PPC_PMAC */
return 0;
}
@@ -148,20 +140,13 @@
struct ohci_hcd *ohci = hcd_to_ohci (hcd);
int retval = 0;
-#ifdef CONFIG_PPC_PMAC
- if (_machine == _MACH_Pmac) {
- struct device_node *of_node;
-
- /* Re-enable USB PAD & cell clock */
- of_node = pci_device_to_OF_node (to_pci_dev(hcd->self.controller));
- if (of_node)
- pmac_call_feature (PMAC_FTR_USB_ENABLE, of_node, 0, 1);
- }
-#endif /* CONFIG_PPC_PMAC */
-
/* resume root hub */
if (time_before (jiffies, ohci->next_statechange))
msleep (100);
+
+ clear_bit(HC_FLAG_SUSPEND_RH, &hcd->bitflags);
+ set_bit(HC_FLAG_IRQ_ON, &hcd->bitflags);
+
#ifdef CONFIG_USB_SUSPEND
/* get extra cleanup even if remote wakeup isn't in use */
retval = usb_resume_device (hcd->self.root_hub);
Index: linux-2.6.14-benh/drivers/usb/core/hcd.c
===================================================================
--- linux-2.6.14-benh.orig/drivers/usb/core/hcd.c 2005-10-31 10:54:44.000000000 +1100
+++ linux-2.6.14-benh/drivers/usb/core/hcd.c 2005-11-05 11:56:48.000000000 +1100
@@ -1600,7 +1600,8 @@
struct usb_hcd *hcd = __hcd;
int start = hcd->state;
- if (start == HC_STATE_HALT)
+ if (start == HC_STATE_HALT ||
+ !test_bit(HC_FLAG_IRQ_ON, &hcd->bitflags))
return IRQ_NONE;
if (hcd->driver->irq (hcd, r) == IRQ_NONE)
return IRQ_NONE;
@@ -1736,6 +1737,9 @@
if (hcd->driver->irq) {
char buf[8], *bufp = buf;
+ set_bit(HC_FLAG_IRQ_ON, &hcd->bitflags);
+ wmb();
+
#ifdef __sparc__
bufp = __irq_itoa(irqnum);
#else
Index: linux-2.6.14-benh/drivers/usb/core/hcd.h
===================================================================
--- linux-2.6.14-benh.orig/drivers/usb/core/hcd.h 2005-10-31 10:54:44.000000000 +1100
+++ linux-2.6.14-benh/drivers/usb/core/hcd.h 2005-11-05 12:19:11.000000000 +1100
@@ -71,6 +71,10 @@
/*
* hardware info/state
*/
+ unsigned long bitflags; /* various single-bit flags */
+#define HC_FLAG_IRQ_ON 0
+#define HC_FLAG_SUSPEND_RH 1
+
const struct hc_driver *driver; /* hw-specific hooks */
unsigned saw_irq : 1;
unsigned can_wakeup:1; /* hw supports wakeup? */
Index: linux-2.6.14-benh/drivers/usb/host/ehci-hub.c
===================================================================
--- linux-2.6.14-benh.orig/drivers/usb/host/ehci-hub.c 2005-10-31 10:54:44.000000000 +1100
+++ linux-2.6.14-benh/drivers/usb/host/ehci-hub.c 2005-11-05 13:12:39.000000000 +1100
@@ -90,8 +90,12 @@
int i;
int intr_enable;
+ if (test_bit(HC_FLAG_SUSPEND_RH, &hcd->bitflags))
+ return -ESHUTDOWN;
+
if (time_before (jiffies, ehci->next_statechange))
msleep(5);
+
spin_lock_irq (&ehci->lock);
/* re-init operational registers in case we lost power */
@@ -215,7 +219,8 @@
unsigned long flags;
/* if !USB_SUSPEND, root hub timers won't get shut down ... */
- if (!HC_IS_RUNNING(hcd->state))
+ if (!HC_IS_RUNNING(hcd->state) ||
+ test_bit(HC_FLAG_SUSPEND_RH, &hcd->bitflags))
return 0;
/* init status to no-changes */
@@ -313,6 +318,8 @@
unsigned long flags;
int retval = 0;
+ if (test_bit(HC_FLAG_SUSPEND_RH, &hcd->bitflags))
+ return -ESHUTDOWN;
/*
* FIXME: support SetPortFeatures USB_PORT_FEAT_INDICATOR.
* HCS_INDICATOR may say we can change LEDs to off/amber/green.
Index: linux-2.6.14-benh/drivers/usb/host/uhci-hcd.c
===================================================================
--- linux-2.6.14-benh.orig/drivers/usb/host/uhci-hcd.c 2005-10-31 10:54:44.000000000 +1100
+++ linux-2.6.14-benh/drivers/usb/host/uhci-hcd.c 2005-11-06 08:35:39.000000000 +1100
@@ -770,6 +770,12 @@
dev_dbg(uhci_dev(uhci), "%s\n", __FUNCTION__);
+ /* Disable emission of interrupts during suspend */
+ pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP, 0);
+ mb();
+ clear_bit(HC_FLAG_IRQ_ON, &hcd->bitflags);
+ synchronize_irq(dev->irq);
+
spin_lock_irq(&uhci->lock);
if (uhci->hc_inaccessible) /* Dead or already suspended */
goto done;
@@ -787,7 +793,8 @@
};
/* All PCI host controllers are required to disable IRQ generation
- * at the source, so we must turn off PIRQ.
+ * at the source, so we must turn off PIRQ. Already done earlier
+ * but better be safe than sorry...
*/
pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP, 0);
uhci->hc_inaccessible = 1;
^ permalink raw reply
* Re: 2.6.14 USB vs. sleep issues
From: Bin Zhang @ 2005-11-05 21:58 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, debian-powerpc@lists.debian.org
In-Reply-To: <1130999620.4680.28.camel@gaston>
On 11/3/05, Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> For those who experience crashes on sleep and/or wakeup (typically due
> to USB) with 2.6.14, I made a test patch that might help. Please let me
> know if it makes things more reliable.
>
I've tried your patch with usb wifi dlink dwl-g122 (my eth1). It works.
There are some differences in /var/log/syslog :
-----------------------
resume without your patch :
Nov 5 22:39:27 localhost anacron[5244]: Anacron 2.3 started on 2005-11-05
Nov 5 22:39:27 localhost anacron[5244]: Normal exit (0 jobs run)
Nov 5 22:39:27 localhost /usr/sbin/gpm[5268]: oops() invoked from gpn.c(20=
5)
Nov 5 22:39:27 localhost /usr/sbin/gpm[5268]: /var/run/gpm.pid: No
such file or directory
Nov 5 22:39:28 localhost pbbuttonsd: INFO: Script
'/etc/power/pmcs-pbbuttonsd suspend ac ram' launched and exited
normally
Nov 5 22:39:28 localhost kernel: ural 4-1:1.0: resume is unsafe!
Nov 5 22:39:28 localhost kernel: usb 4-1: no poweroff yet, suspending inst=
ead
Nov 5 22:39:28 localhost kernel: failed to set volume
Nov 5 22:39:28 localhost kernel: usb usb4: no poweroff yet, suspending ins=
tead
Nov 5 22:39:28 localhost kernel: usb 1-1: no poweroff yet, suspending inst=
ead
Nov 5 22:39:28 localhost kernel: usb usb3: no poweroff yet, suspending ins=
tead
Nov 5 22:39:28 localhost kernel: usb usb2: no poweroff yet, suspending ins=
tead
Nov 5 22:39:28 localhost kernel: usb usb1: no poweroff yet, suspending ins=
tead
Nov 5 22:39:29 localhost kernel: eth0: suspending, WakeOnLan disabled
Nov 5 22:39:29 localhost kernel: radeonfb (0000:00:10.0): suspending
to state: 2...
Nov 5 22:39:29 localhost kernel: uninorth-agp: disabling AGP on
device 0000:00:10.0
Nov 5 22:39:29 localhost kernel: uninorth-agp: disabling AGP on
bridge 0000:00:0b.0
Nov 5 22:39:29 localhost kernel: radeonfb (0000:00:10.0): resuming
from state: 2...
Nov 5 22:39:29 localhost kernel: PCI: Enabling device 0000:00:10.0
(0000 -> 0003)
Nov 5 22:39:29 localhost kernel: radeon: PAD_CTLR_STRENGTH doesn't stabili=
ze !
Nov 5 22:39:29 localhost kernel: agpgart: Putting AGP V2 device at
0000:00:0b.0 into 4x mode
Nov 5 22:39:29 localhost kernel: agpgart: Putting AGP V2 device at
0000:00:10.0 into 4x mode
Nov 5 22:39:29 localhost kernel: PCI: Enabling device 0001:10:1b.0
(0000 -> 0002)
Nov 5 22:39:29 localhost kernel: PCI: Enabling device 0001:10:1b.1
(0000 -> 0002)
Nov 5 22:39:29 localhost kernel: PCI: Enabling device 0001:10:1b.2
(0000 -> 0002)
Nov 5 22:39:29 localhost kernel: ehci_hcd 0001:10:1b.2: park 0
Nov 5 22:39:29 localhost kernel: ehci_hcd 0001:10:1b.2: USB 2.0
restarted, EHCI 1.00, driver 10 Dec 2004
Nov 5 22:39:31 localhost kernel: eth0: resuming
Nov 5 22:39:31 localhost kernel: PHY ID: 4061e4, addr: 0
Nov 5 22:39:32 localhost kernel: hda: Enabling Ultra DMA 5
Nov 5 22:39:32 localhost kernel: hdc: Enabling MultiWord DMA 2
Nov 5 22:39:32 localhost dhclient: receive_packet failed on eth1:
Network is down
Nov 5 22:39:32 localhost kernel: usb 4-1: USB disconnect, address 3
Nov 5 22:39:32 localhost kernel: usb 4-1: new high speed USB device
using ehci_hcd and address 4
Nov 5 22:39:32 localhost postfix/postfix-script: refreshing the
Postfix mail system
Nov 5 22:39:32 localhost postfix/master[3972]: reload configuration
/etc/postfix
Nov 5 22:39:32 localhost kernel: ural_eeprom_read: 4 -> 00:11:95:87:2c:ad
Nov 5 22:39:32 localhost kernel: eth1: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mb=
ps
Nov 5 22:39:32 localhost kernel: eth1: 11g rates: 1Mbps 2Mbps 5.5Mbps
11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
Nov 5 22:39:32 localhost kernel: eth1: RT2570 (rev 0x03), RF RT2526,
ether 00:11:95:87:2c:ad at usb-0001:10:1b.2-1
Nov 5 22:39:39 localhost kernel: adb: starting probe task...
Nov 5 22:39:39 localhost dhclient: Internet Software Consortium DHCP
Client 2.0pl5
Nov 5 22:39:39 localhost dhclient: Copyright 1995, 1996, 1997, 1998,
1999 The Internet Software Consortium.
Nov 5 22:39:39 localhost dhclient: All rights reserved.
Nov 5 22:39:39 localhost dhclient:
Nov 5 22:39:39 localhost dhclient: Please contribute if you find this
software useful.
Nov 5 22:39:39 localhost dhclient: For info, please visit
http://www.isc.org/dhcp-contrib.html
Nov 5 22:39:39 localhost dhclient:
Nov 5 22:39:39 localhost dhclient: sit0: unknown hardware address type 776
Nov 5 22:39:39 localhost kernel: ural_set_macaddr: 00:11:95:87:2c:ad
Nov 5 22:39:39 localhost kernel: setting MAC address to 00:11:95:87:2c:ad
Nov 5 22:39:39 localhost kernel: leaving promiscuous mode
Nov 5 22:39:39 localhost kernel: ural_set_macaddr: 00:11:95:87:2c:ad
Nov 5 22:39:39 localhost kernel: setting MAC address to 00:11:95:87:2c:ad
Nov 5 22:39:39 localhost kernel: adb devices: [2]: 2 c4 [3]: 3 1 [7]: 7 1f
Nov 5 22:39:39 localhost kernel: ADB keyboard at 2, handler 1
Nov 5 22:39:39 localhost kernel: ADB mouse at 3, handler set to 4 (trackpa=
d)
Nov 5 22:39:39 localhost kernel: adb: finished probe task...
Nov 5 22:39:39 localhost kernel: agpgart: Putting AGP V2 device at
0000:00:0b.0 into 4x mode
Nov 5 22:39:39 localhost kernel: agpgart: Putting AGP V2 device at
0000:00:10.0 into 4x mode
Nov 5 22:39:39 localhost kernel: [drm] Loading R200 Microcode
Nov 5 22:39:39 localhost ifd[5442]: starting
Nov 5 22:39:39 localhost ifd[5442]: executing:
'/usr/share/laptop-net/link-change eth0 managed unknown
up,running,disconnected'
Nov 5 22:39:39 localhost ifd: PID file written: /var/run/ifd.pid
Nov 5 22:39:39 localhost pbbuttonsd: INFO: Script
'/etc/power/pmcs-pbbuttonsd resume ac ram' launched and exited
normally
Nov 5 22:39:39 localhost laptop-net: Stopping network interface "eth0"
Nov 5 22:39:40 localhost dhclient: sit0: unknown hardware address type 776
Nov 5 22:39:40 localhost dhclient: Listening on LPF/eth1/00:11:95:87:2c:ad
Nov 5 22:39:40 localhost dhclient: Sending on LPF/eth1/00:11:95:87:2c:ad
Nov 5 22:39:40 localhost dhclient: Sending on Socket/fallback/fallback-n=
et
Nov 5 22:39:40 localhost dhclient: DHCPREQUEST on eth1 to
255.255.255.255 port 67
Nov 5 22:39:42 localhost kernel: ural_set_macaddr: 00:11:95:87:2c:ad
Nov 5 22:39:42 localhost kernel: setting MAC address to 00:11:95:87:2c:ad
Nov 5 22:39:42 localhost kernel: ural_set_macaddr: 00:11:95:87:2c:ad
Nov 5 22:39:42 localhost kernel: setting MAC address to 00:11:95:87:2c:ad
Nov 5 22:39:42 localhost kernel: ural_set_macaddr: 00:11:95:87:2c:ad
Nov 5 22:39:42 localhost kernel: setting MAC address to 00:11:95:87:2c:ad
Nov 5 22:39:44 localhost dhclient: DHCPREQUEST on eth1 to
255.255.255.255 port 67
Nov 5 22:39:45 localhost kernel: setting BSSID to 00:11:95:36:fc:f7
Nov 5 22:39:45 localhost kernel: enabling TSF synchronization
Nov 5 22:39:49 localhost kernel: eth1: no IPv6 routers present
Nov 5 22:39:53 localhost dhclient: DHCPDISCOVER on eth1 to
255.255.255.255 port 67 interval 5
Nov 5 22:39:53 localhost dhclient: DHCPOFFER from 192.168.0.1
Nov 5 22:39:55 localhost dhclient: DHCPREQUEST on eth1 to
255.255.255.255 port 67
Nov 5 22:39:55 localhost dhclient: DHCPACK from 192.168.0.1
Nov 5 22:39:55 localhost kernel: leaving promiscuous mode
Nov 5 22:39:55 localhost kernel: leaving promiscuous mode
Nov 5 22:39:56 localhost postfix/postfix-script: refreshing the
Postfix mail system
Nov 5 22:39:56 localhost postfix/master[3972]: reload configuration
/etc/postfix
Nov 5 22:39:56 localhost dhclient: bound to 192.168.0.101 -- renewal
in 302400 seconds.
Nov 5 22:39:56 localhost ifd[5442]: + cat:
/var/run/dhclient.eth0.pid: No such file or directory
Nov 5 22:40:08 localhost kernel: eth0: no IPv6 routers present
--------------------------------------
----------------------------------
resume with your patch :
Nov 5 22:28:21 localhost anacron[6603]: Anacron 2.3 started on 2005-11-05
Nov 5 22:28:21 localhost anacron[6603]: Normal exit (0 jobs run)
Nov 5 22:28:21 localhost /usr/sbin/gpm[6627]: oops() invoked from gpn.c(20=
5)
Nov 5 22:28:21 localhost /usr/sbin/gpm[6627]: /var/run/gpm.pid: No
such file or directory
Nov 5 22:28:21 localhost pbbuttonsd: INFO: Script
'/etc/power/pmcs-pbbuttonsd suspend ac ram' launched and exited
normally
Nov 5 22:28:22 localhost kernel: ural 2-1:1.0: resume is unsafe!
Nov 5 22:28:22 localhost kernel: usb 2-1: no poweroff yet, suspending inst=
ead
Nov 5 22:28:22 localhost kernel: failed to set volume
Nov 5 22:28:22 localhost kernel: usb 1-1: no poweroff yet, suspending inst=
ead
Nov 5 22:28:22 localhost kernel: usb usb3: no poweroff yet, suspending ins=
tead
Nov 5 22:28:22 localhost kernel: usb usb2: no poweroff yet, suspending ins=
tead
Nov 5 22:28:22 localhost kernel: usb usb1: no poweroff yet, suspending ins=
tead
Nov 5 22:28:22 localhost kernel: eth0: suspending, WakeOnLan disabled
Nov 5 22:28:22 localhost kernel: radeonfb (0000:00:10.0): suspending
to state: 2...
Nov 5 22:28:22 localhost kernel: uninorth-agp: disabling AGP on
device 0000:00:10.0
Nov 5 22:28:22 localhost kernel: uninorth-agp: disabling AGP on
bridge 0000:00:0b.0
Nov 5 22:28:23 localhost kernel: radeonfb (0000:00:10.0): resuming
from state: 2...
Nov 5 22:28:23 localhost kernel: PCI: Enabling device 0000:00:10.0
(0000 -> 0003)
Nov 5 22:28:23 localhost kernel: radeon: PAD_CTLR_STRENGTH doesn't stabili=
ze !
Nov 5 22:28:23 localhost kernel: agpgart: Putting AGP V2 device at
0000:00:0b.0 into 4x mode
Nov 5 22:28:23 localhost kernel: agpgart: Putting AGP V2 device at
0000:00:10.0 into 4x mode
Nov 5 22:28:23 localhost kernel: PCI: Enabling device 0001:10:1b.0
(0000 -> 0002)
Nov 5 22:28:23 localhost kernel: PCI: Enabling device 0001:10:1b.1
(0000 -> 0002)
Nov 5 22:28:24 localhost kernel: eth0: resuming
Nov 5 22:28:24 localhost kernel: PHY ID: 4061e4, addr: 0
Nov 5 22:28:25 localhost kernel: hda: Enabling Ultra DMA 5
Nov 5 22:28:25 localhost kernel: hdc: Enabling MultiWord DMA 2
Nov 5 22:28:38 localhost kernel: adb: starting probe task...
Nov 5 22:28:38 localhost kernel: adb devices: [2]: 2 c4 [3]: 3 1 [7]: 7 1f
Nov 5 22:28:38 localhost kernel: ADB keyboard at 2, handler 1
Nov 5 22:28:38 localhost kernel: ADB mouse at 3, handler set to 4 (trackpa=
d)
Nov 5 22:28:38 localhost kernel: adb: finished probe task...
Nov 5 22:28:38 localhost kernel: agpgart: Putting AGP V2 device at
0000:00:0b.0 into 4x mode
Nov 5 22:28:38 localhost kernel: agpgart: Putting AGP V2 device at
0000:00:10.0 into 4x mode
Nov 5 22:28:38 localhost kernel: [drm] Loading R200 Microcode
Nov 5 22:28:38 localhost ifd[6680]: starting
Nov 5 22:28:38 localhost ifd[6680]: executing:
'/usr/share/laptop-net/link-change eth0 managed unknown
up,running,disconnected'
Nov 5 22:28:38 localhost ifd: PID file written: /var/run/ifd.pid
Nov 5 22:28:38 localhost pbbuttonsd: INFO: Script
'/etc/power/pmcs-pbbuttonsd resume ac ram' launched and exited
normally
Nov 5 22:28:39 localhost laptop-net: Stopping network interface "eth0"
Nov 5 22:28:39 localhost ifd[6680]: + cat:
/var/run/dhclient.eth0.pid: No such file or directory
Nov 5 22:28:50 localhost kernel: eth0: no IPv6 routers present
-------------------------------------------------------------------
Thanks,
Bin
> http://gate.crashing.org/~benh/fix-ohci-sleep.diff
>
> Note that the patch is totally untested here so it may be just plain
> bogus :)
>
> Ben.
>
>
>
> --
> To UNSUBSCRIBE, email to debian-powerpc-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian=
.org
>
>
^ permalink raw reply
* [PATCH] ppc32 8xx: m8xx_pcmcia_set_iomap() must support MAP_AUTOSZ
From: Marcelo Tosatti @ 2005-11-05 15:07 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linux-ppc-embedded
From: Vitaly Bordug <vbordug@ru.mvista.com>
This fixes misconfiguration that could result in odd work of some old CF
cards.
Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
diff --git a/drivers/pcmcia/m8xx_pcmcia.c b/drivers/pcmcia/m8xx_pcmcia.c
--- a/drivers/pcmcia/m8xx_pcmcia.c
+++ b/drivers/pcmcia/m8xx_pcmcia.c
@@ -1041,8 +1041,7 @@ static int m8xx_set_io_map(struct pcmcia
if(io->flags & MAP_WRPROT)
reg |= M8XX_PCMCIA_POR_WRPROT;
- /*if(io->flags & (MAP_16BIT | MAP_AUTOSZ))*/
- if(io->flags & MAP_16BIT)
+ if(io->flags & (MAP_16BIT | MAP_AUTOSZ))
reg |= M8XX_PCMCIA_POR_16BIT;
if(io->flags & MAP_ACTIVE)
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox