public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: stern@rowland.harvard.edu, bigeasy@linutronix.de,
	Thomas.Hommel@gefanuc.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	James.Bottomley@HansenPartnership.com
Subject: Re: ISP1760 driver crashes
Date: Thu, 20 Nov 2008 08:33:01 +0100	[thread overview]
Message-ID: <20081120073301.GY26308@kernel.dk> (raw)
In-Reply-To: <20081120144125P.fujita.tomonori@lab.ntt.co.jp>

On Thu, Nov 20 2008, FUJITA Tomonori wrote:
> On Wed, 19 Nov 2008 18:21:25 +0100
> Jens Axboe <jens.axboe@oracle.com> wrote:
> 
> > On Wed, Nov 19 2008, Alan Stern wrote:
> > > On Wed, 19 Nov 2008, Jens Axboe wrote:
> > > 
> > > > > --- usb-2.6.orig/drivers/scsi/scsi_lib.c
> > > > > +++ usb-2.6/drivers/scsi/scsi_lib.c
> > > > > @@ -1684,7 +1684,7 @@ static void scsi_request_fn(struct reque
> > > > >  u64 scsi_calculate_bounce_limit(struct Scsi_Host *shost)
> > > > >  {
> > > > >  	struct device *host_dev;
> > > > > -	u64 bounce_limit = 0xffffffff;
> > > > > +	u64 bounce_limit = BLK_BOUNCE_HIGH;
> > > > >  
> > > > >  	if (shost->unchecked_isa_dma)
> > > > >  		return BLK_BOUNCE_ISA;
> > > > > 
> > > > 
> > > > The best solution is probably to either provide a "doesn't do highmem"
> > > > in the scsi host template, or provide an appropriate DMA mask for the
> > > > pci device to indicate it through that setting instead.
> > > 
> > > The DMA mask is currently set to NULL.  Is that not appropriate for a 
> > > device that can't do DMA?  If not, then what would be appropriate?
> > 
> > It's changing behaviour. There's no current rule that says if you don't
> > have a dma mask set, we only do PIO (even if such a rule DOES make
> > sense). Additionally, you don't HAVE to bounce for PIO. As I wrote
> > earlier, it's perfectly feasible to use bio kmap'ings to do the
> > transfer.
> > 
> > > Also, is the patch above not correct?
> > 
> > It'll certainly work in the sense that if you don't have a dma_mask set,
> > you only get lowmem pages. Whether the new behaviour is something we
> > want, not sure. Check with James what he thinks, it's his domain.
> 
> We have been used 4GB for long time if dma_mask is zero (I guess we
> use 4GB as kinda the default dma address limit at several places). The
> majority of drivers (such as pci) sets properly dev->dma_mask so the
> patch might not change anything but suddenly changing the
> long-standing rule in an odd way (use BLK_BOUNCE_HIGH if dma_mask is
> zero) doesn't sound a good idea to me.
> 
> Why not calling blk_queue_bounce_limit() in the slave_configure hook?
> I think that it's the common way for SCSI LLDs with odd bounce limit.

Yep, that should indeed work just fine and is preferable to changing
this logic.

-- 
Jens Axboe


  reply	other threads:[~2008-11-20  7:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4923F120.6000303@linutronix.de>
2008-11-19 14:59 ` ISP1760 driver crashes Alan Stern
2008-11-19 15:00   ` Jens Axboe
2008-11-19 15:36     ` Alan Stern
2008-11-19 15:39       ` Jens Axboe
2008-11-19 16:33         ` Alan Stern
2008-11-19 17:21           ` Jens Axboe
2008-11-20  5:40             ` FUJITA Tomonori
2008-11-20  7:33               ` Jens Axboe [this message]
2008-11-20 15:28               ` Alan Stern
2008-11-20 17:50                 ` Jens Axboe
2008-11-21 10:58                 ` Hommel, Thomas (GE EntSol, Intelligent Platforms)
2008-11-19 15:59       ` Hommel, Thomas (GE EntSol, Intelligent Platforms)

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=20081120073301.GY26308@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=Thomas.Hommel@gefanuc.com \
    --cc=bigeasy@linutronix.de \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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