public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* Re: unchecked_isa_dma and BusLogic SCSI controller
       [not found] <20061101235330.GA30843@srv.junsun.net>
@ 2006-11-02  1:33 ` Randy Dunlap
  2006-11-02 12:41   ` Matthew Wilcox
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2006-11-02  1:33 UTC (permalink / raw)
  To: Jun Sun; +Cc: linux-scsi, lkml

On Wed, 1 Nov 2006 15:53:30 -0800 Jun Sun wrote:

> 
> Can someone enlighten me on what "unchecked_isa_dma" means in the
> struct scsi_host_template?

It's documented in Documentation/scsi/scsi_mid_low_api.txt:

    unchecked_isa_dma - 1=>only use bottom 16 MB of ram (ISA DMA addressing
                   restriction), 0=>can use full 32 bit (or better) DMA
                   address space

> Specifically why Bus_Logic_template has
> it set to 1?

maybe ask on linux-scsi@vger.kernel.org (cc-ed)

> I am trying to reserve a block of memory (>16MB) starting from 0 and hide
> it from kernel.  As a result, the DMA zone becomes 0 in size.
> 
> Because Bus_Logic_template has unchecked_isa_dma set to 1, the driver
> will attempt to allocate a block of memory from DMA zone and thus
> causes OOMs during its initialization.
> 
> It is hard for me to see why BusLogic controller would only do DMA
> in low 16MB.  Is there a fix for this?

Does anyone know that controller hardware and its limitations?

If the driver can't handle highmem addresses, you could just change
it so that
(a) it does not set unchecked_isa_dma
(b) it sets .slave_alloc in the host template and then does
like the <slave_alloc> function in ppa.c or imm.c:
call blk_queue_bounce_limit() to set an address for which bounce
buffers (from highmem to lowmem) will be used.
[I don't guarantee that to work for BusLogic.]

> BTW, I also tried to increase MAX_DMA_ADDRESS to cover the whole memory
> area.  While the OOMs are gone during BusLogic driver initialization, 
> kernel fails to find labelled root partition or fail to open
> the initial console.  It appears the disk (or the scsi) is not working
> properly after increasing MAX_DMA_ADDRESS.
> 
> My platform is vmplayer.  Pretty cool for devel.
> 
> Cheers.
> 
> Jun

---
~Randy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: unchecked_isa_dma and BusLogic SCSI controller
  2006-11-02  1:33 ` unchecked_isa_dma and BusLogic SCSI controller Randy Dunlap
@ 2006-11-02 12:41   ` Matthew Wilcox
  2006-11-02 13:04     ` Maciej W. Rozycki
  2006-11-02 13:35     ` Christoph Hellwig
  0 siblings, 2 replies; 4+ messages in thread
From: Matthew Wilcox @ 2006-11-02 12:41 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: Jun Sun, linux-scsi, lkml

On Wed, Nov 01, 2006 at 05:33:58PM -0800, Randy Dunlap wrote:
>     unchecked_isa_dma - 1=>only use bottom 16 MB of ram (ISA DMA addressing
>                    restriction), 0=>can use full 32 bit (or better) DMA
>                    address space
> 
> > It is hard for me to see why BusLogic controller would only do DMA
> > in low 16MB.  Is there a fix for this?
> 
> Does anyone know that controller hardware and its limitations?

I don't, but:

		if (pci_set_dma_mask(PCI_Device, DMA_32BIT_MASK ))
			continue;

So somebody thinks the device can do 32-bit addressing.  I would expect
that setting unchecked_isa_dma is a historical mistake.  However, I
don't have any cards of this type to test.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: unchecked_isa_dma and BusLogic SCSI controller
  2006-11-02 12:41   ` Matthew Wilcox
@ 2006-11-02 13:04     ` Maciej W. Rozycki
  2006-11-02 13:35     ` Christoph Hellwig
  1 sibling, 0 replies; 4+ messages in thread
From: Maciej W. Rozycki @ 2006-11-02 13:04 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: Randy Dunlap, Jun Sun, linux-scsi, lkml

On Thu, 2 Nov 2006, Matthew Wilcox wrote:

> > > It is hard for me to see why BusLogic controller would only do DMA
> > > in low 16MB.  Is there a fix for this?
> > 
> > Does anyone know that controller hardware and its limitations?
> 
> I don't, but:
> 
> 		if (pci_set_dma_mask(PCI_Device, DMA_32BIT_MASK ))
> 			continue;
> 
> So somebody thinks the device can do 32-bit addressing.  I would expect
> that setting unchecked_isa_dma is a historical mistake.  However, I
> don't have any cards of this type to test.

 It could be related to the non-PCI variations of the board.

  Maciej

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: unchecked_isa_dma and BusLogic SCSI controller
  2006-11-02 12:41   ` Matthew Wilcox
  2006-11-02 13:04     ` Maciej W. Rozycki
@ 2006-11-02 13:35     ` Christoph Hellwig
  1 sibling, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2006-11-02 13:35 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: Randy Dunlap, Jun Sun, linux-scsi, lkml

On Thu, Nov 02, 2006 at 05:41:28AM -0700, Matthew Wilcox wrote:
> On Wed, Nov 01, 2006 at 05:33:58PM -0800, Randy Dunlap wrote:
> >     unchecked_isa_dma - 1=>only use bottom 16 MB of ram (ISA DMA addressing
> >                    restriction), 0=>can use full 32 bit (or better) DMA
> >                    address space
> > 
> > > It is hard for me to see why BusLogic controller would only do DMA
> > > in low 16MB.  Is there a fix for this?
> > 
> > Does anyone know that controller hardware and its limitations?
> 
> I don't, but:
> 
> 		if (pci_set_dma_mask(PCI_Device, DMA_32BIT_MASK ))
> 			continue;
> 
> So somebody thinks the device can do 32-bit addressing.  I would expect
> that setting unchecked_isa_dma is a historical mistake.  However, I
> don't have any cards of this type to test.

The buslogic driver also supports non-PCI devices, and at least the
ISA boards have the obvious limitiation that unchecked_isa_dma = 1
caters to.  Now someone would have to audit the driver whether it's
enough to only set this on the actual isa hosts instead of the host
template.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-11-02 13:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20061101235330.GA30843@srv.junsun.net>
2006-11-02  1:33 ` unchecked_isa_dma and BusLogic SCSI controller Randy Dunlap
2006-11-02 12:41   ` Matthew Wilcox
2006-11-02 13:04     ` Maciej W. Rozycki
2006-11-02 13:35     ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox