static void pcipcwd_show_card_info(void) { int got_fw_rev, fw_rev_major, fw_rev_minor; char fw_ver_str[20]; /* The cards firmware version */ int option_switches; got_fw_rev = send_command(CMD_GET_FIRMWARE_VERSION, &fw_rev_major, &fw_rev_minor); if (got_fw_rev) { sprintf(fw_ver_str, "%u.%02u", fw_rev_major, fw_rev_minor); } else { sprintf(fw_ver_str, "<card no answer>"); } /* Get switch settings */ option_switches = pcipcwd_get_option_switches(); printk(KERN_INFO PFX "Found card at port 0x%04x (Firmware: %s) %s temp option\n", (int) pcipcwd_private.io_addr, fw_ver_str, (pcipcwd_private.supports_temp ? "with" : "without")); printk(KERN_INFO PFX "Option switches (0x%02x): Temperature Reset Enable=%s, Power On Delay=%s\n", option_switches, ((option_switches & 0x10) ? "ON" : "OFF"), ((option_switches & 0x08) ? "ON" : "OFF")); if (pcipcwd_private.boot_status & WDIOF_CARDRESET) printk(KERN_INFO PFX "Previous reset was caused by the Watchdog card\n"); if (pcipcwd_private.boot_status & WDIOF_OVERHEAT) printk(KERN_INFO PFX "Card sensed a CPU Overheat\n"); if (pcipcwd_private.boot_status == 0) printk(KERN_INFO PFX "No previous trip detected - Cold boot or reset\n"); }
static void pcipcwd_show_card_info(void) { int got_fw_rev, fw_rev_major, fw_rev_minor; char fw_ver_str[20]; /* The cards firmware version */ int option_switches; got_fw_rev = send_command(CMD_GET_FIRMWARE_VERSION, &fw_rev_major, &fw_rev_minor); if (got_fw_rev) sprintf(fw_ver_str, "%u.%02u", fw_rev_major, fw_rev_minor); else sprintf(fw_ver_str, "<card no answer>"); /* Get switch settings */ option_switches = pcipcwd_get_option_switches(); // printk(KERN_INFO PFX "Found card at port " // "0x%04x (Firmware: %s) %s temp option\n", // (int) pcipcwd_private.io_addr, fw_ver_str, ; // printk(KERN_INFO PFX "Option switches (0x%02x): " // "Temperature Reset Enable=%s, Power On Delay=%s\n", // option_switches, // ((option_switches & 0x10) ? "ON" : "OFF"), ; if (pcipcwd_private.boot_status & WDIOF_CARDRESET) // printk(KERN_INFO PFX ; if (pcipcwd_private.boot_status & WDIOF_OVERHEAT) ; if (pcipcwd_private.boot_status == 0) // printk(KERN_INFO PFX ; }