On May 26 2007 15:47, David Miller wrote:Just why did no one get a kernel oops? After all, the code tried to write to constant memory. This is the first patch of two. There is yet another section of Linux code that runs in 9600-only, and I need to figure out which. --- The Linux kernel ignored the PROM's serial settings (115200,n,8,1 in my case). This was because mode_prop remained "ttyX-mode" (expected: "ttya-mode") due to the constness of string literals when used with "char *". Since there is no "ttyX-mode" property in the PROM, Linux always used the default 9600. Signed-off-by: Jan Engelhardt <jengelh@gmx.de> --- drivers/serial/suncore.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Index: linux-2.6.21.sparc64/drivers/serial/suncore.c =================================================================== --- linux-2.6.21.sparc64.orig/drivers/serial/suncore.c +++ linux-2.6.21.sparc64/drivers/serial/suncore.c @@ -30,9 +30,9 @@ void sunserial_console_termios(struct console *con) { char mode[16], buf[16], *s; - char *mode_prop = "ttyX-mode"; - char *cd_prop = "ttyX-ignore-cd"; - char *dtr_prop = "ttyX-rts-dtr-off"; + char mode_prop[] = "ttyX-mode"; + char cd_prop[] = "ttyX-ignore-cd"; + char dtr_prop[] = "ttyX-rts-dtr-off"; char *ssp_console_modes_prop = "ssp-console-modes"; int baud, bits, stop, cflag; char parity; #<EOF> -
| Heiko Carstens | Re: -mm merge plans for 2.6.23 -- sys_fallocate |
| Linus Torvalds | Linux 2.6.21-rc4 |
| Michael Kerrisk | nanosleep() uses CLOCK_MONOTONIC, should be CLOCK_REALTIME? |
| Linus Torvalds | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
git: | |
| Gary Thomas | Marvell 88E609x switch? |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| David Miller | [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
