From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tobias Klauser Subject: [PATCH 15/19] drivers/scsi/megaraid: Use the DMA_{64,32}BIT_MASK constants Date: Sun, 20 Feb 2005 18:10:28 +0100 Message-ID: <20050220171028.GP14375@helium.tklauser.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Received: from server3.hostpoint.ch ([217.26.52.13]:37388 "EHLO server3.hostpoint.ch") by vger.kernel.org with ESMTP id S261888AbVBTRJm (ORCPT ); Sun, 20 Feb 2005 12:09:42 -0500 Content-Disposition: inline Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: kernel-janitors@lists.osdl.org Cc: linux-scsi@vger.kernel.org Hello, Description: Use the DMA_{64,32}BIT_MASK constants from dma-mapping.h when calling pci_set_dma_mask() or pci_set_consistent_dma_mask() See http://marc.theaimsgroup.com/?t=108001993000001&r=1&w=2 for details Signed-off-by: Tobias Klauser --- linux-2.6.11-rc4.orig/drivers/scsi/megaraid.c 2005-02-13 17:13:06.000000000 +0100 +++ linux-2.6.11-rc4/drivers/scsi/megaraid.c 2005-02-16 21:05:44.000000000 +0100 @@ -2060,7 +2060,7 @@ make_local_pdev(adapter_t *adapter, stru memcpy(*pdev, adapter->dev, sizeof(struct pci_dev)); - if( pci_set_dma_mask(*pdev, 0xffffffff) != 0 ) { + if( pci_set_dma_mask(*pdev, DMA_32BIT_MASK) != 0 ) { kfree(*pdev); return -1; } @@ -4854,10 +4854,10 @@ megaraid_probe_one(struct pci_dev *pdev, /* Set the Mode of addressing to 64 bit if we can */ if ((adapter->flag & BOARD_64BIT) && (sizeof(dma_addr_t) == 8)) { - pci_set_dma_mask(pdev, 0xffffffffffffffffULL); + pci_set_dma_mask(pdev, DMA_64BIT_MASK); adapter->has_64bit_addr = 1; } else { - pci_set_dma_mask(pdev, 0xffffffff); + pci_set_dma_mask(pdev, DMA_32BIT_MASK); adapter->has_64bit_addr = 0; }