Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

atm: [iphase] 64-bit cleanup

This fixes the most obvious 64-bit problems, but it is still very very
broken in other aspects.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Alan Cox and committed by
David S. Miller
97928f70 61c33e01

+11 -14
+1 -1
drivers/atm/Kconfig
··· 294 294 295 295 config ATM_IA 296 296 tristate "Interphase ATM PCI x575/x525/x531" 297 - depends on PCI && !64BIT 297 + depends on PCI 298 298 ---help--- 299 299 This is a driver for the Interphase (i)ChipSAR adapter cards 300 300 which include a variety of variants in term of the size of the
+10 -13
drivers/atm/iphase.c
··· 89 89 90 90 MODULE_LICENSE("GPL"); 91 91 92 - #if BITS_PER_LONG != 32 93 - # error FIXME: this driver only works on 32-bit platforms 94 - #endif 95 - 96 92 /**************************** IA_LIB **********************************/ 97 93 98 94 static void ia_init_rtn_q (IARTN_Q *que) ··· 1402 1406 struct abr_vc_table *abr_vc_table; 1403 1407 u16 *vc_table; 1404 1408 u16 *reass_table; 1405 - u16 *ptr16; 1406 1409 int i,j, vcsize_sel; 1407 1410 u_short freeq_st_adr; 1408 1411 u_short *freeq_start; ··· 1416 1421 printk(KERN_ERR DEV_LABEL "can't allocate DLEs\n"); 1417 1422 goto err_out; 1418 1423 } 1419 - iadev->rx_dle_q.start = (struct dle*)dle_addr; 1424 + iadev->rx_dle_q.start = (struct dle *)dle_addr; 1420 1425 iadev->rx_dle_q.read = iadev->rx_dle_q.start; 1421 1426 iadev->rx_dle_q.write = iadev->rx_dle_q.start; 1422 - iadev->rx_dle_q.end = (struct dle*)((u32)dle_addr+sizeof(struct dle)*DLE_ENTRIES); 1427 + iadev->rx_dle_q.end = (struct dle*)((unsigned long)dle_addr+sizeof(struct dle)*DLE_ENTRIES); 1423 1428 /* the end of the dle q points to the entry after the last 1424 1429 DLE that can be used. */ 1425 1430 1426 1431 /* write the upper 20 bits of the start address to rx list address register */ 1432 + /* We know this is 32bit bus addressed so the following is safe */ 1427 1433 writel(iadev->rx_dle_dma & 0xfffff000, 1428 1434 iadev->dma + IPHASE5575_RX_LIST_ADDR); 1429 1435 IF_INIT(printk("Tx Dle list addr: 0x%08x value: 0x%0x\n", ··· 1578 1582 Set Packet Aging Interval count register to overflow in about 4 us 1579 1583 */ 1580 1584 writew(0xF6F8, iadev->reass_reg+PKT_TM_CNT ); 1581 - ptr16 = (u16*)j; 1582 - i = ((u32)ptr16 >> 6) & 0xff; 1583 - ptr16 += j - 1; 1584 - i |=(((u32)ptr16 << 2) & 0xff00); 1585 + 1586 + i = (j >> 6) & 0xFF; 1587 + j += 2 * (j - 1); 1588 + i |= ((j << 2) & 0xFF00); 1585 1589 writew(i, iadev->reass_reg+TMOUT_RANGE); 1590 + 1586 1591 /* initiate the desc_tble */ 1587 1592 for(i=0; i<iadev->num_tx_desc;i++) 1588 1593 iadev->desc_tbl[i].timestamp = 0; ··· 1906 1909 iadev->tx_dle_q.start = (struct dle*)dle_addr; 1907 1910 iadev->tx_dle_q.read = iadev->tx_dle_q.start; 1908 1911 iadev->tx_dle_q.write = iadev->tx_dle_q.start; 1909 - iadev->tx_dle_q.end = (struct dle*)((u32)dle_addr+sizeof(struct dle)*DLE_ENTRIES); 1912 + iadev->tx_dle_q.end = (struct dle*)((unsigned long)dle_addr+sizeof(struct dle)*DLE_ENTRIES); 1910 1913 1911 1914 /* write the upper 20 bits of the start address to tx list address register */ 1912 1915 writel(iadev->tx_dle_dma & 0xfffff000, ··· 2899 2902 dev_kfree_skb_any(skb); 2900 2903 return 0; 2901 2904 } 2902 - if ((u32)skb->data & 3) { 2905 + if ((unsigned long)skb->data & 3) { 2903 2906 printk("Misaligned SKB\n"); 2904 2907 if (vcc->pop) 2905 2908 vcc->pop(vcc, skb);