Index: sys/dev/mrsas/mrsas.c =================================================================== --- sys/dev/mrsas/mrsas.c +++ sys/dev/mrsas/mrsas.c @@ -388,8 +388,8 @@ if ((id = mrsas_find_ident(dev)) != NULL) { if (first_ctrl) { - printf("AVAGO MegaRAID SAS FreeBSD mrsas driver version: %s\n", - MRSAS_VERSION); + printf("Broadcom MegaRAID SAS mrsas driver version: %s\n", + MRSAS_VERSION); first_ctrl = 0; } device_set_desc(dev, id->desc); @@ -500,7 +500,7 @@ /* XXX default to some debugging for now */ sc->mrsas_debug = - (MRSAS_FAULT | MRSAS_OCR | MRSAS_INFO | MRSAS_TRACE | MRSAS_AEN); + (MRSAS_FAULT | MRSAS_AEN); sc->mrsas_io_timeout = MRSAS_IO_TIMEOUT; sc->mrsas_fw_fault_check_delay = 1; sc->reset_count = 0; @@ -809,7 +809,7 @@ (sc->mrsas_dev, SYS_RES_IRQ, &sc->irq_id[i] ,RF_ACTIVE); if (sc->mrsas_irq[i] == NULL) { - device_printf(sc->mrsas_dev, "Can't allocate MSI-x\n"); + device_printf(sc->mrsas_dev, "Can't allocate MSI-X\n"); goto irq_alloc_failed; } if (bus_setup_intr(sc->mrsas_dev, @@ -818,7 +818,7 @@ NULL, mrsas_isr, &sc->irq_context[i], &sc->intr_handle[i])) { device_printf(sc->mrsas_dev, - "Cannot set up MSI-x interrupt handler\n"); + "Cannot set up MSI-X interrupt handler\n"); goto irq_alloc_failed; } } @@ -837,10 +837,10 @@ mrsas_allocate_msix(struct mrsas_softc *sc) { if (pci_alloc_msix(sc->mrsas_dev, &sc->msix_vectors) == 0) { - device_printf(sc->mrsas_dev, "Using MSI-X with %d number" - " of vectors\n", sc->msix_vectors); + device_printf(sc->mrsas_dev, "Using MSI-X with %d vectors", + sc->msix_vectors); } else { - device_printf(sc->mrsas_dev, "MSI-x setup failed\n"); + device_printf(sc->mrsas_dev, "MSI-X setup failed\n"); goto irq_alloc_failed; } return SUCCESS; @@ -1069,10 +1069,10 @@ "Further events from the controller will not be communicated.\n" "Either there is some problem in the controller" "or the controller does not support AEN.\n" - "Please contact to the SUPPORT TEAM if the problem persists\n"); + "Please contact the SUPPORT TEAM if the problem persists\n"); } if (sc->mrsas_ich.ich_arg != NULL) { - device_printf(sc->mrsas_dev, "Disestablish mrsas intr hook\n"); + mrsas_dprint(sc, MRSAS_INFO, "Disestablish mrsas intr hook\n"); config_intrhook_disestablish(&sc->mrsas_ich); sc->mrsas_ich.ich_arg = NULL; } @@ -1593,7 +1593,7 @@ mrsas_setup_irq(struct mrsas_softc *sc) { if (sc->msix_enable && (mrsas_setup_msix(sc) == SUCCESS)) - device_printf(sc->mrsas_dev, "MSI-x interrupts setup success\n"); + mrsas_dprint(sc, MRSAS_INFO, "MSI-X interrupts setup success\n"); else { device_printf(sc->mrsas_dev, "Fall back to legacy interrupt\n"); @@ -2325,7 +2325,7 @@ else sc->use_seqnum_jbod_fp = 0; - device_printf(sc->mrsas_dev, "Jbod map is supported\n"); + mrsas_dprint(sc, MRSAS_INFO, "Jbod map is supported\n"); } /* @@ -2414,8 +2414,8 @@ else sc->msix_enable = 0; - device_printf(sc->mrsas_dev, "FW supports <%d> MSIX vector," - "Online CPU %d Current MSIX <%d>\n", + mrsas_dprint(sc, MRSAS_INFO, "FW supports %d MSI-X vector, " + "online CPUs %d, current MSI-X %d\n", fw_msix_count, mp_ncpus, sc->msix_vectors); } /* @@ -2437,7 +2437,7 @@ if ((scratch_pad_4 & MR_NVME_PAGE_SIZE_MASK) >= MR_DEFAULT_NVME_PAGE_SHIFT) sc->nvme_page_size = 1 << (scratch_pad_4 & MR_NVME_PAGE_SIZE_MASK); - device_printf(sc->mrsas_dev, "NVME page size\t: (%d)\n", sc->nvme_page_size); + device_printf(sc->mrsas_dev, "NVME page size: %d\n", sc->nvme_page_size); } /* Allocate internal commands for pass-thru */ @@ -2462,13 +2462,13 @@ (u_int8_t)sc->ctrl_info->adapterOperations3.supportSecurityonJBOD; if (sc->secure_jbod_support) - device_printf(sc->mrsas_dev, "FW supports SED \n"); + device_printf(sc->mrsas_dev, "FW supports SED\n"); if (sc->use_seqnum_jbod_fp) - device_printf(sc->mrsas_dev, "FW supports JBOD Map \n"); + device_printf(sc->mrsas_dev, "FW supports JBOD Map\n"); if (sc->support_morethan256jbod) - device_printf(sc->mrsas_dev, "FW supports JBOD Map Ext \n"); + device_printf(sc->mrsas_dev, "FW supports JBOD Map Ext\n"); if (mrsas_setup_raidmap(sc) != SUCCESS) { device_printf(sc->mrsas_dev, "Error: RAID map setup FAILED !!! " @@ -2819,8 +2819,8 @@ outbound_scratch_pad_2)); sc->atomic_desc_support = (scratch_pad_2 & MR_ATOMIC_DESCRIPTOR_SUPPORT_OFFSET) ? 1 : 0; - device_printf(sc->mrsas_dev, "FW supports atomic descriptor: %s\n", - sc->atomic_desc_support ? "Yes" : "No"); + mrsas_dprint(sc, MRSAS_INFO, "FW supports atomic descriptor: %s\n", + sc->atomic_desc_support ? "yes" : "no"); } mrsas_free_ioc_cmd(sc); @@ -4192,7 +4192,7 @@ dcmd->data_xfer_len = 0; dcmd->opcode = opcode; - device_printf(sc->mrsas_dev, "Preparing to shut down controller.\n"); + mrsas_dprint(sc, MRSAS_TRACE, "Preparing to shut down controller.\n"); mrsas_issue_blocked_cmd(sc, cmd); mrsas_release_mfi_cmd(cmd); @@ -4534,7 +4534,7 @@ { sc->target_list[target_id].target_id = target_id; - device_printf(sc->mrsas_dev, + mrsas_dprint(sc, MRSAS_TRACE, "%s created target ID: 0x%x\n", (target_id < MRSAS_MAX_PD ? "System PD" : "VD"), (target_id < MRSAS_MAX_PD ? target_id : (target_id - MRSAS_MAX_PD))); @@ -4561,7 +4561,7 @@ u_int16_t target_id) { sc->target_list[target_id].target_id = 0xffff; - device_printf(sc->mrsas_dev, + mrsas_dprint(sc, MRSAS_TRACE, "%s deleted target ID: 0x%x\n", (target_id < MRSAS_MAX_PD ? "System PD" : "VD"), (target_id < MRSAS_MAX_PD ? target_id : (target_id - MRSAS_MAX_PD))); @@ -4938,7 +4938,7 @@ return; } if (sc->remove_in_progress || sc->reset_in_progress) { - device_printf(sc->mrsas_dev, "Returning from %s, line no %d\n", + mrsas_dprint(sc, MRSAS_TRACE, "Returning from %s, line no %d\n", __func__, __LINE__); return; }