: Better serial console identification
Subsystems (2)
David Miller
maintainerPATCH 1/1 : Better serial console identification
If folks could test out the following and report any regressions, especially on sparc32, I'd really appreciate it. I intend to push this to Linus and -stable after it gets some exposure.
Bonus points for patches that fix the bugs you find :-)
From 8d8c99ec025445774ab663f13b7f9d537f8bf52e Mon Sep 17 00:00:00 2001
From: David S. Miller <[email protected]>
Date: Sun, 20 May 2007 13:29:10 -0700
Subject: [PATCH] [SPARC]: Fix serial console device detection.
The current scheme works on static interpretation of text names, which is wrong.
The output-device setting, for example, must be resolved via an alias or similar to a full path name to the console device.
Paths also contain an optional set of 'options', which starts with a colon at the end of the path. The option area is used to specify which of two serial ports ('a' or 'b') the path refers to when a device node drives multiple ports. 'a' is assumed if the option specification is missing.
This was caught by the UltraSPARC-T1 simulator. The 'output-device' property was set to 'ttya' and we didn't pick upon the fact that this is an OBP alias set to '/virtual-devices/console'. Instead we saw it as the first serial console device, instead of the hypervisor console.
The infrastructure is now there to take advantage of this to resolve the console correctly even in multi-head situations in fbcon too.
Thanks to Greg Onufer for the bug report.
--- arch/sparc/kernel/process.c | 8 ++- arch/sparc/kernel/prom.c | 128 +++++++++++++++++++++++++++++++++++ arch/sparc/kernel/setup.c | 65 +----------------- arch/sparc/prom/console.c | 116 ------------------------------- arch/sparc/prom/misc.c | 4 +- arch/sparc64/kernel/power.c | 2 +- arch/sparc64/kernel/process.c | 6 +- arch/sparc64/kernel/prom.c | 56 +++++++++++++++ arch/sparc64/kernel/setup.c | 70 +------------------- arch/sparc64/kernel/sparc64_ksyms.c | 1 - arch/sparc64/prom/console.c | 85 ----------------------- arch/sparc64/prom/misc.c | 4 +- arch/sparc64/prom/tree.c | 8 ++ drivers/serial/suncore.c | 123 +++++++++++++--------------------- drivers/serial/suncore.h | 2 + drivers/serial/sunhv.c | 13 +--- drivers/serial/sunsab.c | 22 ++----- drivers/serial/sunsu.c | 23 +----- drivers/serial/sunzilog.c | 24 ++----- drivers/video/aty/atyfb_base.c | 4 - drivers/video/igafb.c | 4 - include/asm-sparc/oplib.h | 26 ------- include/asm-sparc/prom.h | 4 + include/asm-sparc64/oplib.h | 28 +------- include/asm-sparc64/prom.h | 4 + include/asm-sparc64/system.h | 6 -- 26 files changed, 282 insertions(+), 554 deletions(-)
arch/sparc/kernel/process.c +5 -3
@@ -39,6 +39,7 @@#include <asm/processor.h> #include <asm/psr.h> #include <asm/elf.h> +#include <asm/prom.h> #include <asm/unistd.h> /*
@@ -150,7 +151,7 @@ void machine_halt(void)local_irq_enable ();mdelay (8 );local_irq_disable (); -if (!serial_console && prom_palette) +if (prom_palette)prom_palette (1 );prom_halt ();panic ("Halt failed!" );
@@ -166,7 +167,7 @@ void machine_restart(char * cmd) p =strchr (reboot_command,'\n' );if (p) *p =0 ; -if (!serial_console && prom_palette) +if (prom_palette)prom_palette (1 );if (cmd)prom_reboot (cmd);
@@ -179,7 +180,8 @@ void machine_restart(char * cmd)void machine_power_off (void ) {#ifdef CONFIG_SUN_AUXIO -if (auxio_power_register && (!serial_console || scons_pwroff)) +if (auxio_power_register && + (strcmp (of_console_device->type,"serial" ) || scons_pwroff)) *auxio_power_register |=AUXIO_POWER_OFF ;#endif machine_halt ();
arch/sparc/kernel/prom.c +128 -0
140 lines not on this page · raw message
arch/sparc/kernel/setup.c +1 -64
89 lines not on this page · raw message
arch/sparc/prom/console.c +0 -116
119 lines not on this page · raw message
arch/sparc/prom/misc.c +2 -2
@@ -58,7 +58,7 @@ prom_cmdline(void)extern void install_linux_ticker (void );unsigned long flags; -if (!serial_console && prom_palette) +if (prom_palette)prom_palette (1 );spin_lock_irqsave (&prom_lock, flags);install_obp_ticker ();
@@ -69,7 +69,7 @@ prom_cmdline(void)#ifdef CONFIG_SUN_AUXIO set_auxio (AUXIO_LED ,0 );#endif -if (!serial_console && prom_palette) +if (prom_palette)prom_palette (0 ); }
arch/sparc64/kernel/power.c +1 -1
@@ -53,7 +53,7 @@ static void (*poweroff_method)(void) = machine_alt_power_off;void machine_power_off (void ) { -if (!serial_console || scons_pwroff) { +if (strcmp (of_console_device->type,"serial" ) || scons_pwroff) {#ifdef CONFIG_PCI if (power_reg) {/* Both register bits seem to have the
arch/sparc64/kernel/process.c +3 -3
@@ -106,7 +106,7 @@ extern void (*prom_keyboard)(void);void machine_halt (void ) { -if (!serial_console && prom_palette) +if (prom_palette)prom_palette (1 );if (prom_keyboard)prom_keyboard ();
@@ -116,7 +116,7 @@ void machine_halt(void)void machine_alt_power_off (void ) { -if (!serial_console && prom_palette) +if (prom_palette)prom_palette (1 );if (prom_keyboard)prom_keyboard ();
@@ -130,7 +130,7 @@ void machine_restart(char * cmd) p =strchr (reboot_command,'\n' );if (p) *p =0 ; -if (!serial_console && prom_palette) +if (prom_palette)prom_palette (1 );if (prom_keyboard)prom_keyboard ();
arch/sparc64/kernel/prom.c +56 -0
68 lines not on this page · raw message
arch/sparc64/kernel/setup.c +1 -69
94 lines not on this page · raw message
arch/sparc64/kernel/sparc64_ksyms.c +0 -1
@@ -342,7 +342,6 @@ EXPORT_SYMBOL(VISenter);/* for input/keybdev */ EXPORT_SYMBOL (sun_do_break); -EXPORT_SYMBOL (serial_console);EXPORT_SYMBOL (stop_a_enabled);#ifdef CONFIG_DEBUG_BUGVERBOSE
arch/sparc64/prom/console.c +0 -85
88 lines not on this page · raw message
arch/sparc64/prom/misc.c +2 -2
@@ -48,7 +48,7 @@ void prom_cmdline(void)local_irq_save (flags); -if (!serial_console && prom_palette) +if (prom_palette)prom_palette (1 );#ifdef CONFIG_SMP
@@ -61,7 +61,7 @@ void prom_cmdline(void)smp_release ();#endif -if (!serial_console && prom_palette) +if (prom_palette)prom_palette (0 );local_irq_restore (flags);
arch/sparc64/prom/tree.c +8 -0
@@ -295,3 +295,11 @@ prom_pathtoinode(const char *path)if (node =-1 )return 0 ;return node; } + +int prom_ihandle2path (int handle,char *buffer,int bufsize) +{ +return p1275_cmd ("instance-to-path" , +P1275_ARG (1 ,P1275_ARG_OUT_BUF )| +P1275_INOUT (3 ,1 ), + handle, buffer,P1275_SIZE (bufsize)); +}
drivers/serial/suncore.c +46 -77
147 lines not on this page · raw message
drivers/serial/suncore.h +2 -0
@@ -24,6 +24,8 @@ extern int suncore_mouse_baud_detection(unsigned char, int);extern int sunserial_current_minor; +extern int sunserial_console_match (struct console *,struct device_node *, +struct uart_driver *,int );extern void sunserial_console_termios (struct console *);#endif /* !(_SERIAL_SUN_H) */
drivers/serial/sunhv.c +2 -11
@@ -508,16 +508,6 @@ static struct console sunhv_console = { .data = &sunhv_reg, }; -static inline struct console *SUNHV_CONSOLE (void ) -{ -if (con_is_present ()) -return NULL ; - - sunhv_console.index =0 ; - -return &sunhv_console; -} -static int __devinit hv_probe (struct of_device *op,const struct of_device_id *match) {struct uart_port *port;
@@ -570,7 +560,8 @@ static int __devinit hv_probe(struct of_device *op, const struct of_device_id *m sunhv_reg.tty_driver->name_base = sunhv_reg.minor -64 ; sunserial_current_minor +=1 ; - sunhv_reg.cons =SUNHV_CONSOLE (); +sunserial_console_match (&sunhv_console, op->node, + &sunhv_reg, port->line); err =uart_add_one_port (&sunhv_reg, port);if (err)
drivers/serial/sunsab.c +5 -17
@@ -959,22 +959,6 @@ static struct console sunsab_console = {static inline struct console *SUNSAB_CONSOLE (void ) { -int i; - -if (con_is_present ()) -return NULL ; - -for (i =0 ; i < num_channels; i++) { -int this_minor = sunsab_reg.minor + i; - -if ((this_minor -64 ) = (serial_console -1 )) -break ; - } -if (i = num_channels) -return NULL ; - - sunsab_console.index = i; -return &sunsab_console; }#else
@@ -1071,7 +1055,12 @@ static int __devinit sab_probe(struct of_device *op, const struct of_device_id *return err; } +sunserial_console_match (SUNSAB_CONSOLE (), op->node, + &sunsab_reg, up[0 ].port.line);uart_add_one_port (&sunsab_reg, &up[0 ].port); + +sunserial_console_match (SUNSAB_CONSOLE (), op->node, + &sunsab_reg, up[1 ].port.line);uart_add_one_port (&sunsab_reg, &up[1 ].port);dev_set_drvdata (&op->dev, &up[0 ]);
@@ -1155,7 +1144,6 @@ static int __init sunsab_init(void) } sunsab_reg.tty_driver->name_base = sunsab_reg.minor -64 ; - sunsab_reg.cons =SUNSAB_CONSOLE (); sunserial_current_minor += num_channels; }
drivers/serial/sunsu.c +4 -19
@@ -1357,28 +1357,12 @@ static struct console sunsu_console = {* Register console. */ -static inline struct console *SUNSU_CONSOLE (int num_uart) +static inline struct console *SUNSU_CONSOLE (void ) { -int i; - -if (con_is_present ()) -return NULL ; - -for (i =0 ; i < num_uart; i++) { -int this_minor = sunsu_reg.minor + i; - -if ((this_minor -64 ) = (serial_console -1 )) -break ; - } -if (i = num_uart) -return NULL ; - - sunsu_console.index = i; -return &sunsu_console; }#else -#define SUNSU_CONSOLE (num_uart) (NULL) +#define SUNSU_CONSOLE () (NULL)#define sunsu_serial_console_init () do { } while (0)#endif
@@ -1468,6 +1452,8 @@ static int __devinit su_probe(struct of_device *op, const struct of_device_id *m up->port.ops = &sunsu_pops; +sunserial_console_match (SUNSU_CONSOLE (), dp, + &sunsu_reg, up->port.line); err =uart_add_one_port (&sunsu_reg, &up->port);if (err) goto out_unmap;
@@ -1558,7 +1544,6 @@ static int __init sunsu_init(void)return err; sunsu_reg.tty_driver->name_base = sunsu_reg.minor -64 ; sunserial_current_minor += num_uart; - sunsu_reg.cons =SUNSU_CONSOLE (num_uart); } err =of_register_driver (&su_driver, &of_bus_type);
drivers/serial/sunzilog.c +6 -18
@@ -1215,23 +1215,6 @@ static struct console sunzilog_console_ops = {static inline struct console *SUNZILOG_CONSOLE (void ) { -int i; - -if (con_is_present ()) -return NULL ; - -for (i =0 ; i <NUM_CHANNELS ; i++) { -int this_minor = sunzilog_reg.minor + i; - -if ((this_minor -64 ) = (serial_console -1 )) -break ; - } -if (i =NUM_CHANNELS ) -return NULL ; - - sunzilog_console_ops.index = i; - sunzilog_port_table[i].flags |=SUNZILOG_FLAG_IS_CONS ; -return &sunzilog_console_ops; }
@@ -1417,12 +1400,18 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *msunzilog_init_hw (&up[1 ]);if (!keyboard_mouse) { +if (sunserial_console_match (SUNZILOG_CONSOLE (), op->node, + &sunzilog_reg, up[0 ].port.line)) + up->flags |=SUNZILOG_FLAG_IS_CONS ; err =uart_add_one_port (&sunzilog_reg, &up[0 ].port);if (err) {of_iounmap (&op->resource[0 ], rp,sizeof (struct zilog_layout ));return err; } +if (sunserial_console_match (SUNZILOG_CONSOLE (), op->node, + &sunzilog_reg, up[1 ].port.line)) + up->flags |=SUNZILOG_FLAG_IS_CONS ; err =uart_add_one_port (&sunzilog_reg, &up[1 ].port);if (err) {uart_remove_one_port (&sunzilog_reg, &up[0 ].port);
@@ -1520,7 +1509,6 @@ static int __init sunzilog_init(void) goto out_free_tables; sunzilog_reg.tty_driver->name_base = sunzilog_reg.minor -64 ; - sunzilog_reg.cons =SUNZILOG_CONSOLE (); sunserial_current_minor += uart_count; }
drivers/video/aty/atyfb_base.c +0 -4
@@ -2914,10 +2914,6 @@ static int __devinit atyfb_setup_sparc(struct pci_dev *pdev,int node, len, i, j, ret;u32 mem, chip_id; -/* Do not attach when we have a serial console. */ -if (!con_is_present ()) -return -ENXIO ; -/* * Map memory-mapped registers. */
drivers/video/igafb.c +0 -4
@@ -379,10 +379,6 @@ int __init igafb_init(void)if (fb_get_options ("igafb" ,NULL ))return -ENODEV ; -/* Do not attach when we have a serial console. */ -if (!con_is_present ()) -return -ENXIO ; - pdev =pci_get_device (PCI_VENDOR_ID_INTERG ,PCI_DEVICE_ID_INTERG_1682 ,0 );if (pdev =NULL ) {
include/asm-sparc/oplib.h +0 -26
@@ -158,32 +158,6 @@ extern void prom_putchar(char character);extern void prom_printf (char *fmt, ...);extern void prom_write (const char *buf,unsigned int len); -/* Query for input device type */ - -enum prom_input_device { -PROMDEV_IKBD ,/* input from keyboard */ -PROMDEV_ITTYA ,/* input from ttya */ -PROMDEV_ITTYB ,/* input from ttyb */ -PROMDEV_IRSC ,/* input from rsc */ -PROMDEV_IVCONS ,/* input from virtual-console */ -PROMDEV_I_UNK , -}; - -extern enum prom_input_device prom_query_input_device (void ); - -/* Query for output device type */ - -enum prom_output_device { -PROMDEV_OSCREEN ,/* to screen */ -PROMDEV_OTTYA ,/* to ttya */ -PROMDEV_OTTYB ,/* to ttyb */ -PROMDEV_ORSC ,/* to rsc */ -PROMDEV_OVCONS ,/* to virtual-console */ -PROMDEV_O_UNK , -}; - -extern enum prom_output_device prom_query_output_device (void ); -/* Multiprocessor operations... */ /* Start the CPU with the given device tree node, context table, and context
include/asm-sparc/prom.h +4 -0
@@ -103,5 +103,9 @@ extern int of_n_size_cells(struct device_node *np);extern void prom_build_devicetree (void ); +extern struct device_node *of_console_device; +extern char *of_console_path; +extern char *of_console_options; +#endif /* __KERNEL__ */ #endif /* _SPARC_PROM_H */
include/asm-sparc64/oplib.h +2 -26
@@ -140,32 +140,6 @@ extern void prom_putchar(char character);extern void prom_printf (const char *fmt, ...);extern void prom_write (const char *buf,unsigned int len); -/* Query for input device type */ - -enum prom_input_device { -PROMDEV_IKBD ,/* input from keyboard */ -PROMDEV_ITTYA ,/* input from ttya */ -PROMDEV_ITTYB ,/* input from ttyb */ -PROMDEV_IRSC ,/* input from rsc */ -PROMDEV_IVCONS ,/* input from virtual-console */ -PROMDEV_I_UNK , -}; - -extern enum prom_input_device prom_query_input_device (void ); - -/* Query for output device type */ - -enum prom_output_device { -PROMDEV_OSCREEN ,/* to screen */ -PROMDEV_OTTYA ,/* to ttya */ -PROMDEV_OTTYB ,/* to ttyb */ -PROMDEV_ORSC ,/* to rsc */ -PROMDEV_OVCONS ,/* to virtual-console */ -PROMDEV_O_UNK , -}; - -extern enum prom_output_device prom_query_output_device (void ); -/* Multiprocessor operations... */ #ifdef CONFIG_SMP /* Start the CPU with the given device tree node at the passed program
@@ -317,6 +291,8 @@ extern int prom_setprop(int node, const char *prop_name, char *prop_value,extern int prom_pathtoinode (const char *path);extern int prom_inst2pkg (int ); +extern int prom_ihandle2path (int handle,char *buffer,int bufsize); +/* CPU probing helpers. */ struct device_node ;int cpu_find_by_instance (int instance,struct device_node **dev_node,int *mid);
include/asm-sparc64/prom.h +4 -0
@@ -111,5 +111,9 @@ extern int of_n_size_cells(struct device_node *np);extern void prom_build_devicetree (void ); +extern struct device_node *of_console_device; +extern char *of_console_path; +extern char *of_console_options; +#endif /* __KERNEL__ */ #endif /* _SPARC64_PROM_H */
include/asm-sparc64/system.h +0 -6
@@ -115,14 +115,8 @@ do { __asm__ __volatile__("ba,pt %%xcc, 1f\n\t" \#ifndef __ASSEMBLY__extern void sun_do_break (void ); -extern int serial_console;extern int stop_a_enabled; -static __inline__int con_is_present (void ) -{ -return serial_console ?0 :1 ; -} -extern void synchronize_user_stack (void );extern void __flushw_user (void );
Signature · 1 line
1.5.2
Quoted 4 lines · David Miller
If folks could test out the following and report any regressions, especially on sparc32, I'd really appreciate it. I intend to push this to Linus and -stable after it gets some exposure.
Well... I finally got around to testing this on sparc32, and it breaks the new esp driver. Basically, the driver doesn't scan the bus anymore.
Obviously, this is a pretty ugly regression (after we finally got it working again).
Attached are the bootup logs from the serial console on the SS4, one kernel has the serial patch, the other does not, they are otherwise identical.
~spot
/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\
Rebooting with command:
Boot device: /iommu/sbus/espdma/esp/sd@3,0:c File and args:
SILO Version 1.4.11
\
Welcome to Aurora SPARC Linux!
Hit <TAB> for boot options
boot: H
1.3149.3 1.3149.2 1.3062.9 1.2986 1.2906.4 1.2906 spot1 debian
boot: 1.3149.2
|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|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-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\PROMLIB: obio_ranges 1 Booting Linux...
PROMLIB: Sun Boot Prom Version 3 Revision 2
Linux version 2.6.21-1.3149.al3.2 (root@odyssey) (gcc version 4.1.1 20060629 (Red Hat 4.1.1-6)) #1 Tue May 15 21:03:38 EDT 2007
ARCH: SUN4M
TYPE: SPARCstation 4
Ethernet address: 8:0:20:79:8d:63
Boot time fixup v1.6. 4/Mar/98 Jakub Jelinek ([email protected]). Patching kernel for srmmu[Fujitsu Swift]/iommu
PROM: Built device tree with 20056 bytes of memory.
Power off control detected.
Built 1 zonelists. Total pages: 39032
Kernel command line: ro root=LABEL=/ stop-a=1
PID hash table entries: 1024 (order: 10, 4096 bytes)start_kernel(): bug: interrupts were enabled early
Console: colour dummy device 80x25
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 153528k/163508k available (1680k kernel code, 9820k reserved, 432k data, 144k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
IOMMU: impl 0 vers 4 table 0xf0640000[262144 B] map [65536 b]
sbus0: Clock 22.0 MHz
dma0: Revision 2
dma1: Revision 2
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
checking if image is initramfs... it is
Freeing initrd memory: 3686k freed
ioremap: done with statics, switching to malloc
apc: power management initialized
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 144x56
/iommu@0,10000000/sbus@0,10001000/SUNW,tcx@2,800000: TCX at 0:50800000, 8-bit onlyffd35080: ttyS0 at MMIO 0x71100000 (irq = 44) is a zs
Console: ttyS0 (SunZilog zs0)ffd35080: ttyS1 at MMIO 0x71100004 (irq = 44) is a zsffd35134: Keyboard at MMIO 0x71000000 (irq = 44) is a zsffd35134: Mouse at MMIO 0x71000004 (irq = 44) is a zs
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksizertc_sun_init: Registered Mostek RTC driver.
mice: PS/2 mouse device common for all mice
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Freeing unused kernel memory: 144k freed
input: Sun Mouse as /class/input/input0
Red Hat nash version 6.0.9 starting
Mounting proc filesystem
Mounting sysfs filesystem
Creating /dev
Creating initial device nodes
Setting up hotplug.
Creating block device nodes.
Loading jbd.ko module
Loading ext3.ko module
Loading scsi_mod.ko module
SCSI subsystem initialized
Loading sd_mod.ko module
Loading scsi_transport_spi.ko module
Loading esp.ko module
scsi0 : esp
esp: esp0 found at /iommu@0,10000000/sbus@0,10001000/espdma@4,8400000/esp@4,8800000, regs[fd117000:fd00f000] irq[36]
esp: esp0 is a FAS100A, 40 MHz (ccf=0), SCSI ID 7
scsi 0:0:3:0: Direct-Access SEAGATE ST34573WC 6244 PQ: 0 ANSI: 2
target0:0:3: Beginning Domain Validation
target0:0:3: FAST-10 SCSI 10.0 MB/s ST (100 ns, offset 15)
target0:0:3: Domain Validation skipping write tests
target0:0:3: Ending Domain Validation
SCSI device sda: 8888924 512-byte hdwr sectors (4551 MB)
sda: Write Protect is off
SCSI device sda: write cache: enabled, read cache: enabled, supports DPO and FUA
SCSI device sda: 8888924 512-byte hdwr sectors (4551 MB)
sda: Write Protect is off
SCSI device sda: write cache: enabled, read cache: enabled, supports DPO and FUA
sda: sda1 sda2 sda3 sda4
sd 0:0:3:0: Attached scsi disk sda
scsi 0:0:6:0: CD-ROM TOSHIBA CD-ROM DRIVE:XM 1971 PQ: 0 ANSI: 2
target0:0:6: Beginning Domain Validation
target0:0:6: Ending Domain Validation
Creating root device.
Mounting root filesystem.
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
Setting up other filesystems.
Setting up new root fs
no fstab.sys, mounting internal defaults
Switching to new root and running init.
unmounting old /dev
unmounting old /proc
unmounting old /sys
INIT: version 2.86 booting
Welcome to Aurora SPARC Linux
Press 'I' to enter interactive startup.
Setting clock (localtime): Wed May 23 13:30:13 CDT 2007 [ OK ]
Starting udev:
boot
Resetting ...
SPARCstation 4, No Keyboard
ROM Rev. 2.24, 160 MB memory installed, Serial #7966051. Ethernet address 8:0:20:79:8d:63, Host ID: 80798d63.
Initializing Memory |/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\
Rebooting with command:
Boot device: /iommu/sbus/espdma/esp/sd@3,0:c File and args:
SILO Version 1.4.11
\
Welcome to Aurora SPARC Linux!
Hit <TAB> for boot options
boot:
1.3149.3 1.3149.2 1.3062.9 1.2986 1.2906.4 1.2906 spot1 debian
boot: 1.3149.3
|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-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|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-PROMLIB: obio_ranges 1 OF stdout device is: /obio/zs@0,100000:aBooting Linux...
PROMLIB: Sun Boot Prom Version 3 Revision 2
Linux version 2.6.21-1.3149.al3.3 (root@odyssey) (gcc version 4.1.1 20060629 (Red Hat 4.1.1-6)) #1 Mon May 21 10:26:42 EDT 2007
ARCH: SUN4M
TYPE: SPARCstation 4
Ethernet address: 8:0:20:79:8d:63
Boot time fixup v1.6. 4/Mar/98 Jakub Jelinek ([email protected]). Patching kernel for srmmu[Fujitsu Swift]/iommu
OF stdout device is: /obio/zs@0,100000:aPROM: Built device tree with 20312 bytes of memory.
Power off control detected.
Built 1 zonelists. Total pages: 39033
Kernel command line: ro root=LABEL=/ stop-a=1
PID hash table entries: 1024 (order: 10, 4096 bytes)start_kernel(): bug: interrupts were enabled early
Console: colour dummy device 80x25
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 153528k/163508k available (1676k kernel code, 9816k reserved, 428k data, 144k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
IOMMU: impl 0 vers 4 table 0xf0640000[262144 B] map [65536 b]
sbus0: Clock 22.0 MHz
dma0: Revision 2
dma1: Revision 2
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
checking if image is initramfs... it is
Freeing initrd memory: 3686k freed
ioremap: done with statics, switching to malloc
apc: power management initialized
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 144x56
/iommu@0,10000000/sbus@0,10001000/SUNW,tcx@2,800000: TCX at 0:50800000, 8-bit onlyffd35080: ttyS0 at MMIO 0x71100000 (irq = 44) is a zs
Console: ttyS0 (SunZilog zs0)ffd35080: ttyS1 at MMIO 0x71100004 (irq = 44) is a zsffd35134: Keyboard at MMIO 0x71000000 (irq = 44) is a zsffd35134: Mouse at MMIO 0x71000004 (irq = 44) is a zs
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksizertc_sun_init: Registered Mostek RTC driver.
mice: PS/2 mouse device common for all mice
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Freeing unused kernel memory: 144k freed
input: Sun Mouse as /class/input/input0
Red Hat nash version 6.0.9 starting
Mounting proc filesystem
Mounting sysfs filesystem
Creating /dev
Creating initial device nodes
Setting up hotplug.
Creating block device nodes.
Loading jbd.ko module
Loading ext3.ko module
Loading scsi_mod.ko module
SCSI subsystem initialized
Loading sd_mod.ko module
Loading scsi_transport_spi.ko module
Loading esp.ko module
scsi0 : esp
esp: esp0 found at /iommu@0,10000000/sbus@0,10001000/espdma@4,8400000/esp@4,8800000, regs[fd117000:fd00f000] irq[36]
esp: esp0 is a FAS100A, 40 MHz (ccf=0), SCSI ID 7
Creating root device.
Mounting root filesystem.
mount: could not find filesystem '/dev/root'
Setting up other filesystems.
Setting up new root fs
Kernel panic - not syncing: Attempted to kill init!
sePress Stop-A (L1-A) to return to the boot prom
tuproot: moving /dev failed: No such file or directory no fstab.sys, mounting internal defaults
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory Switching to new root and running init. unmounting old /dev
unmounting old /proc
unmounting old /sys
switchroot: mount failed: No such file or directory Booting has failed.
Quoted 9 lines · Tom "spot" Callaway
Quoted 4 lines · David Miller
If folks could test out the following and report any regressions, especially on sparc32, I'd really appreciate it. I intend to push this to Linus and -stable after it gets some exposure.
Well... I finally got around to testing this on sparc32, and it breaks the new esp driver. Basically, the driver doesn't scan the bus anymore.
Quoted 6 lines
Obviously, this is a pretty ugly regression (after we finally got it working again).
Attached are the bootup logs from the serial console on the SS4, one kernel has the serial patch, the other does not, they are otherwise identical.
Just for kicks, I tried passing esp_bus_reset_settle=10, but it doesn't change the result at all.
I also grabbed a log with esp_debug=2047, that log is attached.
~spot
SPARCstation 4, No Keyboard
ROM Rev. 2.24, 160 MB memory installed, Serial #7966051. Ethernet address 8:0:20:79:8d:63, Host ID: 80798d63.
Testing Memory -
Initializing Memory |/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\
Boot device: /iommu/sbus/espdma/esp/sd@3,0:c File and args:
SILO Version 1.4.11
\
Welcome to Aurora SPARC Linux!
Hit <TAB> for boot options
boot: 1.3149.3
|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\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/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-PROMLIB: obio_ranges 1 OF stdout device is: /obio/zs@0,100000:aBooting Linux...
PROMLIB: Sun Boot Prom Version 3 Revision 2
Linux version 2.6.21-1.3149.al3.3 (root@odyssey) (gcc version 4.1.1 20060629 (Red Hat 4.1.1-6)) #1 Mon May 21 10:26:42 EDT 2007
ARCH: SUN4M
TYPE: SPARCstation 4
Ethernet address: 8:0:20:79:8d:63
Boot time fixup v1.6. 4/Mar/98 Jakub Jelinek ([email protected]). Patching kernel for srmmu[Fujitsu Swift]/iommu
OF stdout device is: /obio/zs@0,100000:aPROM: Built device tree with 20312 bytes of memory.
Power off control detected.
Built 1 zonelists. Total pages: 39033
Kernel command line: ro root=LABEL=/ stop-a=1
PID hash table entries: 1024 (order: 10, 4096 bytes)start_kernel(): bug: interrupts were enabled early
Console: colour dummy device 80x25
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 153528k/163508k available (1676k kernel code, 9816k reserved, 428k data, 144k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
IOMMU: impl 0 vers 4 table 0xf0640000[262144 B] map [65536 b]
sbus0: Clock 22.0 MHz
dma0: Revision 2
dma1: Revision 2
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
checking if image is initramfs... it is
Freeing initrd memory: 3686k freed
ioremap: done with statics, switching to malloc
apc: power management initialized
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 144x56
/iommu@0,10000000/sbus@0,10001000/SUNW,tcx@2,800000: TCX at 0:50800000, 8-bit onlyffd35080: ttyS0 at MMIO 0x71100000 (irq = 44) is a zs
Console: ttyS0 (SunZilog zs0)ffd35080: ttyS1 at MMIO 0x71100004 (irq = 44) is a zsffd35134: Keyboard at MMIO 0x71000000 (irq = 44) is a zsffd35134: Mouse at MMIO 0x71000004 (irq = 44) is a zs
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksizertc_sun_init: Registered Mostek RTC driver.
mice: PS/2 mouse device common for all mice
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Freeing unused kernel memory: 144k freed
input: Sun Mouse as /class/input/input0
Red Hat nash version 6.0.9 starting
Mounting proc filesystem
Mounting sysfs filesystem
Creating /dev
Creating initial device nodes
Setting up hotplug.
Creating block device nodes.
Loading jbd.ko module
Loading ext3.ko module
Loading scsi_mod.ko module
SCSI subsystem initialized
Loading sd_mod.ko module
Loading scsi_transport_spi.ko module
Loading esp.ko module
scsi0 : esp
esp: esp0 found at /iommu@0,10000000/sbus@0,10001000/espdma@4,8400000/esp@4,8800000, regs[fd117000:fd00f000] irq[36]
esp: esp0 is a FAS100A, 40 MHz (ccf=0), SCSI ID 7
ESP: tgt[0] lun[0] scsi_cmd [ 12 00 00 00 24 da ]
ESP: intr sreg[80] seqreg[00] sreg2[00] ireg[20]
ESP: tgt[1] lun[0] scsi_cmd [ 12 00 00 00 24 da ]
ESP: intr sreg[80] seqreg[00] sreg2[00] ireg[20]
ESP: tgt[2] lun[0] scsi_cmd [ 12 00 00 00 24 da ]
ESP: intr sreg[80] seqreg[00] sreg2[00] ireg[20]
ESP: tgt[3] lun[0] scsi_cmd [ 12 00 00 00 24 da ]
ESP: intr sreg[93] seqreg[00] sreg2[00] ireg[18]
ESP: intr sreg[97] seqreg[04] sreg2[00] ireg[08]
ESP: intr sreg[90] seqreg[04] sreg2[00] ireg[20]
ESP: Command done status[2] message[0]
esp0: Doing auto-sense for tgt[3] lun[0]
ESP: intr sreg[91] seqreg[04] sreg2[00] ireg[18]
ESP: start data addr[f0005d40] len[96] write(1)
ESP: intr sreg[83] seqreg[04] sreg2[00] ireg[10]
ESP: data done csr[a6400310] flgs[5] sent[18]
ESP: intr sreg[87] seqreg[04] sreg2[00] ireg[08]
ESP: intr sreg[80] seqreg[04] sreg2[00] ireg[20]
ESP: Command done status[0] message[0]
esp0: tgt[3] lun[0] AUTO SENSE[ 70 00 06 00 00 00 00 0a 00 00 00 00 29 02 02 00 00 00 ]
ESP: tgt[4] lun[0] scsi_cmd [ 12 00 00 00 24 da ]
ESP: intr sreg[80] seqreg[04] sreg2[00] ireg[20]
ESP: tgt[5] lun[0] scsi_cmd [ 12 00 00 00 24 da ]
ESP: intr sreg[80] seqreg[00] sreg2[00] ireg[20]
ESP: tgt[6] lun[0] scsi_cmd [ 12 00 00 00 24 da ]
ESP: intr sreg[93] seqreg[00] sreg2[00] ireg[18]
ESP: intr sreg[97] seqreg[04] sreg2[00] ireg[08]
ESP: intr sreg[90] seqreg[04] sreg2[00] ireg[20]
ESP: Command done status[2] message[0]
esp0: Doing auto-sense for tgt[6] lun[0]
ESP: intr sreg[91] seqreg[04] sreg2[00] ireg[18]
ESP: start data addr[f0009d40] len[96] write(1)
ESP: intr sreg[83] seqreg[04] sreg2[00] ireg[10]
ESP: data done csr[a6400310] flgs[5] sent[18]
ESP: intr sreg[87] seqreg[04] sreg2[00] ireg[08]
ESP: intr sreg[80] seqreg[04] sreg2[00] ireg[20]
ESP: Command done status[0] message[0]
esp0: tgt[6] lun[0] AUTO SENSE[ 70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 c9 00 05 ]
Creating root device.
Mounting root filesystem.
mount: could not find filesystem '/dev/root'
Setting up other filesystems.
Setting up new root fs
Kernel panic - not syncing: Attempted to kill init!
sePress Stop-A (L1-A) to return to the boot prom
tuproot: moving /dev failed: No such file or directory no fstab.sys, mounting internal defaults
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory Switching to new root and running init. unmounting old /dev
unmounting old /proc
unmounting old /sys
switchroot: mount failed: No such file or directory Booting has failed.
David Miller
maintainerFrom: "Tom \"spot\" Callaway" <[email protected]>
Date: Wed, 23 May 2007 14:04:02 -0500
Quoted 4 lines
Just for kicks, I tried passing esp_bus_reset_settle, but it doesn't change the result at all.
I also grabbed a log with
esp_debug47, that log is attached.
A serial driver change breaking SCSI is a new one on me :-)
I'll see what I can figure out about this but definiely no promises as this report is just too strange.
David Miller
maintainerFrom: "Tom \"spot\" Callaway" <[email protected]>
Date: Wed, 23 May 2007 14:04:02 -0500
Quoted 4 lines
Just for kicks, I tried passing esp_bus_reset_settle, but it doesn't change the result at all.
I also grabbed a log with
esp_debug47, that log is attached.
Does this fix the problem?
arch/sparc/kernel/prom.c +3 -0
@@ -575,6 +575,8 @@ EXPORT_SYMBOL(of_console_path);char *of_console_options;EXPORT_SYMBOL (of_console_options); +extern void restore_current (void ); +static void __init of_console_init (void ) {char *msg ="OF stdout device is: %s" ;
@@ -633,6 +635,7 @@ static void __init of_console_init(void)spin_lock_irqsave (&prom_lock, flags); node = (*romvec->pv_v2devops.v2_inst2pkg)(fd); +restore_current ();spin_unlock_irqrestore (&prom_lock, flags);if (!node) {
Quoted 9 lines · David Miller
From: "Tom \"spot\" Callaway" <[email protected]>
Date: Wed, 23 May 2007 14:04:02 -0500Quoted 4 lines
Just for kicks, I tried passing esp_bus_reset_settle, but it doesn't change the result at all.
I also grabbed a log with
esp_debug47, that log is attached.Does this fix the problem?
Nope. No change. Do you want the esp_debug 47 from that?
~spot
Quoted 9 lines · David Miller
From: "Tom \"spot\" Callaway" <[email protected]>
Date: Wed, 23 May 2007 14:04:02 -0500Quoted 4 lines
Just for kicks, I tried passing esp_bus_reset_settle, but it doesn't change the result at all.
I also grabbed a log with
esp_debug47, that log is attached.A serial driver change breaking SCSI is a new one on me :-)
Believe me, I was a bit stunned about it as well.
Let me know what debugging I can provide for this.
~spot
David Miller
maintainerFrom: "Tom \"spot\" Callaway" <[email protected]>
Date: Wed, 23 May 2007 16:56:59 -0500
Quoted 12 lines · David Miller
Quoted 9 lines
From: "Tom \"spot\" Callaway" <[email protected]>
Date: Wed, 23 May 2007 14:04:02 -0500Quoted 4 lines
Just for kicks, I tried passing esp_bus_reset_settle, but it doesn't change the result at all.
I also grabbed a log with
esp_debug47, that log is attached.Does this fix the problem?
Nope. No change. Do you want the
esp_debug47 from that?
No, thanks for testing.
I'll dig some more.
David Miller
maintainerFrom: "Tom \"spot\" Callaway" <[email protected]>
Date: Wed, 23 May 2007 16:56:59 -0500
Quoted 12 lines · David Miller
Quoted 9 lines
From: "Tom \"spot\" Callaway" <[email protected]>
Date: Wed, 23 May 2007 14:04:02 -0500Quoted 4 lines
Just for kicks, I tried passing esp_bus_reset_settle, but it doesn't change the result at all.
I also grabbed a log with
esp_debug47, that log is attached.Does this fix the problem?
Nope. No change. Do you want the
esp_debug47 from that?
Tom, can you double check that you ran with my fix applied? I'm not doubting you, I'll explain why I'm asking this, and your hunch to mess around with esp_bus_reset_settle was a good one.
The disk is returning the following sense code:
sshdr->response_code = 0x70;sshdr->sense_key = 0x06;sb_len = 18;sshdr->asc = 0x29;sshdr->ascq = 0x02;
This means UNIT_ATTENTION with 0x29+0x02 supplemental status.
The UNIT_ATTENTION is fine, but the supplemental status is the kind a device gives if you try to talk to it too soon after a reset.
Therefore what I am sure is happening is that the ssleep() in scsi_esp_register() is not waiting long enough, and in fact I think it's returning immediately.
This would be consistent with a corrupted value of the 'current' task register which is exactly what my patch would fix.
I went over this serial console change and your trace a few times and I think it's worth double checking :-)
Quoted 12 lines · David Miller
From: "Tom \"spot\" Callaway" <[email protected]>
Date: Wed, 23 May 2007 16:56:59 -0500Quoted 9 lines · David Miller
Quoted 8 lines
From: "Tom \"spot\" Callaway" <[email protected]>
Date: Wed, 23 May 2007 14:04:02 -0500Quoted 4 lines
Just for kicks, I tried passing esp_bus_reset_settle=10, but it doesn't change the result at all.
I also grabbed a log with esp_debug=2047, that log is attached.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Does this fix the problem?
Nope. No change. Do you want the esp_debug=2047 from that?
Tom, can you double check that you ran with my fix applied? I'm not doubting you, I'll explain why I'm asking this, and your hunch to mess around with
esp_bus_reset_settlewas a good one.
I double checked it this morning, and that fix was definitely applied.
I made a new kernel anyways, simply to be thorough. The new kernel, which DEFINITELY has the patch applied shows the same esp symptoms.
I took a log of it booting with esp_debug=2047 and the esp debugging was identical.
So, while I certainly don't disagree with your findings, this is not the resolution to the problem.
~spot
SPARCstation 4, No Keyboard
ROM Rev. 2.24, 160 MB memory installed, Serial #7966051. Ethernet address 8:0:20:79:8d:63, Host ID: 80798d63.
Initializing Memory |/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\
Rebooting with command:
Boot device: /iommu/sbus/espdma/esp/sd@3,0:c File and args:
SILO Version 1.4.11
\
Welcome to Aurora SPARC Linux!
Hit <TAB> for boot options
boot:
1.3149.6 1.3149.3 1.3149.2 1.3062.9 1.2986 1.2906.4 spot1 debian
boot: 1.3149.6
|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/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\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-PROMLIB: obio_ranges 1 OF stdout device is: /obio/zs@0,100000:aBooting Linux...
PROMLIB: Sun Boot Prom Version 3 Revision 2
Linux version 2.6.21-1.3149.al3.6 (root@odyssey) (gcc version 4.1.1 20060629 (Red Hat 4.1.1-6)) #1 Thu May 24 08:17:08 EDT 2007
ARCH: SUN4M
TYPE: SPARCstation 4
Ethernet address: 8:0:20:79:8d:63
Boot time fixup v1.6. 4/Mar/98 Jakub Jelinek ([email protected]). Patching kernel for srmmu[Fujitsu Swift]/iommu
OF stdout device is: /obio/zs@0,100000:aPROM: Built device tree with 20312 bytes of memory.
Power off control detected.
Built 1 zonelists. Total pages: 39033
Kernel command line: ro root=LABEL=/ stop-a=1
PID hash table entries: 1024 (order: 10, 4096 bytes)start_kernel(): bug: interrupts were enabled early
Console: colour dummy device 80x25
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 153528k/163508k available (1676k kernel code, 9816k reserved, 428k data, 144k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
IOMMU: impl 0 vers 4 table 0xf0640000[262144 B] map [65536 b]
sbus0: Clock 22.0 MHz
dma0: Revision 2
dma1: Revision 2
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
checking if image is initramfs... it is
Freeing initrd memory: 3686k freed
ioremap: done with statics, switching to malloc
apc: power management initialized
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 144x56
/iommu@0,10000000/sbus@0,10001000/SUNW,tcx@2,800000: TCX at 0:50800000, 8-bit onlyffd35080: ttyS0 at MMIO 0x71100000 (irq = 44) is a zs
Console: ttyS0 (SunZilog zs0)ffd35080: ttyS1 at MMIO 0x71100004 (irq = 44) is a zsffd35134: Keyboard at MMIO 0x71000000 (irq = 44) is a zsffd35134: Mouse at MMIO 0x71000004 (irq = 44) is a zs
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksizertc_sun_init: Registered Mostek RTC driver.
mice: PS/2 mouse device common for all mice
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Freeing unused kernel memory: 144k freed
input: Sun Mouse as /class/input/input0
Red Hat nash version 6.0.9 starting
Mounting proc filesystem
Mounting sysfs filesystem
Creating /dev
Creating initial device nodes
Setting up hotplug.
Creating block device nodes.
Loading jbd.ko module
Loading ext3.ko module
Loading scsi_mod.ko module
SCSI subsystem initialized
Loading sd_mod.ko module
Loading scsi_transport_spi.ko module
Loading esp.ko module
scsi0 : esp
esp: esp0 found at /iommu@0,10000000/sbus@0,10001000/espdma@4,8400000/esp@4,8800000, regs[fd117000:fd00f000] irq[36]
esp: esp0 is a FAS100A, 40 MHz (ccf=0), SCSI ID 7
ESP: tgt[0] lun[0] scsi_cmd [ 12 00 00 00 24 da ]
ESP: intr sreg[80] seqreg[00] sreg2[00] ireg[20]
ESP: tgt[1] lun[0] scsi_cmd [ 12 00 00 00 24 da ]
ESP: intr sreg[80] seqreg[00] sreg2[00] ireg[20]
ESP: tgt[2] lun[0] scsi_cmd [ 12 00 00 00 24 da ]
ESP: intr sreg[80] seqreg[00] sreg2[00] ireg[20]
ESP: tgt[3] lun[0] scsi_cmd [ 12 00 00 00 24 da ]
ESP: intr sreg[93] seqreg[00] sreg2[00] ireg[18]
ESP: intr sreg[97] seqreg[04] sreg2[00] ireg[08]
ESP: intr sreg[90] seqreg[04] sreg2[00] ireg[20]
ESP: Command done status[2] message[0]
esp0: Doing auto-sense for tgt[3] lun[0]
ESP: intr sreg[91] seqreg[04] sreg2[00] ireg[18]
ESP: start data addr[f0005d40] len[96] write(1)
ESP: intr sreg[83] seqreg[04] sreg2[00] ireg[10]
ESP: data done csr[a6400310] flgs[5] sent[18]
ESP: intr sreg[87] seqreg[04] sreg2[00] ireg[08]
ESP: intr sreg[80] seqreg[04] sreg2[00] ireg[20]
ESP: Command done status[0] message[0]
esp0: tgt[3] lun[0] AUTO SENSE[ 70 00 06 00 00 00 00 0a 00 00 00 00 29 02 02 00 00 00 ]
ESP: tgt[4] lun[0] scsi_cmd [ 12 00 00 00 24 da ]
ESP: intr sreg[80] seqreg[04] sreg2[00] ireg[20]
ESP: tgt[5] lun[0] scsi_cmd [ 12 00 00 00 24 da ]
ESP: intr sreg[80] seqreg[00] sreg2[00] ireg[20]
ESP: tgt[6] lun[0] scsi_cmd [ 12 00 00 00 24 da ]
ESP: intr sreg[93] seqreg[00] sreg2[00] ireg[18]
ESP: intr sreg[97] seqreg[04] sreg2[00] ireg[08]
ESP: intr sreg[90] seqreg[04] sreg2[00] ireg[20]
ESP: Command done status[2] message[0]
esp0: Doing auto-sense for tgt[6] lun[0]
ESP: intr sreg[91] seqreg[04] sreg2[00] ireg[18]
ESP: start data addr[f0009d40] len[96] write(1)
ESP: intr sreg[83] seqreg[04] sreg2[00] ireg[10]
ESP: data done csr[a6400310] flgs[5] sent[18]
ESP: intr sreg[87] seqreg[04] sreg2[00] ireg[08]
ESP: intr sreg[80] seqreg[04] sreg2[00] ireg[20]
ESP: Command done status[0] message[0]
esp0: tgt[6] lun[0] AUTO SENSE[ 70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 c9 00 05 ]
Creating root device.
Mounting root filesystem.
mount: could not find filesystem '/dev/root'
Setting up other filesystems.
Setting up new root fs
Kernel panic - not syncing: Attempted to kill init!
sePress Stop-A (L1-A) to return to the boot prom
tuproot: moving /dev failed: No such file or directory no fstab.sys, mounting internal defaults
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory Switching to new root and running init. unmounting old /dev
unmounting old /proc
unmounting old /sys
switchroot: mount failed: No such file or directory Booting has failed.
David Miller
maintainerFrom: "Tom \"spot\" Callaway" <[email protected]>
Date: Thu, 24 May 2007 08:12:58 -0500
Quoted 2 lines
So, while I certainly don't disagree with your findings, this is not the resolution to the problem.
Thanks for double checking everything Tom.
I'm going to put this patch on the back burner for now until I come up with some better ideas or some ways to diagnose this further.
I'd suggest you don't put it into your tree until I find a way to resolve this regression.
Quoted 6 lines · David Miller
From: "Tom \"spot\" Callaway" <[email protected]>
Date: Thu, 24 May 2007 08:12:58 -0500Quoted 2 lines
So, while I certainly don't disagree with your findings, this is not the resolution to the problem.
Quoted 8 lines
Thanks for double checking everything Tom.
I'm going to put this patch on the back burner for now until I come up with some better ideas or some ways to diagnose this further.
I'd suggest you don't put it into your tree until I find a way to resolve this regression.
Well, I've spent a fair amount of time trying to figure this out, and I'm glad to say that while I'm not exactly sure why this patch was causing the failure, it was not this patch. I discovered that other patches would also cause the esp driver to stop working, which was baffling.
Eventually, I discovered the failure was the kernel configuration options I'd chosen. When I altered the sparc32 kernel config options to closer match those of my working sparc64 kernel config, everything started working properly.
I've tested this patch on the SS4 with my new configuration, and it works great. So, take this one off the back-burner and feel free to apply. :)
Sorry for the confusion.
~spot