All of lore.kernel.org
 help / color / mirror / Atom feed
From: Prarit Bhargava <prarit@sgi.com>
To: Prarit Bhargava <prarit@sgi.com>
Cc: Jesse Barnes <jbarnes@engr.sgi.com>,
	Vojtech Pavlik <vojtech@suse.cz>,
	dtor_core@ameritech.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][RFC]: Clean up resource allocation in i8042 driver
Date: Mon, 14 Feb 2005 11:32:30 -0500	[thread overview]
Message-ID: <4210D29E.9000808@sgi.com> (raw)
In-Reply-To: <41F13924.50602@sgi.com>

I didn't see a final ACK on this patch -- just checking for one :)

P.

Prarit Bhargava wrote:

> I've taken into account Dmitry's comments (thanks Dmitry!) and 
> generated a new patch.
>
> Thanks,
>
> P.
> Jesse Barnes wrote:
>
>> On Friday, January 21, 2005 8:35 am, Vojtech Pavlik wrote:
>>  
>>
>>> No. But vacant ports usually return 0xff. The problem here is that 0xff
>>> is a valid value for the status register, too. Fortunately this patch
>>> checks for 0xff only after the timeout failed.
>>>   
>>
>>
>> On PCs you'll get all 1s, but on some ia64 platforms and others, 
>> you'll take a hard machine check exception if you try to access 
>> non-existent memory (mmio, port space, or otherwise).
>>
>> Jesse
>> -
>> To unsubscribe from this list: send the line "unsubscribe 
>> linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at  http://www.tux.org/lkml/
>>
>>  
>>
>------------------------------------------------------------------------
>
>===== i8042.c 1.71 vs edited =====
>--- 1.71/drivers/input/serio/i8042.c	2005-01-03 08:11:49 -05:00
>+++ edited/i8042.c	2005-01-21 11:50:11 -05:00
>@@ -696,7 +696,10 @@
> 		unsigned char param;
> 
> 		if (i8042_command(&param, I8042_CMD_CTL_TEST)) {
>-			printk(KERN_ERR "i8042.c: i8042 controller self test timeout.\n");
>+			if (i8042_read_status() != 0xFF)
>+				printk(KERN_ERR "i8042.c: i8042 controller self test timeout.\n");
>+			else
>+				printk(KERN_ERR "i8042.c: no i8042 controller found.\n");
> 			return -1;
> 		}
> 
>@@ -1016,16 +1019,22 @@
> 	i8042_aux_values.irq = I8042_AUX_IRQ;
> 	i8042_kbd_values.irq = I8042_KBD_IRQ;
> 
>-	if (i8042_controller_init())
>+	if (i8042_controller_init()) {
>+		i8042_platform_exit();
> 		return -ENODEV;
>+	}
> 
> 	err = driver_register(&i8042_driver);
>-	if (err)
>+	if (err) {
>+		i8042_platform_exit();
> 		return err;
>+	}
> 
> 	i8042_platform_device = platform_device_register_simple("i8042", -1, NULL, 0);
> 	if (IS_ERR(i8042_platform_device)) {
> 		driver_unregister(&i8042_driver);
>+		i8042_platform_exit();
>+		del_timer_sync(&i8042_timer);
> 		return PTR_ERR(i8042_platform_device);
> 	}
> 
>  
>

  reply	other threads:[~2005-02-14 16:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-21 15:14 [PATCH][RFC]: Clean up resource allocation in i8042 driver Prarit Bhargava
2005-01-21 15:43 ` Dmitry Torokhov
2005-01-21 16:35   ` Vojtech Pavlik
2005-01-21 16:43     ` Dmitry Torokhov
2005-01-21 16:47     ` Jesse Barnes
2005-01-21 17:17       ` Prarit Bhargava
2005-02-14 16:32         ` Prarit Bhargava [this message]
2005-02-14 22:46           ` Dmitry Torokhov
2005-02-15  7:21           ` Vojtech Pavlik
2005-01-21 19:26 ` Dave Jones
2005-01-21 21:47   ` Kyle Moffett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4210D29E.9000808@sgi.com \
    --to=prarit@sgi.com \
    --cc=dtor_core@ameritech.net \
    --cc=jbarnes@engr.sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vojtech@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.