From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: benh@kernel.crashing.org
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] ide-pmac: media-bay support fixes
Date: Tue, 24 Jun 2008 20:55:11 +0200 [thread overview]
Message-ID: <200806242055.12042.bzolnier@gmail.com> (raw)
In-Reply-To: <200806242051.22207.bzolnier@gmail.com>
On Tuesday 24 June 2008, Bartlomiej Zolnierkiewicz wrote:
> On Tuesday 24 June 2008, Benjamin Herrenschmidt wrote:
> >
> > > Build error and/or your build fix would be useful here.
> >
> > Sorry. Fix was a quick hack. There is a check_media_bay() followed by a
> > break; outside of a break-able construct in there (off memory, I'm not
> > in front of the dev box right now).
>
> Thanks, 'take 3' follows.
>
> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Subject: [PATCH] ide-pmac: media-bay support fixes (take 3)
[...]
and patch #2/4 required a trivial fix for a reject
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] ide-pmac: add ->init_dev method (take 3)
v2/3:
* Build fixes from Stephen Rothwell.
There should be no functional changes caused by this patch.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/ppc/pmac.c | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
Index: b/drivers/ide/ppc/pmac.c
===================================================================
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -941,7 +941,23 @@ static u8 pmac_ide_cable_detect(ide_hwif
return ATA_CBL_PATA40;
}
+static void pmac_ide_init_dev(ide_drive_t *drive)
+{
+ ide_hwif_t *hwif = drive->hwif;
+ pmac_ide_hwif_t *pmif =
+ (pmac_ide_hwif_t *)dev_get_drvdata(hwif->gendev.parent);
+
+ if (pmif->mediabay) {
+#ifdef CONFIG_PMAC_MEDIABAY
+ if (check_media_bay(pmif->node->parent, MB_CD) == -ENODEV)
+ return;
+#endif
+ drive->noprobe = 1;
+ }
+}
+
static const struct ide_port_ops pmac_ide_ata6_port_ops = {
+ .init_dev = pmac_ide_init_dev,
.set_pio_mode = pmac_ide_set_pio_mode,
.set_dma_mode = pmac_ide_set_dma_mode,
.selectproc = pmac_ide_kauai_selectproc,
@@ -949,6 +965,7 @@ static const struct ide_port_ops pmac_id
};
static const struct ide_port_ops pmac_ide_ata4_port_ops = {
+ .init_dev = pmac_ide_init_dev,
.set_pio_mode = pmac_ide_set_pio_mode,
.set_dma_mode = pmac_ide_set_dma_mode,
.selectproc = pmac_ide_selectproc,
@@ -956,6 +973,7 @@ static const struct ide_port_ops pmac_id
};
static const struct ide_port_ops pmac_ide_port_ops = {
+ .init_dev = pmac_ide_init_dev,
.set_pio_mode = pmac_ide_set_pio_mode,
.set_dma_mode = pmac_ide_set_dma_mode,
.selectproc = pmac_ide_selectproc,
@@ -1065,17 +1083,6 @@ pmac_ide_setup_device(pmac_ide_hwif_t *p
hwif->index, model_name[pmif->kind], pmif->aapl_bus_id,
pmif->mediabay ? " (mediabay)" : "", hwif->irq);
- if (pmif->mediabay) {
-#ifdef CONFIG_PMAC_MEDIABAY
- if (check_media_bay(np->parent, MB_CD) != -ENODEV) {
-#else
- if (1) {
-#endif
- hwif->drives[0].noprobe = 1;
- hwif->drives[1].noprobe = 1;
- }
- }
-
idx[0] = hwif->index;
ide_device_add(idx, &d);
next prev parent reply other threads:[~2008-06-24 18:53 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-16 19:24 [PATCH 1/4] ide-pmac: media-bay support fixes Bartlomiej Zolnierkiewicz
2008-06-17 3:39 ` Benjamin Herrenschmidt
2008-06-17 3:49 ` Benjamin Herrenschmidt
2008-06-17 9:41 ` Bartlomiej Zolnierkiewicz
2008-06-17 9:58 ` Bartlomiej Zolnierkiewicz
2008-06-23 5:35 ` Benjamin Herrenschmidt
2008-06-23 5:54 ` Benjamin Herrenschmidt
2008-06-23 6:41 ` Benjamin Herrenschmidt
2008-06-23 10:47 ` Benjamin Herrenschmidt
2008-06-23 21:45 ` Bartlomiej Zolnierkiewicz
2008-06-24 10:33 ` Benjamin Herrenschmidt
2008-06-23 21:00 ` Bartlomiej Zolnierkiewicz
2008-06-24 10:34 ` Benjamin Herrenschmidt
2008-06-24 18:51 ` Bartlomiej Zolnierkiewicz
2008-06-24 18:55 ` Bartlomiej Zolnierkiewicz [this message]
2008-06-26 4:54 ` Benjamin Herrenschmidt
2008-06-26 8:51 ` Bartlomiej Zolnierkiewicz
2008-06-26 9:01 ` Benjamin Herrenschmidt
2008-06-26 9:40 ` Bartlomiej Zolnierkiewicz
2008-07-03 5:33 ` Benjamin Herrenschmidt
2008-07-03 6:47 ` Benjamin Herrenschmidt
2008-07-03 7:33 ` Benjamin Herrenschmidt
2008-07-05 15:56 ` Bartlomiej Zolnierkiewicz
2008-07-05 22:25 ` Benjamin Herrenschmidt
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=200806242055.12042.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=benh@kernel.crashing.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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).