netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Stephen Hemminger <shemminger@osdl.org>
Cc: "David S. Miller" <davem@redhat.com>, netdev@oss.sgi.com
Subject: Re: [PATCH] (3/8) ltpc - convert to new initialization
Date: Wed, 03 Sep 2003 20:48:42 -0400	[thread overview]
Message-ID: <3F568BEA.50904@pobox.com> (raw)
In-Reply-To: <20030903164916.2809d4a5.shemminger@osdl.org>

Stephen Hemminger wrote:
> -int __init ltpc_probe(struct net_device *dev)
> +struct net_device * __init ltpc_probe(void)
[...]
>  	/* probe for the I/O port address */
> -	if (io != 0x240 && request_region(0x220,8,"ltpc")) {
> -		x = inb_p(0x220+6);
> -		if ( (x!=0xff) && (x>=0xf0) ) {
> -			io = 0x220;
> -			portfound=1;
> -		}
> -		else {
> -			release_region(0x220,8);
> -		}
> -	}
>  	
>  	if (io != 0x220 && request_region(0x240,8,"ltpc")) {
>  		y = inb_p(0x240+6);
>  		if ( (y!=0xff) && (y>=0xf0) ){ 
>  			io = 0x240;
> -			portfound=1;
> -		}
> -		else {
> -			release_region(0x240,8);
> +			goto got_port;
>  		}
> +		release_region(0x240,8);
>  	} 
> -
> -	if(io && !portfound && request_region(io,8,"ltpc")){
> -		portfound = 1;
> -	}
> -	if(!portfound) {
> -		/* give up in despair */
> -		printk(KERN_ERR "LocalTalk card not found; 220 = %02x, 240 = %02x.\n", x,y);
> -		return -1;
> +	if (io != 0x240 && request_region(0x220,8,"ltpc")) {
> +		x = inb_p(0x220+6);
> +		if ( (x!=0xff) && (x>=0xf0) ) {
> +			io = 0x220;
> +			goto got_port;
> +		}
> +		release_region(0x220,8);
>  	}


why did the order of probing change?

It used to be "0x220 -> 0x240", now it's "0x240 -> 0x220"

	Jeff

  reply	other threads:[~2003-09-04  0:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-03 23:49 [PATCH] (3/8) ltpc - convert to new initialization Stephen Hemminger
2003-09-04  0:48 ` Jeff Garzik [this message]
2003-09-04  3:59 ` David S. Miller

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=3F568BEA.50904@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=davem@redhat.com \
    --cc=netdev@oss.sgi.com \
    --cc=shemminger@osdl.org \
    /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;
as well as URLs for NNTP newsgroup(s).