All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaco Kroon <jaco@kroon.co.za>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] qla1280: slightly strange DMA mask
Date: Sun, 20 Nov 2005 07:40:19 +0000	[thread overview]
Message-ID: <43802863.4000405@kroon.co.za> (raw)
In-Reply-To: <20051120073443.GB17439@mipter.zuzino.mipt.ru>


[-- Attachment #1.1: Type: text/plain, Size: 1944 bytes --]

Alexey Dobriyan wrote:
> The question is what to do with ~0LL.

Well, on x86 and amd64 at least long long is 64-bits in both cases.
Therefor I would guess that it needs to me DMA_64BIT_MASK.
Additionally, to support this, it seems it's inside an ifdef for
QLA_64BIT_PTR which supports the 64-bit theory to an extent.

Does this make sense?

Also, in that case it would try to use a 64-bit DMA mask, and try to
fallback to 32-bit if that fails.

> --- linux-kj.orig/drivers/scsi/qla1280.c
> +++ linux-kj/drivers/scsi/qla1280.c
> @@ -348,6 +348,7 @@
>  #include <linux/pci_ids.h>
>  #include <linux/interrupt.h>
>  #include <linux/init.h>
> +#include <linux/dma-mapping.h>
>  
>  #include <asm/io.h>
>  #include <asm/irq.h>
> @@ -4571,7 +4572,7 @@ qla1280_probe_one(struct pci_dev *pdev, 
>  
>  #ifdef QLA_64BIT_PTR
>  	if (pci_set_dma_mask(ha->pdev, (dma_addr_t) ~ 0ULL)) {
> 				       ^^^^^^^^^^^^^^^^^^^
> 
> -		if (pci_set_dma_mask(ha->pdev, 0xffffffff)) {
> +		if (pci_set_dma_mask(ha->pdev, DMA_32BIT_MASK)) {
>  			printk(KERN_WARNING "scsi(%li): Unable to set a "
>  			       "suitable DMA mask - aborting\n", ha->host_no);
>  			error = -ENODEV;
> @@ -4581,7 +4582,7 @@ qla1280_probe_one(struct pci_dev *pdev, 
>  		dprintk(2, "scsi(%li): 64 Bit PCI Addressing Enabled\n",
>  			ha->host_no);
>  #else
> -	if (pci_set_dma_mask(ha->pdev, 0xffffffff)) {
> +	if (pci_set_dma_mask(ha->pdev, DMA_32BIT_MASK)) {
>  		printk(KERN_WARNING "scsi(%li): Unable to set a "
>  		       "suitable DMA mask - aborting\n", ha->host_no);
>  		error = -ENODEV;
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Kernel-janitors mailing list
> Kernel-janitors@lists.osdl.org
> https://lists.osdl.org/mailman/listinfo/kernel-janitors


-- 
There are only 10 kinds of people in this world,
  those that understand binary and those that don't.
http://www.kroon.co.za/

[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3166 bytes --]

[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

      reply	other threads:[~2005-11-20  7:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-20  7:34 [KJ] qla1280: slightly strange DMA mask Alexey Dobriyan
2005-11-20  7:40 ` Jaco Kroon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43802863.4000405@kroon.co.za \
    --to=jaco@kroon.co.za \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.