Here is the big USB merge for your 2.6.31-git tree.
Lots of usb stuff all over the map here. For details see the
shortlog below.
Please pull from:
master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6.git/
All of these patches have been in the -next and -mm trees for quite
a while.
The full patches will be sent to the linux-usb mailing list, if anyone
wants to see them.
thanks,
greg k-h
------------
Documentation/kernel-parameters.txt | 2 +-
Documentation/usb/authorization.txt | 10 +-
Documentation/usb/usbmon.txt | 8 +-
Documentation/x86/earlyprintk.txt | 39 +-
MAINTAINERS | 4 +-
arch/x86/kernel/early_printk.c | 780 +---------
drivers/net/usb/cdc_eem.c | 17 +-
drivers/usb/Kconfig | 3 +
drivers/usb/Makefile | 2 +
drivers/usb/class/cdc-acm.c | 2 +
drivers/usb/class/cdc-wdm.c | 30 +-
drivers/usb/class/usbtmc.c | 84 +-
drivers/usb/core/config.c | 2 +-
drivers/usb/core/devio.c | 247 +++-
drivers/usb/core/driver.c | 75 +-
drivers/usb/core/generic.c | 4 +-
drivers/usb/core/hcd.c | 113 +-
drivers/usb/core/hcd.h | 5 +
drivers/usb/core/hub.c | 126 ++-
drivers/usb/core/message.c | 32 +-
drivers/usb/core/usb.c | 13 +-
drivers/usb/core/usb.h | 7 +
drivers/usb/early/Makefile | 5 +
drivers/usb/early/ehci-dbgp.c | 996 ++++++++++++
drivers/usb/gadget/Kconfig | 31 +-
drivers/usb/gadget/amd5536udc.c | 56 +-
drivers/usb/gadget/at91_udc.c | 1 -
drivers/usb/gadget/audio.c | 24 +-
drivers/usb/gadget/composite.c | 2 +-
drivers/usb/gadget/dummy_hcd.c | 5 -
drivers/usb/gadget/ether.c | 31 +-
drivers/usb/gadget/f_audio.c | 97 +-
drivers/usb/gadget/f_eem.c | 562 +++++++
drivers/usb/gadget/f_rndis.c | 15 +-
drivers/usb/gadget/fsl_qe_udc.c | 4 +
drivers/usb/gadget/gmidi.c | 8 +-
drivers/usb/gadget/pxa25x_udc.c | 49 +-
drivers/usb/gadget/pxa25x_udc.h | 1 +
drivers/usb/gadget/rndis.c | 13 +-
drivers/usb/gadget/rndis.h | 3 +-
drivers/usb/gadget/s3c-hsotg.c | 6 +-
drivers/usb/gadget/s3c2410_udc.c | 3 +-
drivers/usb/gadget/u_audio.c | 10 +-
drivers/usb/gadget/u_ether.c | 85 +-
drivers/usb/gadget/u_ether.h | 12 +-
drivers/usb/gadget/u_serial.c | 1 -
drivers/usb/host/Kconfig | 18 +
drivers/usb/host/Makefile | 1 +
drivers/usb/host/ehci-atmel.c | 230 +++
drivers/usb/host/ehci-au1xxx.c | 29 +-
drivers/usb/host/ehci-dbg.c | 46 +-
drivers/usb/host/ehci-hcd.c | 89 +-
drivers/usb/host/ehci-hub.c | 84 +-
drivers/usb/host/ehci-mem.c | 26 +-
drivers/usb/host/ehci-pci.c | 42 +-
drivers/usb/host/ehci-q.c | 95 +-
drivers/usb/host/ehci-sched.c | 100 +-
drivers/usb/host/ehci-w90x900.c | 181 +++
drivers/usb/host/ehci.h | 14 +-
drivers/usb/host/isp1362-hcd.c | 2909 +++++++++++++++++++++++++++++++++++
drivers/usb/host/isp1362.h | 1079 +++++++++++++
drivers/usb/host/isp1760-hcd.c | 4 +
drivers/usb/host/isp1760-hcd.h | 2 +
drivers/usb/host/isp1760-if.c | 21 +-
drivers/usb/host/ohci-at91.c | 2 +-
drivers/usb/host/ohci-au1xxx.c | 27 +-
drivers/usb/host/ohci-ep93xx.c | 1 -
drivers/usb/host/ohci-hcd.c | 1 -
drivers/usb/host/ohci-pxa27x.c | 4 +
drivers/usb/host/oxu210hp-hcd.c | 1 -
drivers/usb/host/pci-quirks.c | 2 +-
drivers/usb/host/sl811-hcd.c | 8 +-
drivers/usb/host/uhci-q.c | 1 -
drivers/usb/host/whci/asl.c | 12 +-
drivers/usb/host/whci/hcd.c | 8 +-
drivers/usb/host/whci/pzl.c | 12 +-
drivers/usb/host/whci/qset.c | 4 +-
drivers/usb/host/whci/whci-hc.h | 1 +
drivers/usb/host/xhci-dbg.c | 5 +-
drivers/usb/host/xhci-hcd.c | 530 ++++++--
drivers/usb/host/xhci-mem.c | 140 ++-
drivers/usb/host/xhci-pci.c | 16 +
drivers/usb/host/xhci-ring.c | 377 ++++-
drivers/usb/host/xhci.h | 111 ++-
drivers/usb/image/microtek.c | 37 -
drivers/usb/misc/idmouse.c | 21 +
drivers/usb/misc/ldusb.c | 6 +
drivers/usb/misc/legousbtower.c | 6 +
drivers/usb/misc/sisusbvga/sisusb.c | 53 +-
drivers/usb/misc/sisusbvga/sisusb.h | 2 -
drivers/usb/misc/usbsevseg.c | 69 +-
drivers/usb/mon/Kconfig | 4 +-
drivers/usb/mon/Makefile | 2 +-
drivers/usb/mon/mon_bin.c | 12 +-
drivers/usb/mon/mon_dma.c | 95 --
drivers/usb/mon/mon_main.c | 1 -
drivers/usb/mon/mon_text.c | 14 -
drivers/usb/mon/usb_mon.h | 14 -
drivers/usb/musb/musb_core.c | 8 +-
drivers/usb/otg/isp1301_omap.c | 23 +-
drivers/usb/serial/ark3116.c | 24 +-
drivers/usb/serial/ch341.c | 52 +
drivers/usb/serial/ftdi_sio.c | 7 +
drivers/usb/serial/ftdi_sio.h | 10 +
drivers/usb/serial/generic.c | 206 ++-
drivers/usb/serial/iuu_phoenix.c | 115 ++-
drivers/usb/serial/moto_modem.c | 2 +-
drivers/usb/serial/option.c | 138 ++-
drivers/usb/serial/pl2303.c | 71 +-
drivers/usb/serial/pl2303.h | 4 +
drivers/usb/serial/sierra.c | 157 ++-
drivers/usb/serial/usb-serial.c | 23 +-
drivers/usb/storage/datafab.c | 4 +-
drivers/usb/storage/initializers.c | 2 +-
drivers/usb/storage/jumpshot.c | 2 +-
drivers/usb/storage/onetouch.c | 2 +-
drivers/usb/storage/unusual_devs.h | 22 +-
drivers/usb/usb-skeleton.c | 252 +++-
include/linux/usb.h | 25 +-
include/linux/usb/audio.h | 287 ++--
include/linux/usb/ch9.h | 8 +
include/linux/usb/ehci_def.h | 35 +
include/linux/usb/isp1362.h | 46 +
include/linux/usb/isp1760.h | 18 +
include/linux/usb/serial.h | 2 +
include/linux/usbdevice_fs.h | 3 +
126 files changed, 9604 insertions(+), 2138 deletions(-)
create mode 100644 drivers/usb/early/Makefile
create mode 100644 drivers/usb/early/ehci-dbgp.c
create mode 100644 drivers/usb/gadget/f_eem.c
create mode 100644 drivers/usb/host/ehci-atmel.c
create mode 100644 drivers/usb/host/ehci-w90x900.c
create mode 100644 drivers/usb/host/isp1362-hcd.c
create mode 100644 drivers/usb/host/isp1362.h
delete mode 100644 drivers/usb/mon/mon_dma.c
create mode 100644 include/linux/usb/isp1362.h
create mode 100644 include/linux/usb/isp1760.h
---------------
Ajay Kumar Gupta (1):
USB: musb: fix put_device() call sequence
Alan Stern (10):
USB: add API for userspace drivers to "claim" ports
USB: make intf.pm_usage an atomic_t
USB: make the "usbfs_snoop" log more pertinent
USB: check for hub driver not bound to root hub device
USB: don't lose mode switch events on suspended devices
USB: dummy-hcd: accept mismatch between wLength and transfer length
USB: s3c2410: unregister should call unbind, not disconnect
USB: EHCI: rescan the queue after an unlink
USB: EHCI: change deschedule logic for interrupt QHs
USB: usbfs: add USBDEVFS_URB_BULK_CONTINUATION flag
Alek Du (3):
USB: EHCI: add need_io_watchdog flag to ehci_hcd
USB: EHCI: split ehci_qh into hw and sw parts
USB: EHCI: Add Intel Moorestown EHCI controller HOSTPCx extensions and support phy low power mode
Anand Gadiyar (2):
USB: EHCI: OHCI: Remove unnecessary includes of reboot.h
USB: OMAP: ISP1301: Compile fix
Anton Vorontsov (1):
USB: fsl_qe_udc: Add fsl,mpc8323-qe-usb compatible entry
Aric Blumer (1):
USB: ohci-pxa27x: Allow NOCP and OCPM to be cleared
Bob Liu (1):
USB: uhci: rm repeatedly evaluation for urbp->qh
Brian Niebuhr (2):
USB: Fix CDC EEM host driver 'sentinel' CRC validation
USB: gadget: Add EEM gadget driver
David VomLehn (1):
USB: use kfifo to buffer usb-generic serial writes
David Vrabel (1):
USB: whci-hcd: make endpoint_reset method async
David Woodhouse (1):
USB: Work around BIOS bugs by quiescing USB controllers earlier
Figo.zhang (1):
USB: ehci-dbg.c: no need for checking it before call vfree
Frank Schaefer (3):
USB-serial: pl2303: fix baud rate handling in case of unsupported values
USB-serial: pl2303: add space/mark parity
USB-serial: pl2303: use 1.5 instead of 2 stop bits with 5 data bits
George Spelvin (1):
USB: Clean up root hub string descriptors
Gergely Imreh (1):
USB: fix USBTMC get_capabilities success handling
Greg Kroah-Hartman (1):
USB: skeleton: fix coding style issues.
Guus Sliepen (1):
USB: usbtmc: sanity checks for DEV_DEP_MSG_IN urbs
H Hartley Sweeten (1):
USB: ohci-ep93xx.c: remove unused variable
Hennerich, Michael (1):
USB: sl811-hcd: Fix device disconnect:
Huzaifa Sidhpurwala (1):
USB: option.c Add support for ZTE AC2726 EVDO modem
Jason Wessel (11):
USB: ehci,dbgp,early_printk: split ehci debug driver from early_printk.c
USB: dbgp: insert cr prior to nl as needed
USB: ehci-dbgp: Execute early BIOS hand off
USB: dbgp: EHCI debug controller initialization delays
early_printk: Allow more than one early console
USB: ehci-dbgp: stability improvements and external re-init
USB: ehci-dbgp,ehci: Allow early or late use of the dbgp device
USB: ehci-dbgp: errata for EHCI debug controller initialization
USB: ehci-dbgp: errata for EHCI debug/host controller synchronization
USB: ehci-dbgp,documentation: Documentation updates for ehci-dbgp
USB: ehci-dbgp,ehci: Allow dbpg to work with suspend/resume
Jean Delvare (1):
USB: Fix sysfs paths in documentation
Jiri Slaby (2):
USB: usb-serial, remove unused variables
USB: make usb_buffer_map_sg consistent with doc
Jon Hunter (1):
USB: EHCI: ensure all watchdog timer events are deleted when suspending usb
Julia Lawall (3):
USB: gadget: Drop NULL test on list_entry result
USB: storage: Drop an unneeded a NULL test
USB: isp1362: Correct use of ! and &
Ken MacLeod (1):
USB: isp1362: fix pulldown register defines and conf logic
Laurent Pinchart (4):
USB: Move endpoint sync type definitions from usb/audio.h to usb/ch9.h
USB: Move vendor subclass definition from usb/audio.h to usb/ch9.h
USB audio gadget: Prefix all macro definitions with UAC_ in linux/usb/audio.h
USB audio gadget: Un-inline generic_[gs]et_cmd
Li Yang (1):
USB: gadget: Update Freescale UDC entry in MAINTAINERS
Lothar Wassmann (1):
USB: NXP ISP1362 USB host driver
Manuel Lauss (2):
USB: option: TELIT UC864G support
USB: au1xxx: add dev_pm_ops
Markus Rechberger (1):
USB: increase usbdevfs max isoc buffer size
Maxin John (1):
USB: serial: Spelling correction in Motorola USB Phone driver
Michael Hennerich (2):
USB: serial: ftdi: handle gnICE+ JTAG adaptors
USB: isp1760: allow platform devices to customize devflags
Michael S. Tsirkin (1):
USB: audio: guard kernel-only code with __KERNEL__
Ming Lei (1):
USB: otg: twl4030-usb.c: mark .init as subsys_initcall_sync
Nicolas Ferre (3):
USB: at91: Add USB EHCI driver for at91sam9g45 series
USB: at91: Add USB gadget driver selection for at91sam9g45 series
USB: at91: modify OHCI driver to allow shared interrupts
Oliver Neukum (17):
USB: storage: fix a resume path GFP_NOIO must be used
USB: CDC WDM driver doesn't support non-blocking reads
USB: fix cdc-acm regression in open
USB: serial: full autosuspend support for the option driver
USB: usbtmc can do IO to device after disconnect
USB: suspend/resume support for usbtmc
USB: legousbtower: make poll notice disconnect
USB: ldusb should signal an error in poll if the device is disconnected
USB: full power management support for the idmouse driver
USB: full autosuspend and power management support for usbsevseg
USB: fix wrong order of events in usb serial suspension
USB: remove unneeded printks from microtek driver
USB: support for autosuspend in sierra while online
USB: fix missing error check in probing
USB: skel_read really sucks royally
USB: make usb-skeleton honor O_NONBLOCK in write path
USB: O_NONBLOCK in read path of skeleton
Olivier Bornet (5):
USB: iuu_phoenix: Don't reset the device at close
USB: iuu_phoenix: clean-up parameter's descriptions
USB: iuu_phoenix: add support for changing VCC
USB: iuu_phoenix: increment version number
USB: iuu_phoenix: add a way to select the default VCC
Ondrej Zary (1):
USB: ark3116: add IrDA support for Gembird UIR-22
Pawel Ludwikow (2):
USB: serial: ftdi_sio: new hardware support - hameg power supply
USB: serial: pl2303: new hardware support - sanwa multimeter
Pete Zaitcev (6):
USB: sisusbvga: drop usb_buffer_alloc
USB: usbmon: drop Kconfig defaults
USB: usbmon: touch up the documentation
USB: usbmon: end ugly tricks with DMA peeking
USB: Let usb_sg_init to set transfer_buffer more often
USB: unusual_devs.h: drop some unneeded floppy entries
Philipp Zabel (1):
USB: gadget: pxa25x: basic transceiver support
Randy Dunlap (3):
USB: usbtmc: fix printk format warnings
USB: otg: fix twl4030-usb build
USB: gadget: ether needs to select CRC32
Robin Callender (1):
USB: gadget: audio driver seg-fault fix
Roel Kluin (4):
USB: gadget: s3c-hsotg: missing parentheses
USB: gadget: Read buffer overflow
USB: double put_tty_driver(gs_tty_driver) in gserial_setup()
USB: gadget: double free_irq() in at91udc_probe()
Rog?rio Brito (1):
USB: fix paths in usbmon documentation
Sarah Sharp (23):
USB: xhci: Work around for chain bit in link TRBs.
USB: xhci: Fix slot and endpoint context debugging.
USB: xhci: Configure endpoint code refactoring.
USB: xhci: Set correct max packet size for HS/FS control endpoints.
USB: xhci: Support full speed devices.
USB: xhci: Handle stalled control endpoints.
USB: xhci: Add quirk for Fresco Logic xHCI hardware.
USB: xhci: Make TRB completion code comparison readable.
USB: xhci: Handle babbling endpoints correctly.
USB: xhci: Don't touch xhci_td after it's freed.
USB: xhci: Check URB's actual transfer buffer size.
USB: xhci: Check URB_SHORT_NOT_OK before setting short packet status.
USB: xhci: Set -EREMOTEIO when xHC gives bad transfer length.
USB: xhci: Support interrupt transfers.
USB: Fix SS endpoint companion descriptor parsing.
USB: xhci: Endpoint representation refactoring.
USB: xhci: Refactor input device context setup.
USB: xhci: Change how xHCI commands are handled.
USB: xhci: Fix command wait list handling.
USB: xhci: Set route string for all devices.
USB: xhci: Set multi-TT field for LS/FS devices under hubs.
USB: xhci: Support USB hubs.
USB: Add hub descriptor update hook for xHCI
Steve Holland (3):
USB: usbtmc: Fix short reads in usbtmc_read()
USB: usbtmc: inhibit corruption
USB: usbtmc: correct termination condition for reads.
Tim Small (1):
USb: Break support for WinChipHead CH341 340 USB->Serial "chip"
Wan ZongShun (1):
USB: Add nuvoton Ehci driver for w90p910 platform
fangxiaozhi (1):
USB: usb-storage fails to attach to Huawei Datacard cdrom device
[email protected] (1):
USB: add PIDs for FTDI based OpenDCC hardware
> USB: support for autosuspend in sierra while online
FYI, -tip testing found a build failure with the sierra driver on
!CONFIG_PM - fixed via the patch below.
Thanks,
Ingo
-------------------->
>From 26f8ed899041199caa9315e057a28d10f81b5b88 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <[email protected]>
Date: Wed, 23 Sep 2009 19:19:47 +0200
Subject: [PATCH] USB sierra: Fix build if !CONFIG_PM
This build failure:
drivers/usb/serial/sierra.c: In function 'sierra_suspend':
drivers/usb/serial/sierra.c:936: error: 'struct usb_device' has no member named 'auto_pm'
Triggers because the ->auto_pm functionality depends on CONFIG_PM.
Signed-off-by: Ingo Molnar <[email protected]>
---
drivers/usb/serial/sierra.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index 68fa0e4..b089a70 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -912,6 +912,8 @@ static void sierra_release(struct usb_serial *serial)
}
}
+#ifdef CONFIG_PM
+
static void stop_read_write_urbs(struct usb_serial *serial)
{
int i, j;
@@ -989,6 +991,8 @@ static int sierra_resume(struct usb_serial *serial)
return ec ? -EIO : 0;
}
+#endif /* CONFIG_PM */
+
static struct usb_serial_driver sierra_device = {
.driver = {
.owner = THIS_MODULE,
@@ -1009,8 +1013,10 @@ static struct usb_serial_driver sierra_device = {
.tiocmset = sierra_tiocmset,
.attach = sierra_startup,
.release = sierra_release,
+#ifdef CONFIG_PM
.suspend = sierra_suspend,
.resume = sierra_resume,
+#endif
.read_int_callback = sierra_instat_callback,
};
Ingo Molnar wrote:
>> USB: support for autosuspend in sierra while online
>
> FYI, -tip testing found a build failure with the sierra driver on
> !CONFIG_PM - fixed via the patch below.
>
> Thanks,
>
> Ingo
>
> -------------------->
> From 26f8ed899041199caa9315e057a28d10f81b5b88 Mon Sep 17 00:00:00 2001
> From: Ingo Molnar <[email protected]>
> Date: Wed, 23 Sep 2009 19:19:47 +0200
> Subject: [PATCH] USB sierra: Fix build if !CONFIG_PM
>
> This build failure:
>
> drivers/usb/serial/sierra.c: In function 'sierra_suspend':
> drivers/usb/serial/sierra.c:936: error: 'struct usb_device' has no member named 'auto_pm'
>
> Triggers because the ->auto_pm functionality depends on CONFIG_PM.
>
> Signed-off-by: Ingo Molnar <[email protected]>
Ack.
http://marc.info/?l=linux-usb&m=125305135600816&w=2
lossy. :(
> ---
> drivers/usb/serial/sierra.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
> index 68fa0e4..b089a70 100644
> --- a/drivers/usb/serial/sierra.c
> +++ b/drivers/usb/serial/sierra.c
> @@ -912,6 +912,8 @@ static void sierra_release(struct usb_serial *serial)
> }
> }
>
> +#ifdef CONFIG_PM
> +
> static void stop_read_write_urbs(struct usb_serial *serial)
> {
> int i, j;
> @@ -989,6 +991,8 @@ static int sierra_resume(struct usb_serial *serial)
> return ec ? -EIO : 0;
> }
>
> +#endif /* CONFIG_PM */
> +
> static struct usb_serial_driver sierra_device = {
> .driver = {
> .owner = THIS_MODULE,
> @@ -1009,8 +1013,10 @@ static struct usb_serial_driver sierra_device = {
> .tiocmset = sierra_tiocmset,
> .attach = sierra_startup,
> .release = sierra_release,
> +#ifdef CONFIG_PM
> .suspend = sierra_suspend,
> .resume = sierra_resume,
> +#endif
> .read_int_callback = sierra_instat_callback,
> };
>
> --
On Wed, Sep 23, 2009 at 07:24:56PM +0200, Ingo Molnar wrote:
>
> > USB: support for autosuspend in sierra while online
>
> FYI, -tip testing found a build failure with the sierra driver on
> !CONFIG_PM - fixed via the patch below.
>
Thanks, I'll queue this up when I get back from the Plumbers conference
this week.
greg k-h
> early_printk: Allow more than one early console
this patch broke things pretty badly on x86, with pretty much any
config, as long as the early console is used - which most of my
test-systems do :-(
I'm getting an early boot hard lockup, which is due to an infinite
stream of:
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
[ 0.000000] BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
[ 0.000000] BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
[ 0.000000] BIOS-e820: 0000000000100000 - 000000003fff0000 (usable)
[ 0.000000] BIOS-e820: 000000003fff0000 - 000000003fff3000 (ACPI NVS)
[ 0.000000] BIOS-e820: 000000003fff3000 - 0000000040000000 (ACPI data)
[ 0.000000] BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
[ 0.000000] BIOS-e820: 00000000fec00000 - 0000000100000000 (reserved)
[ 0.000000] console [earlyser0] enabled
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuset
[ ... ]
i've reverted it via the patch below, as it clearly has unintended side
effects.
Ingo
>From 1070163596c13d3c34809c747c7800b3b06b158e Mon Sep 17 00:00:00 2001
From: Ingo Molnar <[email protected]>
Date: Wed, 23 Sep 2009 19:31:04 +0200
Subject: [PATCH] Revert "early_printk: Allow more than one early console"
This reverts commit c9530948bc626c8b638015c0b32abb9615659ec6.
---
arch/x86/kernel/early_printk.c | 65 +++++++++++++++++++--------------------
1 files changed, 32 insertions(+), 33 deletions(-)
diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
index 2acfd3f..519a5e1 100644
--- a/arch/x86/kernel/early_printk.c
+++ b/arch/x86/kernel/early_printk.c
@@ -176,19 +176,10 @@ asmlinkage void early_printk(const char *fmt, ...)
va_end(ap);
}
-static inline void early_console_register(struct console *con, int keep_early)
-{
- early_console = con;
- if (keep_early)
- early_console->flags &= ~CON_BOOT;
- else
- early_console->flags |= CON_BOOT;
- register_console(early_console);
-}
static int __init setup_early_printk(char *buf)
{
- int keep;
+ int keep_early;
if (!buf)
return 0;
@@ -197,34 +188,42 @@ static int __init setup_early_printk(char *buf)
return 0;
early_console_initialized = 1;
- keep = (strstr(buf, "keep") != NULL);
-
- while (*buf != '\0') {
- if (!strncmp(buf, "serial", 6)) {
- early_serial_init(buf + 6);
- early_console_register(&early_serial_console, keep);
- }
- if (!strncmp(buf, "ttyS", 4)) {
- early_serial_init(buf + 4);
- early_console_register(&early_serial_console, keep);
- }
- if (!strncmp(buf, "vga", 3) &&
- boot_params.screen_info.orig_video_isVGA == 1) {
- max_xpos = boot_params.screen_info.orig_video_cols;
- max_ypos = boot_params.screen_info.orig_video_lines;
- current_ypos = boot_params.screen_info.orig_y;
- early_console_register(&early_vga_console, keep);
- }
+ keep_early = (strstr(buf, "keep") != NULL);
+
+ if (!strncmp(buf, "serial", 6)) {
+ early_serial_init(buf + 6);
+ early_console = &early_serial_console;
+ } else if (!strncmp(buf, "ttyS", 4)) {
+ early_serial_init(buf);
+ early_console = &early_serial_console;
+ } else if (!strncmp(buf, "vga", 3)
+ && boot_params.screen_info.orig_video_isVGA == 1) {
+ max_xpos = boot_params.screen_info.orig_video_cols;
+ max_ypos = boot_params.screen_info.orig_video_lines;
+ current_ypos = boot_params.screen_info.orig_y;
+ early_console = &early_vga_console;
#ifdef CONFIG_EARLY_PRINTK_DBGP
- if (!strncmp(buf, "dbgp", 4) && !early_dbgp_init(buf + 4))
- early_console_register(&early_dbgp_console, keep);
+ } else if (!strncmp(buf, "dbgp", 4)) {
+ if (early_dbgp_init(buf+4) < 0)
+ return 0;
+ early_console = &early_dbgp_console;
+ /*
+ * usb subsys will reset ehci controller, so don't keep
+ * that early console
+ */
+ keep_early = 0;
#endif
#ifdef CONFIG_HVC_XEN
- if (!strncmp(buf, "xen", 3))
- early_console_register(&xenboot_console, keep);
+ } else if (!strncmp(buf, "xen", 3)) {
+ early_console = &xenboot_console;
#endif
- buf++;
}
+
+ if (keep_early)
+ early_console->flags &= ~CON_BOOT;
+ else
+ early_console->flags |= CON_BOOT;
+ register_console(early_console);
return 0;
}
* Randy Dunlap <[email protected]> wrote:
> Ingo Molnar wrote:
> >> USB: support for autosuspend in sierra while online
> >
> > FYI, -tip testing found a build failure with the sierra driver on
> > !CONFIG_PM - fixed via the patch below.
> >
> > Thanks,
> >
> > Ingo
> >
> > -------------------->
> > From 26f8ed899041199caa9315e057a28d10f81b5b88 Mon Sep 17 00:00:00 2001
> > From: Ingo Molnar <[email protected]>
> > Date: Wed, 23 Sep 2009 19:19:47 +0200
> > Subject: [PATCH] USB sierra: Fix build if !CONFIG_PM
> >
> > This build failure:
> >
> > drivers/usb/serial/sierra.c: In function 'sierra_suspend':
> > drivers/usb/serial/sierra.c:936: error: 'struct usb_device' has no member named 'auto_pm'
> >
> > Triggers because the ->auto_pm functionality depends on CONFIG_PM.
> >
> > Signed-off-by: Ingo Molnar <[email protected]>
>
> Ack.
> http://marc.info/?l=linux-usb&m=125305135600816&w=2
>
> lossy. :(
yeah, indeed.
Btw., i think my patch is a bit better as it also includes
stop_read_write_urbs() in the #ifdef block - your patch would probably
trigger a 'defined but not used' compiler warning. (have not checked
though.)
Ingo
Ingo Molnar wrote:
>> early_printk: Allow more than one early console
>>
>
> this patch broke things pretty badly on x86, with pretty much any
> config, as long as the early console is used - which most of my
> test-systems do :-(
>
Ingo,
Can you send me the boot args and kernel config you are using? I'd like
to figure out which part was at fault and fix it up.
Thanks,
Jason.
* Jason Wessel <[email protected]> wrote:
> Ingo Molnar wrote:
> >> early_printk: Allow more than one early console
> >>
> >
> > this patch broke things pretty badly on x86, with pretty much any
> > config, as long as the early console is used - which most of my
> > test-systems do :-(
> >
>
> Ingo,
>
> Can you send me the boot args and kernel config you are using? I'd
> like to figure out which part was at fault and fix it up.
will do. Will take some time though - trying to track down a new boot
crash as well:
acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
initcall acpiphp_init+0x0/0x83 returned -19 after 16410 usecs
calling ibm_acpiphp_init+0x0/0x190 @ 1
BUG: unable to handle kernel NULL pointer dereference at 0000000000000003
IP: [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5
PGD 0
Oops: 0002 [#1] SMP DEBUG_PAGEALLOC
last sysfs file:
CPU 0
Pid: 1, comm: swapper Not tainted 2.6.31-tip #16786 System Product Name
RIP: 0010:[<ffffffff82b07130>] [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5
RSP: 0018:ffff88003f2d1d60 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff88003f2d1d68 RSI: 00000000000001e4 RDI: 0000000000000000
RBP: ffff88003f2d1d90 R08: 0000000000000001 R09: ffffffff824b645b
R10: 000000002d0ef63b R11: ffff88003f2d1a80 R12: ffff88003fa780d0
R13: ffffffff83940dc8 R14: 0000000000000001 R15: ffffffff83942e10
FS: 0000000000000000(0000) GS:ffff880005800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 0000000000000003 CR3: 0000000001001000 CR4: 00000000000006b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process swapper (pid: 1, threadinfo ffff88003f2d0000, task ffff88003f2c8000)
Stack:
ffff88003f2c8000 ffff88003cfbb690 000000002d0ef63b 0000000000000000
<0> 0000000000000000 ffff88003fa780d0 ffff88003f2d1e10 ffffffff8156b6b6
<0> 0000000000000001 0000000100000000 0000000000000000 ffffffff83940dc8
Call Trace:
[<ffffffff8156b6b6>] acpi_ns_walk_namespace+0x11d/0x234
[<ffffffff82b070d4>] ? ibm_find_acpi_device+0x0/0xf5
[<ffffffff8157b159>] ? acpi_ut_acquire_mutex+0xd9/0x12e
[<ffffffff82b070d4>] ? ibm_find_acpi_device+0x0/0xf5
[<ffffffff81566dfa>] acpi_walk_namespace+0x105/0x162
[<ffffffff81d067bf>] ? acpi_pm_read+0xd/0x3e
[<ffffffff82b06f44>] ? ibm_acpiphp_init+0x0/0x190
[<ffffffff82b06fa8>] ibm_acpiphp_init+0x64/0x190
[<ffffffff810090b4>] do_one_initcall+0x82/0x1a6
[<ffffffff810edecc>] ? init_irq_proc+0x77/0x9a
[<ffffffff82ad8975>] do_basic_setup+0x5e/0x87
[<ffffffff82ad8a26>] kernel_init+0x88/0xe2
[<ffffffff8103ddfa>] child_rip+0xa/0x20
[<ffffffff8103d7bc>] ? restore_args+0x0/0x30
[<ffffffff82ad899e>] ? kernel_init+0x0/0xe2
[<ffffffff8103ddf0>] ? child_rip+0x0/0x20
Code: 48 c7 c2 c0 7b 0b 82 48 c7 c6 95 39 4a 82 48 c7 c7 1a 3c 4a 82 31 c0 e8 02 84 4b ff 31 c0 e9 82 00 00 00 48 8b 45 d8 48 8b 40 30 <c6> 40 03 00 48 8b 45 d8 83 78 18 00 74 5f f6 40 0d 04 74 59 48
RIP [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5
RSP <ffff88003f2d1d60>
CR2: 0000000000000003
---[ end trace 5a5d197966b56a2e ]---
Kernel panic - not syncing: Fatal exception
Pid: 1, comm: swapper Tainted: G D 2.6.31-tip #16786
/me looks in the general direction of Len ;-)
Ingo
* Ingo Molnar <[email protected]> wrote:
> > Can you send me the boot args and kernel config you are using? I'd
> > like to figure out which part was at fault and fix it up.
>
> will do. Will take some time though - trying to track down a new boot
> crash as well:
>
> acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
> initcall acpiphp_init+0x0/0x83 returned -19 after 16410 usecs
> calling ibm_acpiphp_init+0x0/0x190 @ 1
> BUG: unable to handle kernel NULL pointer dereference at 0000000000000003
> IP: [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5
You are lucky - while trying to bisect this crash i again ran into the
early boot hard hang.
[ I am less lucky, trying to bisect all this stuff ;-) ]
The commit point to which the attached config and bootlog belongs is:
2.6.31-07863-gb64ada6
Reverting:
c953094: early_printk: Allow more than one early console
solves it.
Ingo
* Ingo Molnar <[email protected]> wrote:
> The commit point to which the attached config and bootlog belongs is:
>
> 2.6.31-07863-gb64ada6
>
> Reverting:
>
> c953094: early_printk: Allow more than one early console
>
> solves it.
btw., the boot options are:
Command line: root=/dev/sda6 earlyprintk=serial,ttyS0,115200 console=ttyS0,115200 debug
initcall_debug apic=verbose sysrq_always_enabled ignore_loglevel
selinux=0 nmi_watchdog=0 panic=1 3
So it's nothing out of the ordinary - typical early-printk use: handover
from earlyprintk serial console to the real serial console.
Ingo
Ingo Molnar wrote:
> * Ingo Molnar <[email protected]> wrote:
>
>
>
>> The commit point to which the attached config and bootlog belongs is:
>>
>> 2.6.31-07863-gb64ada6
>>
>> Reverting:
>>
>> c953094: early_printk: Allow more than one early console
>>
>> solves it.
>>
>
> btw., the boot options are:
>
> Command line: root=/dev/sda6 earlyprintk=serial,ttyS0,115200 console=ttyS0,115200 debug
> initcall_debug apic=verbose sysrq_always_enabled ignore_loglevel
> selinux=0 nmi_watchdog=0 panic=1 3
>
>
AH HA!
earlyprintk=serial,ttyS0,115200
You are invoking the same device twice which is why you are having infinite recursion. It was not obvious to me why the earlyprintk code would allow "serial" or "ttyS", but perhaps we need to protect for that?
Your boot line should be:
earlyprintk=serial,115200
OR
earlyprintk=ttyS0,115200
The line you had there before would have been the equivalent of doing:
earlyprintk=ttyS0,ttyS0,115200
Given this, do we still need to execute the revert your revert? Or perhaps do we need to add some protection?
Thanks,
Jason.
* Jason Wessel <[email protected]> wrote:
> Ingo Molnar wrote:
> > * Ingo Molnar <[email protected]> wrote:
> >
> >
> >
> >> The commit point to which the attached config and bootlog belongs is:
> >>
> >> 2.6.31-07863-gb64ada6
> >>
> >> Reverting:
> >>
> >> c953094: early_printk: Allow more than one early console
> >>
> >> solves it.
> >>
> >
> > btw., the boot options are:
> >
> > Command line: root=/dev/sda6 earlyprintk=serial,ttyS0,115200 console=ttyS0,115200 debug
> > initcall_debug apic=verbose sysrq_always_enabled ignore_loglevel
> > selinux=0 nmi_watchdog=0 panic=1 3
> >
> >
>
> AH HA!
>
> earlyprintk=serial,ttyS0,115200
>
> You are invoking the same device twice which is why you are having
> infinite recursion. It was not obvious to me why the earlyprintk code
> would allow "serial" or "ttyS", but perhaps we need to protect for
> that?
>
> Your boot line should be:
>
> earlyprintk=serial,115200
>
> OR
>
> earlyprintk=ttyS0,115200
ah, indeed!
> The line you had there before would have been the equivalent of doing:
>
> earlyprintk=ttyS0,ttyS0,115200
>
> Given this, do we still need to execute the revert your revert? Or
> perhaps do we need to add some protection?
I have such lines on other boxes too. I'd suggest to add protection if
it's not too ugly - the typoed line worked and was pretty natural to do,
and the failure mode is nasty enough.
Ingo
Ingo Molnar wrote:
> * Jason Wessel <[email protected]> wrote:
>
>
>> Ingo Molnar wrote:
>>
>>> * Ingo Molnar <[email protected]> wrote:
>>>
>>>
>>>
>>>
>>>> The commit point to which the attached config and bootlog belongs is:
>>>>
>>>> 2.6.31-07863-gb64ada6
>>>>
>>>> Reverting:
>>>>
>>>> c953094: early_printk: Allow more than one early console
>>>>
>>>> solves it.
>>>>
>>>>
>>> btw., the boot options are:
>>>
>>> Command line: root=/dev/sda6 earlyprintk=serial,ttyS0,115200 console=ttyS0,115200 debug
>>> initcall_debug apic=verbose sysrq_always_enabled ignore_loglevel
>>> selinux=0 nmi_watchdog=0 panic=1 3
>>>
>>>
>>>
>> AH HA!
>>
>> earlyprintk=serial,ttyS0,115200
>>
>> You are invoking the same device twice which is why you are having
>> infinite recursion. It was not obvious to me why the earlyprintk code
>> would allow "serial" or "ttyS", but perhaps we need to protect for
>> that?
>>
>> Your boot line should be:
>>
>> earlyprintk=serial,115200
>>
>> OR
>>
>> earlyprintk=ttyS0,115200
>>
>
> ah, indeed!
>
>
>> The line you had there before would have been the equivalent of doing:
>>
>> earlyprintk=ttyS0,ttyS0,115200
>>
>> Given this, do we still need to execute the revert your revert? Or
>> perhaps do we need to add some protection?
>>
>
> I have such lines on other boxes too. I'd suggest to add protection if
> it's not too ugly - the typoed line worked and was pretty natural to do,
> and the failure mode is nasty enough.
>
> Ingo
>
Perhaps you will consider adding this patch to your tree? It fixes the
specific case you mentioned. It will still allow the board to boot and
instead of crashing, print a warning on the second instance.
Thanks,
Jason.
On Wed, 23 Sep 2009, Jason Wessel wrote:
>
> Perhaps you will consider adding this patch to your tree? It fixes the
> specific case you mentioned. It will still allow the board to boot and
> instead of crashing, print a warning on the second instance.
Ugh. This looks totally bogus.
Why don't you just add CON_REGISTERED to the console flags, and do
/* Already registered? */
if (early_console->flags & CON_REGISTERED)
return;
early_console->flags |= CON_REGISTERED;
there instead? That whole "loop over existing consoles to check their
names" looks silly and broken, and you're already playing with the flags
in there (CON_BOOT).
Linus
Linus Torvalds wrote:
> On Wed, 23 Sep 2009, Jason Wessel wrote:
>
>> Perhaps you will consider adding this patch to your tree? It fixes the
>> specific case you mentioned. It will still allow the board to boot and
>> instead of crashing, print a warning on the second instance.
>>
>
> Ugh. This looks totally bogus.
>
> Why don't you just add CON_REGISTERED to the console flags, and do
>
> /* Already registered? */
> if (early_console->flags & CON_REGISTERED)
> return;
> early_console->flags |= CON_REGISTERED;
>
> there instead? That whole "loop over existing consoles to check their
> names" looks silly and broken, and you're already playing with the flags
> in there (CON_BOOT).
>
Seems reasonable to me. We don't even have to add a new flag, because
we already have the index set to != -1 when the console registration
succeeds.
Here is the revised patch.
Jason.
Commit-ID: 429a6e5e2c1fbe5d805aad123efbdb5f0c14769f
Gitweb: http://git.kernel.org/tip/429a6e5e2c1fbe5d805aad123efbdb5f0c14769f
Author: Jason Wessel <[email protected]>
AuthorDate: Wed, 23 Sep 2009 18:13:13 -0500
Committer: Ingo Molnar <[email protected]>
CommitDate: Thu, 24 Sep 2009 13:01:13 +0200
x86: early_printk: Protect against using the same device twice
If you use the kernel argument:
earlyprintk=serial,ttyS0,115200
This will cause a recursive hang printing the same line
again and again:
BIOS-e820: 000000003fff3000 - 0000000040000000 (ACPI data)
BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
BIOS-e820: 00000000fec00000 - 0000000100000000 (reserved)
bootconsole [earlyser0] enabled
Linux version 2.6.31-07863-gb64ada6 (mingo@sirius) (gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) ) #16789 SMP Wed Sep 23 21:09:43 CEST 2009
Linux version 2.6.31-07863-gb64ada6 (mingo@sirius) (gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) ) #16789 SMP Wed Sep 23 21:09:43 CEST 2009
Linux version 2.6.31-07863-gb64ada6 (mingo@sirius) (gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) ) #16789 SMP Wed Sep 23 21:09:43 CEST 2009
Linux version 2.6.31-07863-gb64ada6 (mingo@sirius) (gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) ) #16789 SMP Wed Sep 23 21:09:43 CEST 2009
Linux version 2.6.31-07863-gb64ada6 (mingo@sirius) (gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) ) #16789 SMP Wed Sep 23 21:09:43 CEST 2009
Instead warn the end user that they specified the device
a second time, and ignore that second console.
Reported-by: Ingo Molnar <[email protected]>
Signed-off-by: Jason Wessel <[email protected]>
Cc: Len Brown <[email protected]>
Cc: Greg KH <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Linus Torvalds <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
---
arch/x86/kernel/early_printk.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
index 2acfd3f..41fd965 100644
--- a/arch/x86/kernel/early_printk.c
+++ b/arch/x86/kernel/early_printk.c
@@ -178,6 +178,11 @@ asmlinkage void early_printk(const char *fmt, ...)
static inline void early_console_register(struct console *con, int keep_early)
{
+ if (early_console->index != -1) {
+ printk(KERN_CRIT "ERROR: earlyprintk= %s already used\n",
+ con->name);
+ return;
+ }
early_console = con;
if (keep_early)
early_console->flags &= ~CON_BOOT;
On Wed, Sep 23, 2009 at 04:19:02PM -0500, Jason Wessel wrote:
> Ingo Molnar wrote:
> > * Ingo Molnar <[email protected]> wrote:
> >
> >
> >
> >> The commit point to which the attached config and bootlog belongs is:
> >>
> >> 2.6.31-07863-gb64ada6
> >>
> >> Reverting:
> >>
> >> c953094: early_printk: Allow more than one early console
> >>
> >> solves it.
> >>
> >
> > btw., the boot options are:
> >
> > Command line: root=/dev/sda6 earlyprintk=serial,ttyS0,115200 console=ttyS0,115200 debug
> > initcall_debug apic=verbose sysrq_always_enabled ignore_loglevel
> > selinux=0 nmi_watchdog=0 panic=1 3
> >
> >
>
> AH HA!
>
> earlyprintk=serial,ttyS0,115200
>
> You are invoking the same device twice which is why you are having
> infinite recursion. It was not obvious to me why the earlyprintk
> code would allow "serial" or "ttyS", but perhaps we need to protect
> for that?
That is how it's documented, quoting kernel-parameters.txt:
earlyprintk=vga
earlyprintk=serial[,ttySn[,baudrate]]
earlyprintk=dbgp
so ttySn is actually an option to the 'serial' mode. This has been
working before because we parsed only one mode but now we parse
serial,ttyS0,115200
correctly and then advance character-wise, looking for another
console:
erial,ttyS0,...
rial,ttyS0...
...
until we hit 'ttyS0,115200' which again we parse as a stand-alone
console definition, yielding twice the same one.
> Your boot line should be:
>
> earlyprintk=serial,115200
Sure this works? I haven't tried it, but the code looks like it would
misinterpret the baudrate as the port number, fail and advance to the
end of the string, and not set the baudrate at all. You can specify
ttyS0 standalone, but not serial alone.
It would probably make sense to skip what is successfully parsed
completely, perhaps like the (untested) diff below? The other init
functions would need to be converted too, so that we know how much
they peeked into the buffer.
---
diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
index 2acfd3f..62e1853 100644
--- a/arch/x86/kernel/early_printk.c
+++ b/arch/x86/kernel/early_printk.c
@@ -105,12 +105,12 @@ static void early_serial_write(struct console *con, const char *s, unsigned n)
#define DEFAULT_BAUD 9600
-static __init void early_serial_init(char *s)
+static __init void early_serial_init(char **sp)
{
unsigned char c;
unsigned divisor;
unsigned baud = DEFAULT_BAUD;
- char *e;
+ char *e, *s = *sp;
if (*s == ',')
++s;
@@ -143,6 +143,9 @@ static __init void early_serial_init(char *s)
baud = simple_strtoul(s, &e, 0);
if (baud == 0 || s == e)
baud = DEFAULT_BAUD;
+ s += strcspn(s, ",");
+ if (*s == ',')
+ s++;
}
divisor = 115200 / baud;
@@ -151,6 +154,8 @@ static __init void early_serial_init(char *s)
outb(divisor & 0xff, early_serial_base + DLL);
outb((divisor >> 8) & 0xff, early_serial_base + DLH);
outb(c & ~DLAB, early_serial_base + LCR);
+
+ *sp = s;
}
static struct console early_serial_console = {
@@ -201,12 +206,16 @@ static int __init setup_early_printk(char *buf)
while (*buf != '\0') {
if (!strncmp(buf, "serial", 6)) {
- early_serial_init(buf + 6);
+ buf += 6;
+ early_serial_init(&buf);
early_console_register(&early_serial_console, keep);
+ continue;
}
if (!strncmp(buf, "ttyS", 4)) {
- early_serial_init(buf + 4);
+ buf += 4;
+ early_serial_init(&buf);
early_console_register(&early_serial_console, keep);
+ continue;
}
if (!strncmp(buf, "vga", 3) &&
boot_params.screen_info.orig_video_isVGA == 1) {
Johannes Weiner wrote:
> On Wed, Sep 23, 2009 at 04:19:02PM -0500, Jason Wessel wrote:
>
>> Ingo Molnar wrote:
>>
>>> * Ingo Molnar <[email protected]> wrote:
>>>
>>>
>>>
>>>
>>>> The commit point to which the attached config and bootlog belongs is:
>>>>
>>>> 2.6.31-07863-gb64ada6
>>>>
>>>> Reverting:
>>>>
>>>> c953094: early_printk: Allow more than one early console
>>>>
>>>> solves it.
>>>>
>>>>
>>> btw., the boot options are:
>>>
>>> Command line: root=/dev/sda6 earlyprintk=serial,ttyS0,115200 console=ttyS0,115200 debug
>>> initcall_debug apic=verbose sysrq_always_enabled ignore_loglevel
>>> selinux=0 nmi_watchdog=0 panic=1 3
>>>
>>>
>>>
>> AH HA!
>>
>> earlyprintk=serial,ttyS0,115200
>>
>> You are invoking the same device twice which is why you are having
>> infinite recursion. It was not obvious to me why the earlyprintk
>> code would allow "serial" or "ttyS", but perhaps we need to protect
>> for that?
>>
>
> That is how it's documented, quoting kernel-parameters.txt:
>
> earlyprintk=vga
> earlyprintk=serial[,ttySn[,baudrate]]
> earlyprintk=dbgp
>
> so ttySn is actually an option to the 'serial' mode. This has been
> working before because we parsed only one mode but now we parse
>
> serial,ttyS0,115200
>
> correctly and then advance character-wise, looking for another
> console:
>
> erial,ttyS0,...
> rial,ttyS0...
> ...
>
> until we hit 'ttyS0,115200' which again we parse as a stand-alone
> console definition, yielding twice the same one.
>
>
>> Your boot line should be:
>>
>> earlyprintk=serial,115200
>>
>
> Sure this works? I haven't tried it, but the code looks like it would
> misinterpret the baudrate as the port number, fail and advance to the
> end of the string, and not set the baudrate at all. You can specify
> ttyS0 standalone, but not serial alone.
>
>
Perhaps not. I see the documentation needs an update though because it
did not match the code, for the case of just using ttyS0 or ttyS1 directly.
> It would probably make sense to skip what is successfully parsed
> completely, perhaps like the (untested) diff below? The other init
> functions would need to be converted too, so that we know how much
> they peeked into the buffer.
>
>
We can simply check the extra arg case after the parsing and advance,
instead of modifying all the functions. Then it is all backward compatible.
The fully tested patch follows.
Ingo if you agree, can you pull in this patch? Or comment and I'll make
some further adjustments.
Thanks,
Jason.
* Jason Wessel <[email protected]> wrote:
> >From 047b893e33041dbaf17b2a7eb03ea20486344d6f Mon Sep 17 00:00:00 2001
> From: Jason Wessel <[email protected]>
> Date: Thu, 24 Sep 2009 09:00:01 -0500
> Subject: [PATCH 1/1] x86,earlyprintk: Fix regression to handle serial,ttySn as 1 arg
>
> Commit c9530948bc626c8b638015c0b32abb9615659ec6 introduced a
> regression in the parsing of the earlyprintk= kernel arguments.
>
> If you specify "earlyprintk=serial,ttyS0,115200" as a kernel argument,
> the "serial,ttyS" should be parsed as a single argument and not as
> "serial" and then "ttyS".
>
> Also update the documentation to reflect you can specify the ttyS
> directly without the "serial" argument.
>
> Signed-off-by: Jason Wessel <[email protected]>
> ---
> Documentation/kernel-parameters.txt | 1 +
> arch/x86/kernel/early_printk.c | 5 ++++-
> 2 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
> index 6fa7292..9107b38 100644
> --- a/Documentation/kernel-parameters.txt
> +++ b/Documentation/kernel-parameters.txt
> @@ -671,6 +671,7 @@ and is between 256 and 4096 characters. It is defined in the file
> earlyprintk= [X86,SH,BLACKFIN]
> earlyprintk=vga
> earlyprintk=serial[,ttySn[,baudrate]]
> + earlyprintk=ttySn[,baudrate]
> earlyprintk=dbgp[debugController#]
>
> Append ",keep" to not disable it when the real console
> diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
> index 2acfd3f..b7bfdd5 100644
> --- a/arch/x86/kernel/early_printk.c
> +++ b/arch/x86/kernel/early_printk.c
> @@ -201,8 +201,11 @@ static int __init setup_early_printk(char *buf)
>
> while (*buf != '\0') {
> if (!strncmp(buf, "serial", 6)) {
> - early_serial_init(buf + 6);
> + buf += 6;
> + early_serial_init(buf);
> early_console_register(&early_serial_console, keep);
> + if (!strncmp(buf, ",ttyS", 5))
> + buf += 5;
> }
Looks good, beyond the tab-as-four-spaces ugliness which i fixed.
( and the 5/6 literals look a bit ugly too but are obvious and i dont
see a cleaner way to write them. )
Thanks,
Ingo
Commit-ID: ea3acb199a5d7e4da1de0a4288eba993b29f33b9
Gitweb: http://git.kernel.org/tip/ea3acb199a5d7e4da1de0a4288eba993b29f33b9
Author: Jason Wessel <[email protected]>
AuthorDate: Thu, 24 Sep 2009 09:08:30 -0500
Committer: Ingo Molnar <[email protected]>
CommitDate: Thu, 1 Oct 2009 10:34:16 +0200
x86: earlyprintk: Fix regression to handle serial,ttySn as 1 arg
Commit c953094 ("early_printk: Allow more than one early console")
introduced a regression in the parsing of the earlyprintk= kernel
arguments.
If you specify "earlyprintk=serial,ttyS0,115200" as a kernel
argument, the "serial,ttyS" should be parsed as a single argument
and not as "serial" and then "ttyS".
Also update the documentation to reflect you can specify the ttyS
directly without the "serial" argument.
Signed-off-by: Jason Wessel <[email protected]>
Cc: Len Brown <[email protected]>
Cc: Greg KH <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Johannes Weiner <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
---
Documentation/kernel-parameters.txt | 1 +
arch/x86/kernel/early_printk.c | 5 ++++-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 6fa7292..9107b38 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -671,6 +671,7 @@ and is between 256 and 4096 characters. It is defined in the file
earlyprintk= [X86,SH,BLACKFIN]
earlyprintk=vga
earlyprintk=serial[,ttySn[,baudrate]]
+ earlyprintk=ttySn[,baudrate]
earlyprintk=dbgp[debugController#]
Append ",keep" to not disable it when the real console
diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
index 41fd965..b9c830c 100644
--- a/arch/x86/kernel/early_printk.c
+++ b/arch/x86/kernel/early_printk.c
@@ -206,8 +206,11 @@ static int __init setup_early_printk(char *buf)
while (*buf != '\0') {
if (!strncmp(buf, "serial", 6)) {
- early_serial_init(buf + 6);
+ buf += 6;
+ early_serial_init(buf);
early_console_register(&early_serial_console, keep);
+ if (!strncmp(buf, ",ttyS", 5))
+ buf += 5;
}
if (!strncmp(buf, "ttyS", 4)) {
early_serial_init(buf + 4);