strace: Remove the ability to write to Qstrace
[akaros.git] / kern / drivers / net / ether8169.c
index f3aea84..4bdce2d 100644 (file)
@@ -513,7 +513,7 @@ rtl8169ifstat(struct ether* edev, void* a, long n, uint32_t offset)
                udelay(1000*1);
        }
        if(csr32r(ctlr, Dtccr) & Cmd)
                udelay(1000*1);
        }
        if(csr32r(ctlr, Dtccr) & Cmd)
-               error(Eio);
+               error(EIO, ERROR_FIXME);
        dtcc = ctlr->dtcc;
 
        edev->oerrs = dtcc->txer;
        dtcc = ctlr->dtcc;
 
        edev->oerrs = dtcc->txer;
@@ -529,7 +529,7 @@ rtl8169ifstat(struct ether* edev, void* a, long n, uint32_t offset)
        }
 
        if((alloc = kzmalloc(READSTR, 0)) == NULL)
        }
 
        if((alloc = kzmalloc(READSTR, 0)) == NULL)
-               error(Enomem);
+               error(ENOMEM, ERROR_FIXME);
        e = alloc+READSTR;
 
        p = seprintf(alloc, e, "TxOk: %llu\n", dtcc->txok);
        e = alloc+READSTR;
 
        p = seprintf(alloc, e, "TxOk: %llu\n", dtcc->txok);
@@ -619,7 +619,7 @@ rtl8169replenish(struct ctlr* ctlr)
                         * Simple allocation for now.
                         * This better be aligned on 8.
                         */
                         * Simple allocation for now.
                         * This better be aligned on 8.
                         */
-                       bp = iallocb(Mps);
+                       bp = block_alloc(Mps, MEM_ATOMIC);
                        if(bp == NULL){
                                printk("no available buffers\n");
                                break;
                        if(bp == NULL){
                                printk("no available buffers\n");
                                break;
@@ -713,7 +713,7 @@ rtl8169init(struct ether* edev)
                 */
                printk("untested\n");
                break;
                 */
                printk("untested\n");
                break;
-#if 0        
+#if 0
                r = csr8r(ctlr, Config2) & 0x07;
                if(r == 0x01)                           /* 66MHz PCI */
                        csr32w(ctlr, 0x7C, 0x0007FFFF); /* magic */
                r = csr8r(ctlr, Config2) & 0x07;
                if(r == 0x01)                           /* 66MHz PCI */
                        csr32w(ctlr, 0x7C, 0x0007FFFF); /* magic */
@@ -835,13 +835,13 @@ rtl8169attach(struct ether* edev)
                /*
                 * Handle allocation/init errors here.
                 */
                /*
                 * Handle allocation/init errors here.
                 */
-               ctlr->td = kzmalloc_align(sizeof(D) * Ntd, KMALLOC_WAIT, 256);
-               ctlr->tb = kzmalloc(Ntd * sizeof(struct block *), KMALLOC_WAIT);
+               ctlr->td = kzmalloc_align(sizeof(D) * Ntd, MEM_WAIT, 256);
+               ctlr->tb = kzmalloc(Ntd * sizeof(struct block *), MEM_WAIT);
                ctlr->ntd = Ntd;
                ctlr->ntd = Ntd;
-               ctlr->rd = kzmalloc_align(sizeof(D) * Nrd, KMALLOC_WAIT, 256);
-               ctlr->rb = kzmalloc(Nrd * sizeof(struct block *), KMALLOC_WAIT);
+               ctlr->rd = kzmalloc_align(sizeof(D) * Nrd, MEM_WAIT, 256);
+               ctlr->rb = kzmalloc(Nrd * sizeof(struct block *), MEM_WAIT);
                ctlr->nrd = Nrd;
                ctlr->nrd = Nrd;
-               ctlr->dtcc = kzmalloc_align(sizeof(Dtcc), KMALLOC_WAIT, 64);
+               ctlr->dtcc = kzmalloc_align(sizeof(Dtcc), MEM_WAIT, 64);
                rtl8169init(edev);
                ctlr->init = 1;
        }
                rtl8169init(edev);
                ctlr->init = 1;
        }
@@ -1121,7 +1121,7 @@ rtl8169pci(void)
 
                port = pcidev->bar[0].pio_base;
 
 
                port = pcidev->bar[0].pio_base;
 
-               ctlr = kzmalloc(sizeof(struct ctlr), KMALLOC_WAIT);
+               ctlr = kzmalloc(sizeof(struct ctlr), MEM_WAIT);
                spinlock_init_irqsave(&ctlr->ilock);
                spinlock_init_irqsave(&ctlr->tlock);
                spinlock_init_irqsave(&ctlr->rlock);
                spinlock_init_irqsave(&ctlr->ilock);
                spinlock_init_irqsave(&ctlr->tlock);
                spinlock_init_irqsave(&ctlr->rlock);