Showing error 551

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/char/isicom.c
Line in file: 231
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:19:02 UTC


Source:

 201struct        isi_port {
 202        unsigned short                magic;
 203        struct tty_port                port;
 204        u16                        channel;
 205        u16                        status;
 206        struct isi_board        *card;
 207        unsigned char                *xmit_buf;
 208        int                        xmit_head;
 209        int                        xmit_tail;
 210        int                        xmit_cnt;
 211};
 212
 213static struct isi_board isi_card[BOARD_COUNT];
 214static struct isi_port  isi_ports[PORT_COUNT];
 215
 216/*
 217 *        Locking functions for card level locking. We need to own both
 218 *        the kernel lock for the card and have the card in a position that
 219 *        it wants to talk.
 220 */
 221
 222static inline int WaitTillCardIsFree(unsigned long base)
 223{
 224        unsigned int count = 0;
 225        unsigned int a = in_atomic(); /* do we run under spinlock? */
 226
 227        while (!(inw(base + 0xe) & 0x1) && count++ < 100)
 228                if (a)
 229                        mdelay(1);
 230                else
 231                        msleep(1);
 232
 233        return !(inw(base + 0xe) & 0x1);
 234}
 235
 236static int lock_card(struct isi_board *card)
 237{
 238        unsigned long base = card->base;
 239        unsigned int retries, a;
 240
 241        for (retries = 0; retries < 10; retries++) {
Show full sources