linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* a bug in 8250.c
@ 2002-09-29  2:15 Hu Gang
  2002-09-29  8:17 ` Russell King
  0 siblings, 1 reply; 2+ messages in thread
From: Hu Gang @ 2002-09-29  2:15 UTC (permalink / raw)
  To: Linux Kernel

[-- Attachment #1: Type: text/plain, Size: 984 bytes --]

Hi Russell King:

In serial8250_request_std_resource@825.c, if all is pass it return 0, or failed return -XX, But you use 
        ret = serial8250_request_std_resource(up, &res_std);
->      if (ret)
                return;
I'm guess it use as . 
->      if (ret == 0) 

After change code, 2.5.39 Can found my modem.
Please check, If not proble, Please apply.
--------------
Here is the patch.
--- 8250.c	Sat Sep 28 11:15:16 2002
+++ 8250.c~fix	Sat Sep 28 22:07:36 2002
@@ -1564,7 +1564,7 @@
 
 	if (up->port.type == PORT_RSA) {
 		ret = serial8250_request_rsa_resource(up, &res_rsa);
-		if (ret)
+		if (ret == 0)
 			return ret;
 	}
 
@@ -1611,11 +1611,11 @@
 	 * tells us whether we can probe for the type of port.
 	 */
 	ret = serial8250_request_std_resource(up, &res_std);
-	if (ret)
+	if (ret == 0)
 		return;
 
 	ret = serial8250_request_rsa_resource(up, &res_rsa);
-	if (ret)
+	if (ret == 0)
 		probeflags &= ~PROBE_RSA;
 
 	if (flags & UART_CONFIG_TYPE)


-- 
		- Hu Gang



[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: a bug in 8250.c
  2002-09-29  2:15 a bug in 8250.c Hu Gang
@ 2002-09-29  8:17 ` Russell King
  0 siblings, 0 replies; 2+ messages in thread
From: Russell King @ 2002-09-29  8:17 UTC (permalink / raw)
  To: Hu Gang; +Cc: Linux Kernel List, Linus Torvalds

On Sun, Sep 29, 2002 at 10:15:23AM +0800, Hu Gang wrote:
> In serial8250_request_std_resource@825.c, if all is pass it return 0, or failed return -XX, But you use 
>         ret = serial8250_request_std_resource(up, &res_std);
> ->      if (ret)
>                 return;
> I'm guess it use as . 
> ->      if (ret == 0) 

This is very wrong.

If we claim the resource, we fail in this function.  If we don't claim,
we succeed.

> After change code, 2.5.39 Can found my modem.

I guess you've got a resource clash.  Can you remove this patch from your
system, and then send the kernel boot messages, and the contents of
/proc/iomem and /proc/ioports please.

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-09-29  8:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-29  2:15 a bug in 8250.c Hu Gang
2002-09-29  8:17 ` Russell King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).