Showing error 542

User: Jiri Slaby
Error type: Calling function from invalid context
Error type description: Some function is called at inappropriate place like sleep inside critical sections or interrupt handlers
File location: drivers/atm/iphase.c
Line in file: 1957
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:19:02 UTC


Source:

1927                                        TCQ - 4K, PRQ - 5K  
1928         CBR Table         0x1800 (as needed) - 6K  
1929         UBR Table        0x3000 (1K - 4K) - 12K  
1930         UBR Wait queue        0x4000 (1K - 4K) - 16K  
1931         ABR sched        0x5000        and ABR wait queue (1K - 2K) each  
1932                                ABR Tbl - 20K, ABR Wq - 22K   
1933         extended VC        0x6000 (1K - 8K) - 24K  
1934         VC Table        0x8000 (1K - 32K) - 32K  
1935          
1936        Between 0x2000 (8K) and 0x3000 (12K) there is 4K space left for VBR Tbl  
1937        and Wait q, which can be allotted later.  
1938        */  
1939     
1940        /* Buffer Descriptor Table Base address */  
1941        writew(TX_DESC_BASE, iadev->seg_reg+SEG_DESC_BASE);  
1942  
1943        /* initialize each entry in the buffer descriptor table */  
1944        buf_desc_ptr =(struct tx_buf_desc *)(iadev->seg_ram+TX_DESC_BASE);  
1945        memset((caddr_t)buf_desc_ptr, 0, sizeof(*buf_desc_ptr));  
1946        buf_desc_ptr++;  
1947        tx_pkt_start = TX_PACKET_RAM;  
1948        for(i=1; i<=iadev->num_tx_desc; i++)  
1949        {  
1950                memset((caddr_t)buf_desc_ptr, 0, sizeof(*buf_desc_ptr));  
1951                buf_desc_ptr->desc_mode = AAL5;  
1952                buf_desc_ptr->buf_start_hi = tx_pkt_start >> 16;  
1953                buf_desc_ptr->buf_start_lo = tx_pkt_start & 0x0000ffff;  
1954                buf_desc_ptr++;                  
1955                tx_pkt_start += iadev->tx_buf_sz;  
1956        }  
1957        iadev->tx_buf = kmalloc(iadev->num_tx_desc*sizeof(struct cpcs_trailer_desc), GFP_KERNEL);
1958        if (!iadev->tx_buf) {
1959            printk(KERN_ERR DEV_LABEL " couldn't get mem\n");
1960            goto err_free_dle;
1961        }
1962               for (i= 0; i< iadev->num_tx_desc; i++)
1963               {
1964            struct cpcs_trailer *cpcs;
1965 
1966                   cpcs = kmalloc(sizeof(*cpcs), GFP_KERNEL|GFP_DMA);
1967            if(!cpcs) {                
Show full sources