Showing error 537

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


Source:

2473        if ( !strcmp(lp->id, "HWP1920")  ||
2474             (lp->pci_dev &&
2475              lp->pci_dev->vendor == PCI_VENDOR_ID &&
2476              (lp->pci_dev->device == PCI_DEVICE_ID_HP_J2970A ||
2477               lp->pci_dev->device == PCI_DEVICE_ID_HP_J2973A)))
2478                return HP100_LAN_ERR;
2479
2480        if (val_VG & HP100_LINK_CABLE_ST)        /* Can hear the HUBs tone. */
2481                return HP100_LAN_100;
2482        return HP100_LAN_ERR;
2483}
2484
2485static int hp100_down_vg_link(struct net_device *dev)
2486{
2487        struct hp100_private *lp = netdev_priv(dev);
2488        int ioaddr = dev->base_addr;
2489        unsigned long time;
2490        long savelan, newlan;
2491
2492#ifdef HP100_DEBUG_B
2493        hp100_outw(0x4224, TRACE);
2494        printk("hp100: %s: down_vg_link\n", dev->name);
2495#endif
2496
2497        hp100_page(MAC_CTRL);
2498        time = jiffies + (HZ / 4);
2499        do {
2500                if (hp100_inb(VG_LAN_CFG_1) & HP100_LINK_CABLE_ST)
2501                        break;
2502                if (!in_interrupt())
2503                        schedule_timeout_interruptible(1);
2504        } while (time_after(time, jiffies));
2505
2506        if (time_after_eq(jiffies, time))        /* no signal->no logout */
2507                return 0;
2508
2509        /* Drop the VG Link by clearing the link up cmd and load addr. */
2510
2511        hp100_andb(~(HP100_LOAD_ADDR | HP100_LINK_CMD), VG_LAN_CFG_1);
2512        hp100_orb(HP100_VG_SEL, VG_LAN_CFG_1);
2513
Show full sources