From: KOBAYASHI R. Taizo <hidden> Date: 2001-09-28 05:33:01
Hi
Since /drivers/char/serial.c was updated to "5.05c","2001-07-08",
system clash when pcmcia modem cards ejects.
I examined this problem and had a question.
Dose it need following branch?
================L5375==
#ifdef CONFIG_ALL_PPC
/* early PowerMacs would machine check */
if (_machine == _MACH_Pmac) {
printk(KERN_INFO "serial.c: nothing to do on PowerMacs.\n");
return 0;
}
#endif
=======================
Anyway, pcmcia modem card on my TiBook seems work fine with following patch.
Thanks.
Taizo
On Fri, Sep 28, 2001 at 02:33:01PM +0900, KOBAYASHI R. Taizo wrote:
I examined this problem and had a question.
Dose it need following branch?
================L5375==
#ifdef CONFIG_ALL_PPC
/* early PowerMacs would machine check */
if (_machine == _MACH_Pmac) {
printk(KERN_INFO "serial.c: nothing to do on PowerMacs.\n");
return 0;
}
#endif
=======================
Some older machines apparently do. The current 'workaround' in 2_4 is
#if defined(CONFIG_ALL_PPC) && !defined(MODULE).
quoted hunk
Anyway, pcmcia modem card on my TiBook seems work fine with following patch.
From: David A. Gatwood <hidden> Date: 2001-09-28 17:41:23
On Friday, September 28, 2001, at 08:15 AM, Tom Rini wrote:
On Fri, Sep 28, 2001 at 02:33:01PM +0900, KOBAYASHI R. Taizo wrote:
quoted
I examined this problem and had a question.
Dose it need following branch?
================L5375==
#ifdef CONFIG_ALL_PPC
/* early PowerMacs would machine check */
if (_machine == _MACH_Pmac) {
printk(KERN_INFO "serial.c: nothing to do on
PowerMacs.\n");
return 0;
}
#endif
=======================
Some older machines apparently do. The current 'workaround' in 2_4 is
#if defined(CONFIG_ALL_PPC) && !defined(MODULE).
That's disgusting. This should be doing the Linux equivalent of setjmp
and trapping the machine check and returning 0. Hardware probes
shouldn't need hacks like this. Just my $0.02.
David
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
On Fri, Sep 28, 2001 at 10:41:23AM -0700, David A. Gatwood wrote:
On Friday, September 28, 2001, at 08:15 AM, Tom Rini wrote:
quoted
On Fri, Sep 28, 2001 at 02:33:01PM +0900, KOBAYASHI R. Taizo wrote:
quoted
I examined this problem and had a question.
Dose it need following branch?
================L5375==
#ifdef CONFIG_ALL_PPC
/* early PowerMacs would machine check */
if (_machine == _MACH_Pmac) {
printk(KERN_INFO "serial.c: nothing to do on
PowerMacs.\n");
return 0;
}
#endif
=======================
Some older machines apparently do. The current 'workaround' in 2_4 is
#if defined(CONFIG_ALL_PPC) && !defined(MODULE).
That's disgusting. This should be doing the Linux equivalent of setjmp
and trapping the machine check and returning 0. Hardware probes
shouldn't need hacks like this. Just my $0.02.
Thats what should be happening. But apparently it still doesn't on a few
older machines. Or it didn't the last time I got an answer out of Olaf@SuSE.
--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
From: David A. Gatwood <hidden> Date: 2001-09-28 18:26:20
On Friday, September 28, 2001, at 11:05 AM, Tom Rini wrote:
On Fri, Sep 28, 2001 at 10:41:23AM -0700, David A. Gatwood wrote:
quoted
On Friday, September 28, 2001, at 08:15 AM, Tom Rini wrote:
quoted
On Fri, Sep 28, 2001 at 02:33:01PM +0900, KOBAYASHI R. Taizo wrote:
quoted
I examined this problem and had a question.
Dose it need following branch?
================L5375==
#ifdef CONFIG_ALL_PPC
/* early PowerMacs would machine check */
if (_machine == _MACH_Pmac) {
printk(KERN_INFO "serial.c: nothing to do on
PowerMacs.\n");
return 0;
}
#endif
=======================
Some older machines apparently do. The current 'workaround' in 2_4 is
#if defined(CONFIG_ALL_PPC) && !defined(MODULE).
That's disgusting. This should be doing the Linux equivalent of setjmp
and trapping the machine check and returning 0. Hardware probes
shouldn't need hacks like this. Just my $0.02.
Thats what should be happening. But apparently it still doesn't on a
few
older machines. Or it didn't the last time I got an answer out of
Olaf@SuSE.
Sounds like a lowmem_vectors problem or similar. What machine and
processor?
David
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
On Fri, Sep 28, 2001 at 11:26:20AM -0700, David A. Gatwood wrote:
On Friday, September 28, 2001, at 11:05 AM, Tom Rini wrote:
quoted
On Fri, Sep 28, 2001 at 10:41:23AM -0700, David A. Gatwood wrote:
quoted
On Friday, September 28, 2001, at 08:15 AM, Tom Rini wrote:
quoted
On Fri, Sep 28, 2001 at 02:33:01PM +0900, KOBAYASHI R. Taizo wrote:
quoted
I examined this problem and had a question.
Dose it need following branch?
================L5375==
#ifdef CONFIG_ALL_PPC
/* early PowerMacs would machine check */
if (_machine == _MACH_Pmac) {
printk(KERN_INFO "serial.c: nothing to do on
PowerMacs.\n");
return 0;
}
#endif
=======================
Some older machines apparently do. The current 'workaround' in 2_4 is
#if defined(CONFIG_ALL_PPC) && !defined(MODULE).
That's disgusting. This should be doing the Linux equivalent of setjmp
and trapping the machine check and returning 0. Hardware probes
shouldn't need hacks like this. Just my $0.02.
Thats what should be happening. But apparently it still doesn't on a
few
older machines. Or it didn't the last time I got an answer out of
Olaf@SuSE.
Sounds like a lowmem_vectors problem or similar. What machine and
processor?
From: Olaf Hering <hidden> Date: 2001-09-28 18:53:30
On Fri, Sep 28, Tom Rini wrote:
On Fri, Sep 28, 2001 at 11:26:20AM -0700, David A. Gatwood wrote:
quoted
On Friday, September 28, 2001, at 11:05 AM, Tom Rini wrote:
quoted
On Fri, Sep 28, 2001 at 10:41:23AM -0700, David A. Gatwood wrote:
quoted
On Friday, September 28, 2001, at 08:15 AM, Tom Rini wrote:
quoted
On Fri, Sep 28, 2001 at 02:33:01PM +0900, KOBAYASHI R. Taizo wrote:
quoted
I examined this problem and had a question.
Dose it need following branch?
================L5375==
#ifdef CONFIG_ALL_PPC
/* early PowerMacs would machine check */
if (_machine == _MACH_Pmac) {
printk(KERN_INFO "serial.c: nothing to do on
PowerMacs.\n");
return 0;
}
#endif
=======================
Some older machines apparently do. The current 'workaround' in 2_4 is
#if defined(CONFIG_ALL_PPC) && !defined(MODULE).
That's disgusting. This should be doing the Linux equivalent of setjmp
and trapping the machine check and returning 0. Hardware probes
shouldn't need hacks like this. Just my $0.02.
Thats what should be happening. But apparently it still doesn't on a
few
older machines. Or it didn't the last time I got an answer out of
Olaf@SuSE.
Sounds like a lowmem_vectors problem or similar. What machine and
processor?
I think it was a 7x00 with a 601. But I'm not sure. Olaf? Is this a problem
still even?
I will try it again, later.
That hunk wasnt supposed to go into Bens tree.
Gruss Olaf
--
$ man clone
BUGS
Main feature not yet implemented...
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2001-09-29 11:50:59
That's disgusting. This should be doing the Linux equivalent of setjmp
and trapping the machine check and returning 0. Hardware probes
shouldn't need hacks like this. Just my $0.02.
I definitely don't like it neither.
Currently, we have a "feature" if inb/outb (IO macros), Machine Checks
caused by these are caught, and inb returns 0xff when the IO fails.
However, we don't do that for MMIO (readb/writeb & friends, in_le32/be32,
..).
For one thing, I beleive we could add explicit "probe" verions of these
functions that return an error code and can be used in the "probe" part
of those drivers.
But that wouldn't help in all cases. Things like legacy drivers (serial.c
is one) will try to tweak "legacy" x86 IO ports. The above workaround will
help not crashing immediately. But you are not protected against having
a real PCI device mapping IOs in this location. In this case, you'll end
up writing to this card's IOs, possibily causing all sorts of bad things.
One workaround here would be to hack in the pmac PCI code to mark the
first 64k of IO space reserved and remap any PCI device that was mapped
in this location by OF.
Another one (I'd prefer) would be for such drivers to be dynamically
configured by the arch code instead of relying on a compile-time table
of known IO ports. There is a facility to hack into the compile-time
table from arch in serial.c, but I'm not sure it completely match
our needs. Other legacy drivers (like floppy.c) would need the same
tweak.
Ben.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
From: Paul Mackerras <hidden> Date: 2001-10-01 00:12:15
KOBAYASHI R. Taizo writes:
I examined this problem and had a question.
Dose it need following branch?
================L5375==
#ifdef CONFIG_ALL_PPC
/* early PowerMacs would machine check */
if (_machine == _MACH_Pmac) {
printk(KERN_INFO "serial.c: nothing to do on PowerMacs.\n");
return 0;
}
#endif
=======================
That code has been on my hit-list for quite a while now. It's been
one of those situations where someone thinks that someone else had a
problem that was fixed by that code. Unless someone can email me
specifically with a situation where that code fixes a real problem,
that code will get deleted shortly. And if there is a real problem I
will try to find a better way to solve it that that code.
The only valid concern I have heard so far is Ben's comment that OF
might have put some other PCI device at the I/O port addresses that
are probed by the serial driver. If this has actually been a problem
for anyone I would like to hear the details.
Ultimately we should move to a scheme where each platform registers
its serial ports early on in the initialization.
-static int __devinit
+static int
+#ifndef MODULE
+__devinit
+#endif
pci_plx9050_fn(struct pci_dev *dev, struct pci_board *board, int enable)
This change is ugly and should be unnecessary. What was this trying
to achieve?
Paul.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/