[lkml]   [2009]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: next Feb 13 drivers/scsi/aha1542.ko build break
On Fri, Feb 13, 2009 at 11:13:50AM -0800, Joe Eykholt wrote:

> > I'm seeing that also. I think that it's this line in aha1542.c:
> >
> > 495: mbo = (scsi2int(mb[mbi].ccbptr) - (SCSI_BUF_PA(&ccb[0]))) / sizeof(struct ccb);
> >
> > since I can comment out the "/ sizeof(struct ccb)" and the driver builds successfully.
> >
> > This may need a patch to use one of the div() macros (?).
> In the above case, this problem might not occur if sizeof(struct ccb) happened to
> be a power of 2, since the compiler generates a shift in that case.
> Then later someone could increase the size of the struct and introduce this problem.

The real problem, of course, is that we should _not_ be doing 64bit-division
here, be it by shifts or by __udiv...; if anything, we ought to store the
bus version of HOSTDATA(...)->ccb at the time we'd checked that allocation
got us a small enough address (i.e. after scsi_register()). And store it
in u32.

 \ /
  Last update: 2009-02-13 20:37    [W:0.041 / U:9.340 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site