mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@it.uu.se>
To: Jeff Norden <jeff@math.tntech.edu>
Cc: alan@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] pata_it821x: fix lost interrupt with atapi devices
Date: Tue, 4 Sep 2007 20:43:44 +0200	[thread overview]
Message-ID: <18141.42848.537873.349518@alkaid.it.uu.se> (raw)
In-Reply-To: <200709041607.l84G7KsT032647@norden.math.tntech.edu>

Jeff Norden writes:
 >  From: Jeff Norden <jnorden@math.tntech.edu>
 > 
 > Fix "lost" interrupt problem when using dma with CD/DVD drives in some
 > configurations.  This problem can make installing linux from media
 > impossible for distro's that have switched to libata-only configurations.
 > 
 > The simple fix is to eliminate the use of dma for reading drive status, etc,
 > by checking the number of bytes to transferred.
 > 
 > This change will only affect the behavior of atapi devices, not disks.
 > There is more info at http://bugzilla.redhat.com/show_bug.cgi?id=242229
 > This patch is for 2.6.22.1
 > 
 > Signed-off-by: Jeff Norden <jnorden@math.tntech.edu>
 > 
 > ---
 > 
 > --- pata_it821x.c.orig	2007-08-16 14:20:49.000000000 -0500
 > +++ pata_it821x.c	2007-08-31 16:09:22.000000000 -0500
 > @@ -533,6 +533,10 @@ static int it821x_check_atapi_dma(struct
 >  	struct ata_port *ap = qc->ap;
 >  	struct it821x_dev *itdev = ap->private_data;
 >  
 > +	/* Only use dma for transfers to/from the media. */
 > +	if (qc->nbytes < 2048)
 > +		return -EOPNOTSUPP;
 > +
 >  	/* No ATAPI DMA in smart mode */
 >  	if (itdev->smart)
 >  		return -EOPNOTSUPP;
 > 

This looks like a gross hack. Aren't you supposed to inspect
the command instead and whitelist the ones you know are OK,
like pata_pdc2027x.c and sata_promise.c do?

  reply	other threads:[~2007-09-04 18:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-04 16:07 Jeff Norden
2007-09-04 18:43 ` Mikael Pettersson [this message]
2007-09-06  0:39   ` Alan Cox
2007-09-17  5:00     ` Tejun Heo
2007-09-17 10:00       ` Jeff Garzik
2007-09-17 11:46         ` Tejun Heo
2007-09-18  9:14           ` Alan Cox
2007-09-18  9:07       ` Alan Cox
2007-09-11  1:53 ` Jeff Garzik

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=18141.42848.537873.349518@alkaid.it.uu.se \
    --to=mikpe@it.uu.se \
    --cc=alan@redhat.com \
    --cc=jeff@math.tntech.edu \
    --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

all inboxes | Powered by JetHome®