lkml.org 
[lkml]   [2013]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/3] BusLogic: Message logging neatening
On 05/17/2013 02:35 PM, Joe Perches wrote:
> On Fri, 2013-05-17 at 14:18 -0600, Khalid Aziz wrote:
>> On Thu, 2013-05-16 at 21:58 -0700, Joe Perches wrote:
>>> If you're going through the trouble to fix this CamelCase stuff
>>> and make it work on 64 bit, how about a little more cleanup?
>>
>> Sounds good to me.
>
> btw, for the BusLogic code:
>
> There seem to be places where addresses are cast to u32.
>
> I don't know the code at all, but that could likely
> cause problems with 64 bit addresses.
>
> $ git grep "(u32)" drivers/scsi/BusLogic.c
> drivers/scsi/BusLogic.c: ccb->dma_handle = (u32) blkp + offset;
> drivers/scsi/BusLogic.c: fpinfo->base_addr = (u32) adapter->io_addr;
> drivers/scsi/BusLogic.c: extmbox_req.base_mbox_addr = (u32) adapter->mbox_space_handle;
>

All of those fields indeed hold only a 32-bit address since the driver
calls pci_set_dma_mask() with DMA mask of 32-bit and then allocates
memory pointed to by these fields with pci_alloc_consistent(). So I
think we are ok here.

Manipulation of all these pointers in this code is something that could
use a cleaner rewrite at some point. The way it is done in the original
code does not make me comfortable. I cleaned up what could be done
without a rewrite.

--
Khalid


\
 
 \ /
  Last update: 2013-05-17 23:41    [W:0.056 / U:0.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site