Re: [PATCH] Mark i2o config broken on 64-bit platforms.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2008-07-09 at 16:49 +0100, Alan Cox wrote:
> On Wed, 09 Jul 2008 15:15:14 +0100
> David Howells <dhowells@xxxxxxxxxx> wrote:
> 
> > Miquel van Smoorenburg <miquels@xxxxxxxxxx> wrote:
> > Maybe, but have you looked at i2o_cfg_passthru()?  Take this, for example:
> > 
> > 			/* Allocate memory for the transfer */
> > 			p = kmalloc(sg_size, GFP_KERNEL);
> > 			...
> > 			//TODO 64bit fix
> > 			sg[i].addr_bus = virt_to_bus(p);
> > 
> > That looks distinctly dodgy.  virt_to_bus() returns a 64-bit address, and as
> 
> Agreed - stick | GFP_DMA32 on the end then ;)

GFP_DMA32 doesn't work with kmalloc(), you need dma_alloc_coherent() or
pci_alloc_consistent() [here, i2o_dma_alloc() ]

GFP_DMA would work though, as a quick bandaid.

Mike.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux