Lines Matching defs:size
197 unsigned long size)
202 DPRINTK("init 0x%lx+%ld(0x%lx)\n",start,size,size);
206 while (size) {
209 start,size);
212 for (order = 0; !(((unsigned long)start | size) & (1 << order)); order++);
222 size -= 1 << order;
229 static void __iomem *eni_alloc_mem(struct eni_dev *eni_dev, unsigned long *size)
237 if (*size < MID_MIN_BUF_SIZE) *size = MID_MIN_BUF_SIZE;
238 if (*size > MID_MAX_BUF_SIZE) return NULL;
239 for (order = 0; (1 << order) < *size; order++)
241 DPRINTK("trying: %ld->%d\n",*size,order);
258 *size = 1 << order;
259 eni_put_free(eni_dev,start+*size,(1 << best_order)-*size);
260 DPRINTK("%ld bytes (order %d) at 0x%lx\n",*size,order,start);
261 memset_io(start,0,*size); /* never leak data */
268 unsigned long size)
276 for (order = -1; size; order++) size >>= 1;
277 DPRINTK("eni_free_mem: %p+0x%lx (order %d)\n",start,size,order);
339 unsigned long skip,unsigned long size,unsigned long eff)
362 ENI_PRV_SIZE(skb) = size+skip;
373 here = (eni_vcc->descr+size+skip) & (eni_vcc->words-1);
374 if (!eff) size += skip;
378 if (!size) {
381 size,eff);
441 if (size != eff) {
469 ENI_PRV_POS(skb) = eni_vcc->descr+size+1;
488 static void discard(struct atm_vcc *vcc,unsigned long size)
493 EVENT("discard (size=%ld)\n",size,0);
494 while (do_rx_dma(vcc,NULL,1,size,0)) EVENT("BUSY LOOP",0,0);
496 if (eni_vcc->rxing) ENI_PRV_POS(eni_vcc->last) += size+1;
497 else eni_vcc->rx_pos = (eni_vcc->rx_pos+size+1) & (eni_vcc->words-1);
547 unsigned long size,eff,length;
563 size = 0;
574 size = (descr & MID_RED_COUNT)*(ATM_CELL_PAYLOAD >> 2);
575 EVENT("CRC error (descr=0x%lx,size=%ld)\n",descr,
576 size);
582 size = (descr & MID_RED_COUNT)*(ATM_CELL_PAYLOAD >> 2);
583 DPRINTK("size=%ld\n",size);
584 length = readl(eni_vcc->recv+(((eni_vcc->descr+size-1) &
587 if (length && length <= (size << 2)-8 && length <=
593 "(VCI=%d,length=%ld,size=%ld (descr 0x%lx))\n",
594 vcc->dev->number,vcc->vci,length,size << 2,descr);
601 discard(vcc,size);
606 if (do_rx_dma(vcc,skb,1,size,eff)) return 1;
741 EVENT("dequeued (size=%ld,pos=0x%lx)\n",ENI_PRV_SIZE(skb),
779 unsigned long size;
786 size = vcc->qos.rxtp.max_sdu*eni_dev->rx_mult/100;
787 if (size > MID_MAX_BUF_SIZE && vcc->qos.rxtp.max_sdu <=
789 size = MID_MAX_BUF_SIZE;
790 eni_vcc->recv = eni_alloc_mem(eni_dev,&size);
792 eni_vcc->words = size >> 2;
809 unsigned long size;
819 size = eni_vcc->words >> 8;
820 for (order = -1; size; order++) size >>= 1;
929 u32 size)
933 DPRINTK("put_dma: 0x%lx+0x%x\n",(unsigned long) paddr,size);
934 EVENT("put_dma: 0x%lx+0x%lx\n",(unsigned long) paddr,size);
938 if (size & 3)
939 printk(KERN_ERR "put_dma: unaligned size (0x%lx)\n",size);
943 if (init > size || size < 7) init = size;
945 (unsigned long) paddr,init,size);
950 size -= init;
952 words = size >> 2;
953 size &= 3;
1017 if (size) {
1019 size);
1020 dma[(*j)++] = MID_DT_BYTE | (size << MID_DMA_COUNT_SHIFT) |
1035 u32 size; /* in words */
1073 size = (ATM_CELL_PAYLOAD >> 2)+TX_DESCR_SIZE;
1077 size = skb->len+4*AAL5_TRAILER+ATM_CELL_PAYLOAD-1;
1079 size = ((size-(size % ATM_CELL_PAYLOAD)) >> 2)+TX_DESCR_SIZE;
1083 * Can I move tx_pos by size bytes without getting closer than TX_GAP
1087 if (!NEPMOK(tx->tx_pos,size+TX_GAP,
1089 DPRINTK(DEV_LABEL "(itf %d): TX full (size %d)\n",
1090 vcc->dev->number,size);
1096 dma_size = 3; /* JK for descriptor and final fill, plus final size
1145 eni_dev->dma[j++] = (((tx->tx_pos+size) & (tx->words-1)) <<
1154 (size/(ATM_CELL_PAYLOAD/4)),tx->send+tx->tx_pos*4);
1160 DPRINTK("size: %d, len:%d\n",size,skb->len);
1163 ((tx->tx_pos+size-AAL5_TRAILER) & (tx->words-1))*4);
1171 ENI_PRV_SIZE(skb) = size;
1172 ENI_VCC(vcc)->txing += size;
1173 tx->tx_pos = (tx->tx_pos+size) & (tx->words-1);
1293 unsigned long size;
1304 size = txtp->max_sdu*eni_dev->tx_mult/100;
1305 if (size > MID_MAX_BUF_SIZE && txtp->max_sdu <=
1307 size = MID_MAX_BUF_SIZE;
1315 size = UBR_BUFFER;
1321 mem = eni_alloc_mem(eni_dev,&size);
1325 eni_free_mem(eni_dev,mem,size);
1331 tx->words = size >> 2;
1333 for (order = 0; size > (1 << (order+10)); order++);
1353 eni_free_mem(eni_dev,mem,size);