X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fnet%2Fwan%2Fpc300_drv.c;h=7a972ca25afd1d8c9e18aa78596361f8a71e630f;hb=6f71f83334a552167ccbbd42fe5dd979428c89e4;hp=59b7d5727f80c94f4273d13e6ebc3f99564fdf7c;hpb=8d40237c730b8be87c1b80a5d96b9c603fefa829;p=linux-2.6.git diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c index 59b7d5727..7a972ca25 100644 --- a/drivers/net/wan/pc300_drv.c +++ b/drivers/net/wan/pc300_drv.c @@ -378,9 +378,9 @@ static void tx_dma_buf_check(pc300_t * card, int ch) i != ((next_bd + 1) & (N_DMA_TX_BUF - 1)); i = (i + 1) & (N_DMA_TX_BUF - 1), ptdescr = (card->hw.rambase + TX_BD_ADDR(ch, i))) { - printk("\n CH%d TX%d: next=0x%x, ptbuf=0x%x, ST=0x%x, len=%d", - ch, i, cpc_readl(&ptdescr->next), - cpc_readl(&ptdescr->ptbuf), + printk("\n CH%d TX%d: next=0x%lx, ptbuf=0x%lx, ST=0x%x, len=%d", + ch, i, (uclong) cpc_readl(&ptdescr->next), + (uclong) cpc_readl(&ptdescr->ptbuf), cpc_readb(&ptdescr->status), cpc_readw(&ptdescr->len)); } printk("\n"); @@ -400,14 +400,14 @@ static void tx1_dma_buf_check(pc300_t * card, int ch) printk("#CH%d: f_bd = %d(0x%08x), n_bd = %d(0x%08x)\n", ch, first_bd, TX_BD_ADDR(ch, first_bd), next_bd, TX_BD_ADDR(ch, next_bd)); - printk("TX_CDA=0x%08x, TX_EDA=0x%08x\n", - cpc_readl(scabase + DTX_REG(CDAL, ch)), - cpc_readl(scabase + DTX_REG(EDAL, ch))); + printk("TX_CDA=0x%08lx, TX_EDA=0x%08lx\n", + (uclong) cpc_readl(scabase + DTX_REG(CDAL, ch)), + (uclong) cpc_readl(scabase + DTX_REG(EDAL, ch))); for (i = 0; i < N_DMA_TX_BUF; i++) { ptdescr = (card->hw.rambase + TX_BD_ADDR(ch, i)); - printk("\n CH%d TX%d: next=0x%x, ptbuf=0x%x, ST=0x%x, len=%d", - ch, i, cpc_readl(&ptdescr->next), - cpc_readl(&ptdescr->ptbuf), + printk("\n CH%d TX%d: next=0x%lx, ptbuf=0x%lx, ST=0x%x, len=%d", + ch, i, (uclong) cpc_readl(&ptdescr->next), + (uclong) cpc_readl(&ptdescr->ptbuf), cpc_readb(&ptdescr->status), cpc_readw(&ptdescr->len)); } printk("\n"); @@ -428,9 +428,9 @@ static void rx_dma_buf_check(pc300_t * card, int ch) DMA_RX_BD_BASE + ch_factor * sizeof(pcsca_bd_t)); i < N_DMA_RX_BUF; i++, ptdescr++) { if (cpc_readb(&ptdescr->status) & DST_OSB) - printk ("\n CH%d RX%d: next=0x%x, ptbuf=0x%x, ST=0x%x, len=%d", - ch, i, cpc_readl(&ptdescr->next), - cpc_readl(&ptdescr->ptbuf), + printk ("\n CH%d RX%d: next=0x%lx, ptbuf=0x%lx, ST=0x%x, len=%d", + ch, i, (uclong) cpc_readl(&ptdescr->next), + (uclong) cpc_readl(&ptdescr->ptbuf), cpc_readb(&ptdescr->status), cpc_readw(&ptdescr->len)); } @@ -1959,6 +1959,7 @@ void cpc_net_rx(struct net_device *dev) cpc_trace(dev, skb, 'R'); } stats->rx_packets++; + skb->mac.raw = skb->data; skb->protocol = hdlc_type_trans(skb, dev); netif_rx(skb); } @@ -2415,12 +2416,12 @@ void cpc_sca_status(pc300_t * card, int ch) printk ("ILAR=0x%02x, WCRL=0x%02x, PCR=0x%02x, BTCR=0x%02x, BOLR=0x%02x\n", ilar, cpc_readb(scabase + WCRL), cpc_readb(scabase + PCR), cpc_readb(scabase + BTCR), cpc_readb(scabase + BOLR)); - printk("TX_CDA=0x%08x, TX_EDA=0x%08x\n", - cpc_readl(scabase + DTX_REG(CDAL, ch)), - cpc_readl(scabase + DTX_REG(EDAL, ch))); - printk("RX_CDA=0x%08x, RX_EDA=0x%08x, BFL=0x%04x\n", - cpc_readl(scabase + DRX_REG(CDAL, ch)), - cpc_readl(scabase + DRX_REG(EDAL, ch)), + printk("TX_CDA=0x%08lx, TX_EDA=0x%08lx\n", + (uclong) cpc_readl(scabase + DTX_REG(CDAL, ch)), + (uclong) cpc_readl(scabase + DTX_REG(EDAL, ch))); + printk("RX_CDA=0x%08lx, RX_EDA=0x%08lx, BFL=0x%04x\n", + (uclong) cpc_readl(scabase + DRX_REG(CDAL, ch)), + (uclong) cpc_readl(scabase + DRX_REG(EDAL, ch)), cpc_readw(scabase + DRX_REG(BFLL, ch))); printk("DMER=0x%02x, DSR_TX=0x%02x, DSR_RX=0x%02x\n", cpc_readb(scabase + DMER), cpc_readb(scabase + DSR_TX(ch)), @@ -2485,7 +2486,7 @@ void cpc_sca_status(pc300_t * card, int ch) cpc_readb(scabase + M_REG(IE2, ch)), cpc_readb(scabase + M_REG(IE4, ch)), cpc_readb(scabase + M_REG(FIE, ch))); - printk("IER0=0x%08x\n", cpc_readl(scabase + IER0)); + printk("IER0=0x%08lx\n", (uclong) cpc_readl(scabase + IER0)); if (ilar != 0) { CPC_LOCK(card, flags); @@ -3406,12 +3407,12 @@ static void cpc_init_card(pc300_t * card) printk("RSV "); break; } - printk (" #%d, %dKB of RAM at 0x%08x, IRQ%d, channel %d.\n", + printk (" #%d, %ldKB of RAM at 0x%08lx, IRQ%d, channel %d.\n", board_nbr, card->hw.ramsize / 1024, card->hw.ramphys, card->hw.irq, i + 1); devcount++; } else { - printk ("Dev%d on card(0x%08x): unable to allocate i/f name.\n", + printk ("Dev%d on card(0x%08lx): unable to allocate i/f name.\n", i + 1, card->hw.ramphys); free_netdev(dev); continue; @@ -3491,7 +3492,7 @@ cpc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) if (!request_region(card->hw.iophys, card->hw.iosize, "PLX Registers")) { /* In case we can't allocate it, warn user */ printk("WARNING: couldn't allocate I/O region for PC300 board " - "at 0x%08x!\n", card->hw.ramphys); + "at 0x%08lx!\n", card->hw.ramphys); } if (card->hw.plxphys) { @@ -3504,7 +3505,7 @@ cpc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) if (!request_mem_region(card->hw.plxphys, card->hw.plxsize, "PLX Registers")) { - printk("PC300 found at RAM 0x%08x, " + printk("PC300 found at RAM 0x%08lx, " "but could not allocate PLX mem region.\n", card->hw.ramphys); err = -ENODEV; @@ -3512,7 +3513,7 @@ cpc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) } if (!request_mem_region(card->hw.ramphys, card->hw.alloc_ramsize, "On-board RAM")) { - printk("PC300 found at RAM 0x%08x, " + printk("PC300 found at RAM 0x%08lx, " "but could not allocate RAM mem region.\n", card->hw.ramphys); err = -ENODEV; @@ -3520,7 +3521,7 @@ cpc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) } if (!request_mem_region(card->hw.scaphys, card->hw.scasize, "SCA-II Registers")) { - printk("PC300 found at RAM 0x%08x, " + printk("PC300 found at RAM 0x%08lx, " "but could not allocate SCA mem region.\n", card->hw.ramphys); err = -ENODEV; @@ -3600,7 +3601,7 @@ cpc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) /* Allocate IRQ */ if (request_irq(card->hw.irq, cpc_intr, SA_SHIRQ, "Cyclades-PC300", card)) { - printk ("PC300 found at RAM 0x%08x, but could not allocate IRQ%d.\n", + printk ("PC300 found at RAM 0x%08lx, but could not allocate IRQ%d.\n", card->hw.ramphys, card->hw.irq); goto err_io_unmap; }