* Re: [PATCH 2.6.14] ppc32: Allow for bigger compressed kernels
From: Tom Rini @ 2005-11-05 17:50 UTC (permalink / raw)
To: Andrew Morton; +Cc: linuxppc-dev
In-Reply-To: <20051104211605.2ccffef5.akpm@osdl.org>
On Fri, Nov 04, 2005 at 09:16:05PM -0800, Andrew Morton wrote:
> Tom Rini <trini@kernel.crashing.org> wrote:
> >
> > The ppc (not ppc64) boot loader (zimage wrapper) has a hard coded limit of
> > 4 MB on the size of an uncompressed kernel it can boot. The boot loader has
> > been changed to dynamically determine the largest possible kernel and
> > support it. Relocating the boot loader to a higher address (currently
> > located at 8 MB) will provide additional room.
> >
>
> I'm getting an unpleasant reject here from Matt's
> ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot.patch. In
> decompress_kernel he has added this ifdef:
>
> @@ -164,7 +172,9 @@ decompress_kernel(unsigned long load_add
> puts(" "); puthex((unsigned long)(&__ramdisk_end));puts("\n");
> }
>
> +#ifndef CONFIG_40x /* don't overwrite the 40x image located at 0x00400000! */
> avail_ram = (char *)0x00400000;
> +#endif
> end_avail = (char *)0x00800000;
> puts("avail ram: "); puthex((unsigned long)avail_ram); puts(" ");
> puthex((unsigned long)end_avail); puts("\n");
>
>
> Which would appear to leave avail_ram at zero on CONFIG_40x. There's no
> mention in the changelog that this was the intent, so I dunno what's going
> on.
It's very confusing code, I'll agree, and it's not helped by a
long-missing cleanup. Going back to
http://linux.bkbits.net:8080/linux-2.6/diffs/arch/ppc/boot/simple/misc.c@1.3?nav=index.html|src/|src/arch/ppc/boot/simple/|hist/arch/ppc/boot/simple/misc.c
we got to the point of doing:
avail_ram = good aligned end of images value;
... do nothing to or with avail_ram ...
avail_ram = 4MB;
What Mark's patch does is get us to use and aligned value again. So if
I read everything right we should just be able to drop that hunk of
Matt's patch as we really won't be overwriting anyones image. If you
throw out an interm tree somewhere hopefully Matt can do a quick boot
test on some 4xx board (I unfortunaly don't have one).
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply
* [PATCH] Fix i8259 cascade IRQ
From: David Woodhouse @ 2005-11-05 17:54 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
setup_irq() aborts immediately if there's no handler for the IRQ in
question. So i8259_init() should set up its handlers before trying to
set up the cascade on IRQ 2.
With this and the patch I sent a few days ago to fix initrd on ppc32, my
Pegasos now runs the arch/powerpc kernel.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
diff --git a/arch/powerpc/sysdev/i8259.c b/arch/powerpc/sysdev/i8259.c
index 90bce6e..b7ac32f 100644
--- a/arch/powerpc/sysdev/i8259.c
+++ b/arch/powerpc/sysdev/i8259.c
@@ -207,6 +207,9 @@ void __init i8259_init(unsigned long int
spin_unlock_irqrestore(&i8259_lock, flags);
+ for (i = 0; i < NUM_ISA_INTERRUPTS; ++i)
+ irq_desc[offset + i].handler = &i8259_pic;
+
/* reserve our resources */
setup_irq(offset + 2, &i8259_irqaction);
request_resource(&ioport_resource, &pic1_iores);
@@ -216,6 +219,4 @@ void __init i8259_init(unsigned long int
if (intack_addr != 0)
pci_intack = ioremap(intack_addr, 1);
- for (i = 0; i < NUM_ISA_INTERRUPTS; ++i)
- irq_desc[offset + i].handler = &i8259_pic;
}
--
dwmw2
^ permalink raw reply related
* Re: [PATCH 2.6.14] ppc32: Allow for bigger compressed kernels
From: Andrew Morton @ 2005-11-05 17:56 UTC (permalink / raw)
To: Tom Rini; +Cc: linuxppc-dev
In-Reply-To: <20051105175020.GZ3839@smtp.west.cox.net>
Tom Rini <trini@kernel.crashing.org> wrote:
>
> If you
> throw out an interm tree somewhere hopefully Matt can do a quick boot
> test on some 4xx board (I unfortunaly don't have one).
OK. I hope to have -mm1 out this weekend. An interim tree at present
probably won't even vaguely compile. Sigh.
^ permalink raw reply
* MPC5200 I2S driver
From: Frank Bennett @ 2005-11-05 19:22 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 662 bytes --]
Hi Hans, Eric:
I would be interested in getting any driver code
examples for Bestcomm/PSC6/CODEC for the mpc5200
as well.
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?
Thanks to you guys and Wolfgang for you contributions
to this thread discussion.
*/Frank Bennett
President
/*Mathegraphics,LLC
613 Bentley Pl
Fort Collins,CO 80526
www.mathegraphics.com <http://www.mathegraphics.com>
bennett78@digis.net <mailto:bennett78@digis.net>
[-- Attachment #2: Type: text/html, Size: 1145 bytes --]
^ permalink raw reply
* [PATCH] ppc32 8xx: fix m8xx_wdt acessor macro update
From: Marcelo Tosatti @ 2005-11-05 15:01 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linux-ppc-embedded
Paul,
The following patch against m8xx_wdt.c adds <asm/io.h> (required for
out,in_be32/16) and fixes syntatic problems introduced with the IO
accessor macro update.
Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
--- ../git/linux-2.6/arch/ppc/syslib/m8xx_wdt.c 2005-11-01 07:58:12.000000000 -0600
+++ linux-2.6-git-wednov02/arch/ppc/syslib/m8xx_wdt.c 2005-11-05 13:14:53.545580928 -0600
@@ -14,6 +14,7 @@
#include <linux/irq.h>
#include <linux/kernel.h>
#include <linux/sched.h>
+#include <asm/io.h>
#include <asm/8xx_immap.h>
#include <syslib/m8xx_wdt.h>
@@ -29,8 +30,8 @@
{
volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR;
- out_be16(imap->im_siu_conf.sc_swsr, 0x556c); /* write magic1 */
- out_be16(imap->im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */
+ out_be16(&imap->im_siu_conf.sc_swsr, 0x556c); /* write magic1 */
+ out_be16(&imap->im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */
}
static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev, struct pt_regs *regs)
@@ -39,7 +40,7 @@
m8xx_wdt_reset();
- out_be16(imap->im_sit.sit_piscr, in_be16(imap->im_sit.sit_piscr | PISCR_PS)); /* clear irq */
+ out_be16(&imap->im_sit.sit_piscr, in_be16(&imap->im_sit.sit_piscr) | PISCR_PS); /* clear irq */
return IRQ_HANDLED;
}
@@ -51,7 +52,7 @@
u32 sypcr;
u32 pitrtclk;
- sypcr = in_be32(imap->im_siu_conf.sc_sypcr);
+ sypcr = in_be32(&imap->im_siu_conf.sc_sypcr);
if (!(sypcr & 0x04)) {
printk(KERN_NOTICE "m8xx_wdt: wdt disabled (SYPCR: 0x%08X)\n",
@@ -87,9 +88,9 @@
else
pitc = pitrtclk * wdt_timeout / binfo->bi_intfreq / 2;
- out_be32(imap->im_sit.sit_pitc, pitc << 16);
+ out_be32(&imap->im_sit.sit_pitc, pitc << 16);
- out_be16(imap->im_sit.sit_piscr, (mk_int_int_mask(PIT_INTERRUPT) << 8) | PISCR_PIE | PISCR_PTE);
+ out_be16(&imap->im_sit.sit_piscr, (mk_int_int_mask(PIT_INTERRUPT) << 8) | PISCR_PIE | PISCR_PTE);
if (setup_irq(PIT_INTERRUPT, &m8xx_wdt_irqaction))
panic("m8xx_wdt: error setting up the watchdog irq!");
^ permalink raw reply
* [PATCH] ppc32 8xx: MPC8xx PCMCIA update
From: Marcelo Tosatti @ 2005-11-05 15:03 UTC (permalink / raw)
To: Paul Mackerras; +Cc: Dominik Brodowski, linux-ppc-embedded
Hi Paul,
The following patch updates the MPC8xx PCMCIA driver:
- Kconfig entry: dependency on 8xx
- Makefile: fix whitespace breakage
- m8xx_pcmcia.c:
- asm/segment.h is gone
- use generic PCMCIA suspend/resume methods
Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
diff -u ../git/linux-2.6/drivers/pcmcia/Kconfig linux-2.6-git-wednov02/drivers/pcmcia/Kconfig
--- ../git/linux-2.6/drivers/pcmcia/Kconfig 2005-11-01 07:58:24.000000000 -0600
+++ linux-2.6-git-wednov02/drivers/pcmcia/Kconfig 2005-11-03 05:52:05.000000000 -0600
@@ -156,7 +156,7 @@
config PCMCIA_M8XX
tristate "MPC8xx PCMCIA support"
- depends on PCMCIA && PPC
+ depends on PCMCIA && PPC && 8xx
select PCCARD_NONSTATIC
help
Say Y here to include support for PowerPC 8xx series PCMCIA
diff -u ../git/linux-2.6/drivers/pcmcia/Makefile linux-2.6-git-wednov02/drivers/pcmcia/Makefile
--- ../git/linux-2.6/drivers/pcmcia/Makefile 2005-11-01 07:58:24.000000000 -0600
+++ linux-2.6-git-wednov02/drivers/pcmcia/Makefile 2005-11-03 05:50:16.000000000 -0600
@@ -25,7 +25,7 @@
obj-$(CONFIG_I82365) += i82365.o
obj-$(CONFIG_I82092) += i82092.o
obj-$(CONFIG_TCIC) += tcic.o
-obj-$(CONFIG_PCMCIA_M8XX) += m8xx_pcmcia.o
+obj-$(CONFIG_PCMCIA_M8XX) += m8xx_pcmcia.o
obj-$(CONFIG_HD64465_PCMCIA) += hd64465_ss.o
obj-$(CONFIG_PCMCIA_SA1100) += sa11xx_core.o sa1100_cs.o
obj-$(CONFIG_PCMCIA_SA1111) += sa11xx_core.o sa1111_cs.o
@@ -47,10 +47,10 @@
au1x00_ss-$(CONFIG_MIPS_PB1500) += au1000_pb1x00.o
au1x00_ss-$(CONFIG_MIPS_DB1000) += au1000_db1x00.o
au1x00_ss-$(CONFIG_MIPS_DB1100) += au1000_db1x00.o
-au1x00_ss-$(CONFIG_MIPS_DB1200) += au1000_db1x00.o
+au1x00_ss-$(CONFIG_MIPS_DB1200) += au1000_db1x00.o
au1x00_ss-$(CONFIG_MIPS_DB1500) += au1000_db1x00.o
au1x00_ss-$(CONFIG_MIPS_DB1550) += au1000_db1x00.o
-au1x00_ss-$(CONFIG_MIPS_XXS1500) += au1000_xxs1500.o
+au1x00_ss-$(CONFIG_MIPS_XXS1500) += au1000_xxs1500.o
sa1111_cs-y += sa1111_generic.o
sa1111_cs-$(CONFIG_ASSABET_NEPONSET) += sa1100_neponset.o
diff -u ../git/linux-2.6/drivers/pcmcia/m8xx_pcmcia.c linux-2.6-git-wednov02/drivers/pcmcia/m8xx_pcmcia.c
--- ../git/linux-2.6/drivers/pcmcia/m8xx_pcmcia.c 2005-11-01 07:58:24.000000000 -0600
+++ linux-2.6-git-wednov02/drivers/pcmcia/m8xx_pcmcia.c 2005-11-03 05:47:57.000000000 -0600
@@ -39,7 +39,6 @@
#include <asm/io.h>
#include <asm/bitops.h>
-#include <asm/segment.h>
#include <asm/system.h>
#include <linux/kernel.h>
@@ -50,6 +49,7 @@
#include <linux/ioport.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
+#include <linux/platform_device.h>
#include <asm/mpc8xx.h>
#include <asm/8xx_immap.h>
@@ -546,29 +546,11 @@
free_irq(pcmcia_schlvl, NULL);
}
-/* copied from tcic.c */
-
-static int m8xx_drv_suspend(struct device *dev, pm_message_t state, u32 level)
-{
- int ret = 0;
- if (level == SUSPEND_SAVE_STATE)
- ret = pcmcia_socket_dev_suspend(dev, state);
- return ret;
-}
-
-static int m8xx_drv_resume(struct device *dev, u32 level)
-{
- int ret = 0;
- if (level == RESUME_RESTORE_STATE)
- ret = pcmcia_socket_dev_resume(dev);
- return ret;
-}
-
static struct device_driver m8xx_driver = {
.name = "m8xx-pcmcia",
.bus = &platform_bus_type,
- .suspend = m8xx_drv_suspend,
- .resume = m8xx_drv_resume,
+ .suspend = pcmcia_socket_dev_suspend,
+ .resume = pcmcia_socket_dev_resume,
};
static struct platform_device m8xx_device = {
^ 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
* 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
* 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
* [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
* [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
* 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
* 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
* 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
* 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
* 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
* 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
* [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
* [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 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 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
* 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
* 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
* 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: 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
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