linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: Jens Axboe <axboe@suse.de>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	linux-ide@vger.kernel.org,
	PARISC list <parisc-linux@lists.parisc-linux.org>,
	Kyle McMartin <kyle@parisc-linux.org>
Subject: Re: [parisc-linux] Re: Why toggle_bounce only for disks?
Date: Fri, 19 Aug 2005 09:32:02 -0400	[thread overview]
Message-ID: <1124458322.5130.18.camel@mulgrave> (raw)
In-Reply-To: <20050819102132.GM6273@suse.de>

On Fri, 2005-08-19 at 12:21 +0200, Jens Axboe wrote:
> Because not bouncing is a performance optimization and I only did the
> work on ide-cd to allow it. Your patch breaks ide-cd on highmem i386
> machines, so it's not acceptable.
> 
> Tells us more about this crash instead, I'm pretty sure you are working
> around another issue (your io-mmu code, is it hardware or software?)
> somehwere with this patch.

OK, so the particular fix is wrong; but the logic in ide_toggle_bounce()
is also incorrec.  Our problem is not that we don't want to bounce
highmem in ide-cd, it's that this is a parisc system with an IOMMU and
doesn't have any highmem to begin with.

we need ide_toggle_bounce to return BLK_BOUNCE_ANY always if
PCI_DMA_BUS_IS_PHYS is not set.

James

diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c
--- a/drivers/ide/ide-lib.c
+++ b/drivers/ide/ide-lib.c
@@ -410,10 +410,10 @@ void ide_toggle_bounce(ide_drive_t *driv
 {
 	u64 addr = BLK_BOUNCE_HIGH;	/* dma64_addr_t */
 
-	if (on && drive->media == ide_disk) {
-		if (!PCI_DMA_BUS_IS_PHYS)
-			addr = BLK_BOUNCE_ANY;
-		else if (HWIF(drive)->pci_dev)
+	if (!PCI_DMA_BUS_IS_PHYS)
+		addr = BLK_BOUNCE_ANY;
+	else if (on && drive->media == ide_disk) {
+		if (HWIF(drive)->pci_dev)
 			addr = HWIF(drive)->pci_dev->dma_mask;
 	}
 



  reply	other threads:[~2005-08-19 13:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-06 23:56 Why toggle_bounce only for disks? Kyle McMartin
2005-08-19 10:07 ` Bartlomiej Zolnierkiewicz
2005-08-19 10:21   ` Jens Axboe
2005-08-19 13:32     ` James Bottomley [this message]
2005-08-19 14:03       ` [parisc-linux] " Jens Axboe

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=1124458322.5130.18.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=axboe@suse.de \
    --cc=bzolnier@gmail.com \
    --cc=kyle@parisc-linux.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=parisc-linux@lists.parisc-linux.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).