RE: [patch 20/23] aacraid driver fails with Dell PowerEdge Expandable RAID Controller 3/Di

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

 



> From: Miquel van Smoorenburg [mailto:mikevs@xxxxxxxxxx] 
> >+static int aac_scsi_32_64(struct fib * fib, struct scsi_cmnd * cmd)
> >+{
> >+	if ((sizeof(dma_addr_t) > 4) &&
> >+	 (num_physpages > (0xFFFFFFFFULL >> PAGE_SHIFT)) &&
> >+	 (fib->dev->adapter_info.options & AAC_OPT_SGMAP_HOST64))
> >+		return FAILED;
> >+	return aac_scsi_32(fib, cmd);
> >+}
> 
> I saw the same thing in the 64-bit dpt_i2o driver, but I

Yes, scratch and sniff, caught me :-}

> wonder, shouldn't this be something like:
> 
> #include <linux/bootmem.h>
> 
>        if ((sizeof(dma_addr_t) > 4) &&
>         (max_pfn > (0xFFFFFFFFULL >> PAGE_SHIFT)) &&
>         (fib->dev->adapter_info.options & AAC_OPT_SGMAP_HOST64))
> 
> e.g. use max_pfn instead of num_physpages ?

Yes, it would be more correct for the moment, save for the fact that it
is marked for deletion:

         * This doesn't seem to be used by the Linux memory manager any
         * more, but is used by ll_rw_block.  If we can get rid of it,
we
         * also get rid of some of the stuff above as well.
		. . .
	  max_pfn = . . .

and unfortunately architecture issues abound with all memory limit
variable :-(

in arch/arm/mm/init.c:

         * Note: max_low_pfn and max_pfn reflect the number of _pages_
in
         * the system, not the maximum PFN.

Reminder: If this automated solution represented in this patch, however
flawed with any memory limit variable, is too hacky and not acceptable
for inclusion, the workaround for the existing drivers and PERC users in
64 bit populated architectures continues to be to manually set
aacraid.dacmode=0 in the failing configurations.

What variable tells us the maximum physical memory address, is correct
in all architectures and is going to stick around? 

Sincerely -- Mark Salyzyn
-
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