Commit 4d6c3d20 authored by Adrian Bunk's avatar Adrian Bunk Committed by James Bottomley

[PATCH] postfix two constants in ips.c with ULL

The patch below postfixes two constants in ips.c with ULL, on 32 bit
archs this constant is too big for an int.

The cast doesn't do the right thing, 0xffffffffffffffff is in C an int
and the cast casts 0xffffffffffffffff interpreted as an int to an u64.
parent 748ae569
......@@ -7009,10 +7009,10 @@ static int ips_init_phase1( struct pci_dev *pci_dev, int *indexPtr )
* are guaranteed to be < 4G.
*/
if ( IPS_ENABLE_DMA64 && IPS_HAS_ENH_SGLIST(ha) &&
!pci_set_dma_mask(ha->pcidev, (u64)0xffffffffffffffff)) {
!pci_set_dma_mask(ha->pcidev, 0xffffffffffffffffULL)) {
(ha)->flags |= IPS_HA_ENH_SG;
} else {
if ( pci_set_dma_mask(ha->pcidev, (u64)0xffffffff) != 0 ) {
if ( pci_set_dma_mask(ha->pcidev, 0xffffffffULL) != 0 ) {
printk(KERN_WARNING "Unable to set DMA Mask\n");
return ips_abort_init(ha, index);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment