Re: dma_mask on scsi_calculate_bounce_limit

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

 



On Fri, 2010-11-19 at 12:11 +0530, çç wrote:
> On Fri, Nov 19, 2010 at 6:22 AM, James Bottomley
> <James.Bottomley@xxxxxxx> wrote:
> > On Fri, 2010-11-19 at 01:54 +0800, çç wrote:
> >> On Thu, Nov 18, 2010 at 11:21 PM, James Bottomley
> >> <James.Bottomley@xxxxxxx> wrote:
> >> > On Thu, 2010-11-18 at 14:20 +0530, çç wrote:
> >> >> Hi
> >> >>
> >> >> I have enabled DMA for my host device and when i connect a scsi device
> >> >> to the host, it crashes in the following code..
> >> >>
> >> >> Function: scsi_calculate_bounce_limit
> >> >>
> >> >>  if (host_dev && host_dev->dma_mask)
> >> >>                 bounce_limit = *host_dev->dma_mask;
> >> >>
> >> >> "*dma_mask" is illegal pointer operation. I would like to understand
> >> >> is this known and is there reason behind such a code ?
> >> >
> >> > It likely means you're operating on a new architecture and its generic
> >> > devices haven't been set up correctly.
> >>
> >> Could you please more specific on what is generic devices haven't been
> >> setup properly...
> >
> > It means the architecture setup code left a NULL pointer in the generic
> > device which shouldn't be there ... without knowing which architecture
> > and seeing the code, it's pretty impossible to be more specific.
> 
> It is for ARM and the error is not due to NULL pointer. The code just
> checks if it is host mode + dma enabled and it access a normal
> interger variable with indirection causing the crash;

OK, it's crashing because the pointer isn't set up correctly ... is that
more semantically accurate?

The pointer setup is done in the arch code, so that's where the problem
is.

> int dma_mask;

That's not the definition in struct device; this is:

        u64             *dma_mask;      /* dma mask (if dma'able device) */


> and accessing dma_mask as "*dma_mask" ??
> 
> Anything I am missing :O

Yes, but you supply too little information to know what.  It's
definitely a problem somewhere in the arch setup code.

James


--
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