Netdev List
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Borislav Petkov <petkov@uni-muenster.de>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] remove check_region from PnPWakeUp routine of Eepro ISA driver
Date: Wed, 21 Sep 2005 23:09:15 -0700	[thread overview]
Message-ID: <20050921230915.364f0ac9.akpm@osdl.org> (raw)
In-Reply-To: <20050922060030.GB19049@gollum.tnic>

Borislav Petkov <petkov@uni-muenster.de> wrote:
>
>  Hi,
> 
>  The following patch removes the check_region call in the PnPWakeUp
>  path in the Eepro /10 ISA driver. Instead, now it calls request_region
>  for the PnP wake up routine and, after succeeding, it calls release_region
>  for the actual reservation of I/O ports takes place in the eepro_probe1() 
>  function straight afterwards.
> 
>  Signed-off-by: Borislav Petkov <petkov@uni-muenster.de>
> 
> 
> --- drivers/net/eepro.c.orig	2005-09-22 06:20:28.000000000 +0200
> +++ drivers/net/eepro.c	2005-09-22 07:20:16.000000000 +0200
> @@ -552,7 +552,7 @@ static int __init do_eepro_probe(struct 
>  	{
>  		unsigned short int WS[32]=WakeupSeq;
>  
> -		if (check_region(WakeupPort, 2)==0) {
> +		if (request_region(WakeupPort, 2, DRV_NAME)) {
>  
>  			if (net_debug>5)
>  				printk(KERN_DEBUG "Waking UP\n");
> @@ -563,6 +563,8 @@ static int __init do_eepro_probe(struct 
>  				outb_p(WS[i],WakeupPort);
>  				if (net_debug>5) printk(KERN_DEBUG ": %#x ",WS[i]);
>  			}
> +			release_region(WakeupPort, 2);
> +
>  		} else printk(KERN_WARNING "Checkregion Failed!\n");
>  	}
>  #endif

hm, that's all a bit strange.  It would be better to do the
request_region() just once and if that works, retain the reservation rather
than releasing and reacquiring it.

That being said, the code you've modified is disabled due to
!defined(PnPWakeup), and the chances of anyone ever changing that are close
to zero.

  reply	other threads:[~2005-09-22  6:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-22  6:00 [PATCH] remove check_region from PnPWakeUp routine of Eepro ISA driver Borislav Petkov
2005-09-22  6:09 ` Andrew Morton [this message]
2005-09-22  6:29   ` Borislav Petkov
2005-09-22  6:37     ` Andrew Morton

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=20050921230915.364f0ac9.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=petkov@uni-muenster.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox