public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Finn Thain <fthain@telegraphics.com.au>,
	David Miller <davem@davemloft.net>,
	Roman Zippel <zippel@linux-m68k.org>,
	linux-scsi@vger.kernel.org, linux-m68k@vger.kernel.org
Subject: Re: [PATCH] new mac_scsi driver
Date: Fri, 25 Apr 2008 21:43:57 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0804252141310.9235@anakin> (raw)
In-Reply-To: <1209135790.3087.8.camel@localhost.localdomain>

On Fri, 25 Apr 2008, James Bottomley wrote:
> On Fri, 2008-04-25 at 11:06 +1000, Finn Thain wrote:
> > On Thu, 24 Apr 2008, James Bottomley wrote:
> > > On Thu, 2008-04-24 at 23:08 +0200, Geert Uytterhoeven wrote:
> > > > On Thu, 24 Apr 2008, Finn Thain wrote:
> > > > > Replace the mac_esp driver with a new one based on the esp_scsi 
> > > > > core.
> > > > > 
> > > > > For esp_scsi: add support for sync transfers for the PIO mode, add a 
> > > > > new esp_driver_ops method to get the maximum dma transfer size (like 
> > > > > the old NCR53C9x driver), and some cleanups.
> > > > 
> > > > Thanks!
> > > > 
> > > > I added this patch to my series, after fixing the few checkpatch.pl 
> > > > issues and adding a test for MACH_IS_MAC() to esp_mac_probe().

> However, this:
> 
> 
> > +static int __devinit esp_mac_probe(struct platform_device *dev)
> > +{
> > +	struct scsi_host_template *tpnt = &scsi_esp_template;
> > +	struct Scsi_Host *host;
> > +	struct esp *esp;
> > +	int err;
> > +	int chips_present;
> > +	struct mac_esp_priv *mep;
> > +
> > +	if (!MACH_IS_MAC)
> > +		return -ENODEV;
> 
> Looks strange ... it seems you have to do this because macintosh_config
> which is used later can be uninitialised (i.e. pointing to rubbish) if
> it's not set?

Yep. A multi-platform kernel may even not be running on a Mac at all.

The proper fix is to add the platform device in the Mac setup code only when
running on a Mac where the actual SCSI hardware is present, but that's
currently not done for any of the m68k platform drivers.
Also cfr. http://lkml.org/lkml/2008/4/24/366.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

      reply	other threads:[~2008-04-25 19:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-24  7:30 [PATCH] new mac_scsi driver Finn Thain
2008-04-24  7:56 ` David Miller
2008-04-24 21:08 ` Geert Uytterhoeven
2008-04-24 21:33   ` James Bottomley
2008-04-25  1:06     ` Finn Thain
2008-04-25 15:03       ` James Bottomley
2008-04-25 19:43         ` Geert Uytterhoeven [this message]

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=Pine.LNX.4.64.0804252141310.9235@anakin \
    --to=geert@linux-m68k.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=davem@davemloft.net \
    --cc=fthain@telegraphics.com.au \
    --cc=linux-m68k@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=zippel@linux-m68k.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