mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Fries <david@fries.net>
To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: linux-kernel@vger.kernel.org, p_gortmaker@yahoo.com,
	netdev@vger.kerne.org
Subject: Re: [PATCH] ne.c fix for hibernate and rmmod oops fix
Date: Fri, 29 Aug 2008 21:27:49 -0500	[thread overview]
Message-ID: <20080830022749.GF17528@spacedout.fries.net> (raw)
In-Reply-To: <20080830.002215.128620618.anemo@mba.ocn.ne.jp>

On Sat, Aug 30, 2008 at 12:22:15AM +0900, Atsushi Nemoto wrote:
> On Wed, 27 Aug 2008 23:11:15 -0500, David Fries <david@fries.net> wrote:
> > do_ne_probe uses dev->mem_end special value 0xbad as a flag to deal
> > specially when some bad, but usable devices.  The io port platform
> > resource has a start and end, but if start is 0x300 and end is 0xbad,
> > it will just fail with io ports in use and not probe the device.  Is
> > using the flag IORESOURCE_DISABLED acceptable?  There doesn't seem to
> > be any good way to pass some extra driver dependent data through to
> > the platform probe function.
> > 
> > +	/* Bad, crippled, how about disabled?
> > +	 * Any other suggestions for passing this through?
> > +	 */
> > +	if (dev->mem_end == BAD)
> > +		r[0].flags |= IORESOURCE_DISABLED;
> 
> I'm not sure IORESOURCE_DISABLED is OK, but (ab)using r[0].name might
> be safer. Something like this:
> 
> 	if (dev->mem_end == BAD)
> 		r[0].name = "bad";

Works for me, thanks for the suggestion, it was just what I was
looking for.

> With your patch, cleanup_module() and ne_exit() is exactly same.  How
> about unifying them?

They didn't use to be the same, with all the cleanup I didn't notice
that they became the same.  ne_exit is no more, cleanup_module for
both module and built in.

> >     mdelay(10) replaced by msleep(10) to give up the CPU.
> 
> I think this part is worth to do by separate patch.

Now that you mention it, it really doesn't have anything to do with
the rest of the changes.  I suppose.  

> > +	struct resource r[2] = {
> > +		{
> > +			.name = "io_port",
> > +			.flags = IORESOURCE_IO},
> > +		{
> > +			.name = "irq",
> > +			.flags = IORESOURCE_IRQ} };
> 
> This .name initialization seems a bit redundant for me.  They can be
> left NULL.

Changed.

Thanks for the feedback, I'll submit round two shortly.

-- 
David Fries <david@fries.net>
http://fries.net/~david/ (PGP encryption key available)

  reply	other threads:[~2008-08-30  2:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-28  4:11 David Fries
2008-08-29 15:22 ` Atsushi Nemoto
2008-08-30  2:27   ` David Fries [this message]
2008-08-30 14:52     ` Atsushi Nemoto
2008-08-31 20:45       ` David Fries
2008-09-04  1:29         ` Atsushi Nemoto
2008-09-04  3:02 David Fries
2008-09-04  7:48 ` Jeff Garzik
2008-09-05  8:01 ` Paul Gortmaker
2008-09-09  2:54   ` David Fries
2008-09-11 13:50     ` Atsushi Nemoto

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=20080830022749.GF17528@spacedout.fries.net \
    --to=david@fries.net \
    --cc=anemo@mba.ocn.ne.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kerne.org \
    --cc=p_gortmaker@yahoo.com \
    /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

Powered by JetHome