Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eabb08ad authored by Kashyap, Desai's avatar Kashyap, Desai Committed by James Bottomley
Browse files

[SCSI] mpt2sas: print level KERN_DEBUG is replaced by KERN_INFO



Converting print level from  MPT2SAS_DEBUG_FMT  to MPT2SAS_INFO_FMT.

Signed-off-by: default avatarKashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 570c67ac
Loading
Loading
Loading
Loading
+41 −41
Original line number Original line Diff line number Diff line
@@ -1242,7 +1242,7 @@ mpt2sas_base_map_resources(struct MPT2SAS_ADAPTER *ioc)
	u64 pio_chip = 0;
	u64 pio_chip = 0;
	u64 chip_phys = 0;
	u64 chip_phys = 0;


	dinitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n",
	dinitprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n",
	    ioc->name, __func__));
	    ioc->name, __func__));


	ioc->bars = pci_select_bars(pdev, IORESOURCE_MEM);
	ioc->bars = pci_select_bars(pdev, IORESOURCE_MEM);
@@ -1865,7 +1865,7 @@ _base_static_config_pages(struct MPT2SAS_ADAPTER *ioc)
static void
static void
_base_release_memory_pools(struct MPT2SAS_ADAPTER *ioc)
_base_release_memory_pools(struct MPT2SAS_ADAPTER *ioc)
{
{
	dexitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name,
	dexitprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
	    __func__));
	    __func__));


	if (ioc->request) {
	if (ioc->request) {
@@ -1951,7 +1951,7 @@ _base_allocate_memory_pools(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
	u32 retry_sz;
	u32 retry_sz;
	u16 max_request_credit;
	u16 max_request_credit;


	dinitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name,
	dinitprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
	    __func__));
	    __func__));


	retry_sz = 0;
	retry_sz = 0;
@@ -2378,7 +2378,7 @@ _base_wait_for_doorbell_int(struct MPT2SAS_ADAPTER *ioc, int timeout,
	do {
	do {
		int_status = readl(&ioc->chip->HostInterruptStatus);
		int_status = readl(&ioc->chip->HostInterruptStatus);
		if (int_status & MPI2_HIS_IOC2SYS_DB_STATUS) {
		if (int_status & MPI2_HIS_IOC2SYS_DB_STATUS) {
			dhsprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: "
			dhsprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: "
			    "successfull count(%d), timeout(%d)\n", ioc->name,
			    "successfull count(%d), timeout(%d)\n", ioc->name,
			    __func__, count, timeout));
			    __func__, count, timeout));
			return 0;
			return 0;
@@ -2419,7 +2419,7 @@ _base_wait_for_doorbell_ack(struct MPT2SAS_ADAPTER *ioc, int timeout,
	do {
	do {
		int_status = readl(&ioc->chip->HostInterruptStatus);
		int_status = readl(&ioc->chip->HostInterruptStatus);
		if (!(int_status & MPI2_HIS_SYS2IOC_DB_STATUS)) {
		if (!(int_status & MPI2_HIS_SYS2IOC_DB_STATUS)) {
			dhsprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: "
			dhsprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: "
			    "successfull count(%d), timeout(%d)\n", ioc->name,
			    "successfull count(%d), timeout(%d)\n", ioc->name,
			    __func__, count, timeout));
			    __func__, count, timeout));
			return 0;
			return 0;
@@ -2467,7 +2467,7 @@ _base_wait_for_doorbell_not_used(struct MPT2SAS_ADAPTER *ioc, int timeout,
	do {
	do {
		doorbell_reg = readl(&ioc->chip->Doorbell);
		doorbell_reg = readl(&ioc->chip->Doorbell);
		if (!(doorbell_reg & MPI2_DOORBELL_USED)) {
		if (!(doorbell_reg & MPI2_DOORBELL_USED)) {
			dhsprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: "
			dhsprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: "
			    "successfull count(%d), timeout(%d)\n", ioc->name,
			    "successfull count(%d), timeout(%d)\n", ioc->name,
			    __func__, count, timeout));
			    __func__, count, timeout));
			return 0;
			return 0;
@@ -2641,9 +2641,9 @@ _base_handshake_req_reply_wait(struct MPT2SAS_ADAPTER *ioc, int request_bytes,


	if (ioc->logging_level & MPT_DEBUG_INIT) {
	if (ioc->logging_level & MPT_DEBUG_INIT) {
		mfp = (u32 *)reply;
		mfp = (u32 *)reply;
		printk(KERN_DEBUG "\toffset:data\n");
		printk(KERN_INFO "\toffset:data\n");
		for (i = 0; i < reply_bytes/4; i++)
		for (i = 0; i < reply_bytes/4; i++)
			printk(KERN_DEBUG "\t[0x%02x]:%08x\n", i*4,
			printk(KERN_INFO "\t[0x%02x]:%08x\n", i*4,
			    le32_to_cpu(mfp[i]));
			    le32_to_cpu(mfp[i]));
	}
	}
	return 0;
	return 0;
@@ -2676,7 +2676,7 @@ mpt2sas_base_sas_iounit_control(struct MPT2SAS_ADAPTER *ioc,
	void *request;
	void *request;
	u16 wait_state_count;
	u16 wait_state_count;


	dinitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name,
	dinitprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
	    __func__));
	    __func__));


	mutex_lock(&ioc->base_cmds.mutex);
	mutex_lock(&ioc->base_cmds.mutex);
@@ -2781,7 +2781,7 @@ mpt2sas_base_scsi_enclosure_processor(struct MPT2SAS_ADAPTER *ioc,
	void *request;
	void *request;
	u16 wait_state_count;
	u16 wait_state_count;


	dinitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name,
	dinitprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
	    __func__));
	    __func__));


	mutex_lock(&ioc->base_cmds.mutex);
	mutex_lock(&ioc->base_cmds.mutex);
@@ -2869,7 +2869,7 @@ _base_get_port_facts(struct MPT2SAS_ADAPTER *ioc, int port, int sleep_flag)
	Mpi2PortFactsReply_t mpi_reply, *pfacts;
	Mpi2PortFactsReply_t mpi_reply, *pfacts;
	int mpi_reply_sz, mpi_request_sz, r;
	int mpi_reply_sz, mpi_request_sz, r;


	dinitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name,
	dinitprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
	    __func__));
	    __func__));


	mpi_reply_sz = sizeof(Mpi2PortFactsReply_t);
	mpi_reply_sz = sizeof(Mpi2PortFactsReply_t);
@@ -2911,7 +2911,7 @@ _base_get_ioc_facts(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
	Mpi2IOCFactsReply_t mpi_reply, *facts;
	Mpi2IOCFactsReply_t mpi_reply, *facts;
	int mpi_reply_sz, mpi_request_sz, r;
	int mpi_reply_sz, mpi_request_sz, r;


	dinitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name,
	dinitprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
	    __func__));
	    __func__));


	mpi_reply_sz = sizeof(Mpi2IOCFactsReply_t);
	mpi_reply_sz = sizeof(Mpi2IOCFactsReply_t);
@@ -2983,7 +2983,7 @@ _base_send_ioc_init(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
	struct timeval current_time;
	struct timeval current_time;
	u16 ioc_status;
	u16 ioc_status;


	dinitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name,
	dinitprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
	    __func__));
	    __func__));


	memset(&mpi_request, 0, sizeof(Mpi2IOCInitRequest_t));
	memset(&mpi_request, 0, sizeof(Mpi2IOCInitRequest_t));
@@ -3044,9 +3044,9 @@ _base_send_ioc_init(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
		int i;
		int i;


		mfp = (u32 *)&mpi_request;
		mfp = (u32 *)&mpi_request;
		printk(KERN_DEBUG "\toffset:data\n");
		printk(KERN_INFO "\toffset:data\n");
		for (i = 0; i < sizeof(Mpi2IOCInitRequest_t)/4; i++)
		for (i = 0; i < sizeof(Mpi2IOCInitRequest_t)/4; i++)
			printk(KERN_DEBUG "\t[0x%02x]:%08x\n", i*4,
			printk(KERN_INFO "\t[0x%02x]:%08x\n", i*4,
			    le32_to_cpu(mfp[i]));
			    le32_to_cpu(mfp[i]));
	}
	}


@@ -3125,7 +3125,7 @@ _base_send_port_enable(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
			r = -ETIME;
			r = -ETIME;
		goto out;
		goto out;
	} else
	} else
		dinitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: complete\n",
		dinitprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: complete\n",
		    ioc->name, __func__));
		    ioc->name, __func__));


	ioc_state = _base_wait_on_iocstate(ioc, MPI2_IOC_STATE_OPERATIONAL,
	ioc_state = _base_wait_on_iocstate(ioc, MPI2_IOC_STATE_OPERATIONAL,
@@ -3185,7 +3185,7 @@ _base_event_notification(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
	int r = 0;
	int r = 0;
	int i;
	int i;


	dinitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name,
	dinitprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
	    __func__));
	    __func__));


	if (ioc->base_cmds.status & MPT2_CMD_PENDING) {
	if (ioc->base_cmds.status & MPT2_CMD_PENDING) {
@@ -3223,7 +3223,7 @@ _base_event_notification(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
		else
		else
			r = -ETIME;
			r = -ETIME;
	} else
	} else
		dinitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: complete\n",
		dinitprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: complete\n",
		    ioc->name, __func__));
		    ioc->name, __func__));
	ioc->base_cmds.status = MPT2_CMD_NOT_USED;
	ioc->base_cmds.status = MPT2_CMD_NOT_USED;
	return r;
	return r;
@@ -3285,7 +3285,7 @@ _base_diag_reset(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)


	_base_save_msix_table(ioc);
	_base_save_msix_table(ioc);


	drsprintk(ioc, printk(MPT2SAS_DEBUG_FMT "clear interrupts\n",
	drsprintk(ioc, printk(MPT2SAS_INFO_FMT "clear interrupts\n",
	    ioc->name));
	    ioc->name));


	count = 0;
	count = 0;
@@ -3293,7 +3293,7 @@ _base_diag_reset(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
		/* Write magic sequence to WriteSequence register
		/* Write magic sequence to WriteSequence register
		 * Loop until in diagnostic mode
		 * Loop until in diagnostic mode
		 */
		 */
		drsprintk(ioc, printk(MPT2SAS_DEBUG_FMT "write magic "
		drsprintk(ioc, printk(MPT2SAS_INFO_FMT "write magic "
		    "sequence\n", ioc->name));
		    "sequence\n", ioc->name));
		writel(MPI2_WRSEQ_FLUSH_KEY_VALUE, &ioc->chip->WriteSequence);
		writel(MPI2_WRSEQ_FLUSH_KEY_VALUE, &ioc->chip->WriteSequence);
		writel(MPI2_WRSEQ_1ST_KEY_VALUE, &ioc->chip->WriteSequence);
		writel(MPI2_WRSEQ_1ST_KEY_VALUE, &ioc->chip->WriteSequence);
@@ -3313,7 +3313,7 @@ _base_diag_reset(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
			goto out;
			goto out;


		host_diagnostic = readl(&ioc->chip->HostDiagnostic);
		host_diagnostic = readl(&ioc->chip->HostDiagnostic);
		drsprintk(ioc, printk(MPT2SAS_DEBUG_FMT "wrote magic "
		drsprintk(ioc, printk(MPT2SAS_INFO_FMT "wrote magic "
		    "sequence: count(%d), host_diagnostic(0x%08x)\n",
		    "sequence: count(%d), host_diagnostic(0x%08x)\n",
		    ioc->name, count, host_diagnostic));
		    ioc->name, count, host_diagnostic));


@@ -3321,7 +3321,7 @@ _base_diag_reset(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)


	hcb_size = readl(&ioc->chip->HCBSize);
	hcb_size = readl(&ioc->chip->HCBSize);


	drsprintk(ioc, printk(MPT2SAS_DEBUG_FMT "diag reset: issued\n",
	drsprintk(ioc, printk(MPT2SAS_INFO_FMT "diag reset: issued\n",
	    ioc->name));
	    ioc->name));
	writel(host_diagnostic | MPI2_DIAG_RESET_ADAPTER,
	writel(host_diagnostic | MPI2_DIAG_RESET_ADAPTER,
	     &ioc->chip->HostDiagnostic);
	     &ioc->chip->HostDiagnostic);
@@ -3348,29 +3348,29 @@ _base_diag_reset(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)


	if (host_diagnostic & MPI2_DIAG_HCB_MODE) {
	if (host_diagnostic & MPI2_DIAG_HCB_MODE) {


		drsprintk(ioc, printk(MPT2SAS_DEBUG_FMT "restart the adapter "
		drsprintk(ioc, printk(MPT2SAS_INFO_FMT "restart the adapter "
		    "assuming the HCB Address points to good F/W\n",
		    "assuming the HCB Address points to good F/W\n",
		    ioc->name));
		    ioc->name));
		host_diagnostic &= ~MPI2_DIAG_BOOT_DEVICE_SELECT_MASK;
		host_diagnostic &= ~MPI2_DIAG_BOOT_DEVICE_SELECT_MASK;
		host_diagnostic |= MPI2_DIAG_BOOT_DEVICE_SELECT_HCDW;
		host_diagnostic |= MPI2_DIAG_BOOT_DEVICE_SELECT_HCDW;
		writel(host_diagnostic, &ioc->chip->HostDiagnostic);
		writel(host_diagnostic, &ioc->chip->HostDiagnostic);


		drsprintk(ioc, printk(MPT2SAS_DEBUG_FMT
		drsprintk(ioc, printk(MPT2SAS_INFO_FMT
		    "re-enable the HCDW\n", ioc->name));
		    "re-enable the HCDW\n", ioc->name));
		writel(hcb_size | MPI2_HCB_SIZE_HCB_ENABLE,
		writel(hcb_size | MPI2_HCB_SIZE_HCB_ENABLE,
		    &ioc->chip->HCBSize);
		    &ioc->chip->HCBSize);
	}
	}


	drsprintk(ioc, printk(MPT2SAS_DEBUG_FMT "restart the adapter\n",
	drsprintk(ioc, printk(MPT2SAS_INFO_FMT "restart the adapter\n",
	    ioc->name));
	    ioc->name));
	writel(host_diagnostic & ~MPI2_DIAG_HOLD_IOC_RESET,
	writel(host_diagnostic & ~MPI2_DIAG_HOLD_IOC_RESET,
	    &ioc->chip->HostDiagnostic);
	    &ioc->chip->HostDiagnostic);


	drsprintk(ioc, printk(MPT2SAS_DEBUG_FMT "disable writes to the "
	drsprintk(ioc, printk(MPT2SAS_INFO_FMT "disable writes to the "
	    "diagnostic register\n", ioc->name));
	    "diagnostic register\n", ioc->name));
	writel(MPI2_WRSEQ_FLUSH_KEY_VALUE, &ioc->chip->WriteSequence);
	writel(MPI2_WRSEQ_FLUSH_KEY_VALUE, &ioc->chip->WriteSequence);


	drsprintk(ioc, printk(MPT2SAS_DEBUG_FMT "Wait for FW to go to the "
	drsprintk(ioc, printk(MPT2SAS_INFO_FMT "Wait for FW to go to the "
	    "READY state\n", ioc->name));
	    "READY state\n", ioc->name));
	ioc_state = _base_wait_on_iocstate(ioc, MPI2_IOC_STATE_READY, 20,
	ioc_state = _base_wait_on_iocstate(ioc, MPI2_IOC_STATE_READY, 20,
	    sleep_flag);
	    sleep_flag);
@@ -3404,18 +3404,18 @@ _base_make_ioc_ready(struct MPT2SAS_ADAPTER *ioc, int sleep_flag,
	u32 ioc_state;
	u32 ioc_state;
	int rc;
	int rc;


	dinitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name,
	dinitprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
	    __func__));
	    __func__));


	ioc_state = mpt2sas_base_get_iocstate(ioc, 0);
	ioc_state = mpt2sas_base_get_iocstate(ioc, 0);
	dhsprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: ioc_state(0x%08x)\n",
	dhsprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: ioc_state(0x%08x)\n",
	    ioc->name, __func__, ioc_state));
	    ioc->name, __func__, ioc_state));


	if ((ioc_state & MPI2_IOC_STATE_MASK) == MPI2_IOC_STATE_READY)
	if ((ioc_state & MPI2_IOC_STATE_MASK) == MPI2_IOC_STATE_READY)
		return 0;
		return 0;


	if (ioc_state & MPI2_DOORBELL_USED) {
	if (ioc_state & MPI2_DOORBELL_USED) {
		dhsprintk(ioc, printk(MPT2SAS_DEBUG_FMT "unexpected doorbell "
		dhsprintk(ioc, printk(MPT2SAS_INFO_FMT "unexpected doorbell "
		    "active!\n", ioc->name));
		    "active!\n", ioc->name));
		goto issue_diag_reset;
		goto issue_diag_reset;
	}
	}
@@ -3458,7 +3458,7 @@ _base_make_ioc_operational(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
	u16 smid;
	u16 smid;
	struct _tr_list *delayed_tr, *delayed_tr_next;
	struct _tr_list *delayed_tr, *delayed_tr_next;


	dinitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name,
	dinitprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
	    __func__));
	    __func__));


	/* clean the delayed target reset list */
	/* clean the delayed target reset list */
@@ -3554,7 +3554,7 @@ mpt2sas_base_free_resources(struct MPT2SAS_ADAPTER *ioc)
{
{
	struct pci_dev *pdev = ioc->pdev;
	struct pci_dev *pdev = ioc->pdev;


	dexitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name,
	dexitprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
	    __func__));
	    __func__));


	_base_mask_interrupts(ioc);
	_base_mask_interrupts(ioc);
@@ -3587,7 +3587,7 @@ mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc)
{
{
	int r, i;
	int r, i;


	dinitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name,
	dinitprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
	    __func__));
	    __func__));


	r = mpt2sas_base_map_resources(ioc);
	r = mpt2sas_base_map_resources(ioc);
@@ -3719,7 +3719,7 @@ void
mpt2sas_base_detach(struct MPT2SAS_ADAPTER *ioc)
mpt2sas_base_detach(struct MPT2SAS_ADAPTER *ioc)
{
{


	dexitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name,
	dexitprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
	    __func__));
	    __func__));


	mpt2sas_base_stop_watchdog(ioc);
	mpt2sas_base_stop_watchdog(ioc);
@@ -3752,11 +3752,11 @@ _base_reset_handler(struct MPT2SAS_ADAPTER *ioc, int reset_phase)
{
{
	switch (reset_phase) {
	switch (reset_phase) {
	case MPT2_IOC_PRE_RESET:
	case MPT2_IOC_PRE_RESET:
		dtmprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: "
		dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: "
		    "MPT2_IOC_PRE_RESET\n", ioc->name, __func__));
		    "MPT2_IOC_PRE_RESET\n", ioc->name, __func__));
		break;
		break;
	case MPT2_IOC_AFTER_RESET:
	case MPT2_IOC_AFTER_RESET:
		dtmprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: "
		dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: "
		    "MPT2_IOC_AFTER_RESET\n", ioc->name, __func__));
		    "MPT2_IOC_AFTER_RESET\n", ioc->name, __func__));
		if (ioc->transport_cmds.status & MPT2_CMD_PENDING) {
		if (ioc->transport_cmds.status & MPT2_CMD_PENDING) {
			ioc->transport_cmds.status |= MPT2_CMD_RESET;
			ioc->transport_cmds.status |= MPT2_CMD_RESET;
@@ -3776,7 +3776,7 @@ _base_reset_handler(struct MPT2SAS_ADAPTER *ioc, int reset_phase)
		}
		}
		break;
		break;
	case MPT2_IOC_DONE_RESET:
	case MPT2_IOC_DONE_RESET:
		dtmprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: "
		dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: "
		    "MPT2_IOC_DONE_RESET\n", ioc->name, __func__));
		    "MPT2_IOC_DONE_RESET\n", ioc->name, __func__));
		break;
		break;
	}
	}
@@ -3836,7 +3836,7 @@ mpt2sas_base_hard_reset_handler(struct MPT2SAS_ADAPTER *ioc, int sleep_flag,
	int r;
	int r;
	unsigned long flags;
	unsigned long flags;


	dtmprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: enter\n", ioc->name,
	dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: enter\n", ioc->name,
	    __func__));
	    __func__));


	if (mpt2sas_fwfault_debug)
	if (mpt2sas_fwfault_debug)
@@ -3854,7 +3854,7 @@ mpt2sas_base_hard_reset_handler(struct MPT2SAS_ADAPTER *ioc, int sleep_flag,
		do {
		do {
			ssleep(1);
			ssleep(1);
		} while (ioc->shost_recovery == 1);
		} while (ioc->shost_recovery == 1);
		dtmprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: exit\n", ioc->name,
		dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: exit\n", ioc->name,
		    __func__));
		    __func__));
		return ioc->ioc_reset_in_progress_status;
		return ioc->ioc_reset_in_progress_status;
	}
	}
@@ -3874,7 +3874,7 @@ mpt2sas_base_hard_reset_handler(struct MPT2SAS_ADAPTER *ioc, int sleep_flag,
	if (!r)
	if (!r)
		_base_reset_handler(ioc, MPT2_IOC_DONE_RESET);
		_base_reset_handler(ioc, MPT2_IOC_DONE_RESET);
 out:
 out:
	dtmprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: %s\n",
	dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: %s\n",
	    ioc->name, __func__, ((r == 0) ? "SUCCESS" : "FAILED")));
	    ioc->name, __func__, ((r == 0) ? "SUCCESS" : "FAILED")));


	spin_lock_irqsave(&ioc->ioc_reset_in_progress_lock, flags);
	spin_lock_irqsave(&ioc->ioc_reset_in_progress_lock, flags);
@@ -3884,7 +3884,7 @@ mpt2sas_base_hard_reset_handler(struct MPT2SAS_ADAPTER *ioc, int sleep_flag,
	spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags);
	spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags);
	mutex_unlock(&ioc->reset_in_progress_mutex);
	mutex_unlock(&ioc->reset_in_progress_mutex);


	dtmprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: exit\n", ioc->name,
	dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: exit\n", ioc->name,
	    __func__));
	    __func__));
	return r;
	return r;
}
}
+0 −1
Original line number Original line Diff line number Diff line
@@ -124,7 +124,6 @@
 * logging format
 * logging format
 */
 */
#define MPT2SAS_FMT			"%s: "
#define MPT2SAS_FMT			"%s: "
#define MPT2SAS_DEBUG_FMT		KERN_DEBUG MPT2SAS_FMT
#define MPT2SAS_INFO_FMT		KERN_INFO MPT2SAS_FMT
#define MPT2SAS_INFO_FMT		KERN_INFO MPT2SAS_FMT
#define MPT2SAS_NOTE_FMT		KERN_NOTICE MPT2SAS_FMT
#define MPT2SAS_NOTE_FMT		KERN_NOTICE MPT2SAS_FMT
#define MPT2SAS_WARN_FMT		KERN_WARNING MPT2SAS_FMT
#define MPT2SAS_WARN_FMT		KERN_WARNING MPT2SAS_FMT
+2 −2
Original line number Original line Diff line number Diff line
@@ -159,7 +159,7 @@ _config_display_some_debug(struct MPT2SAS_ADAPTER *ioc, u16 smid,
	if (!desc)
	if (!desc)
		return;
		return;


	printk(MPT2SAS_DEBUG_FMT "%s: %s(%d), action(%d), form(0x%08x), "
	printk(MPT2SAS_INFO_FMT "%s: %s(%d), action(%d), form(0x%08x), "
	    "smid(%d)\n", ioc->name, calling_function_name, desc,
	    "smid(%d)\n", ioc->name, calling_function_name, desc,
	    mpi_request->Header.PageNumber, mpi_request->Action,
	    mpi_request->Header.PageNumber, mpi_request->Action,
	    le32_to_cpu(mpi_request->PageAddress), smid);
	    le32_to_cpu(mpi_request->PageAddress), smid);
@@ -168,7 +168,7 @@ _config_display_some_debug(struct MPT2SAS_ADAPTER *ioc, u16 smid,
		return;
		return;


	if (mpi_reply->IOCStatus || mpi_reply->IOCLogInfo)
	if (mpi_reply->IOCStatus || mpi_reply->IOCLogInfo)
		printk(MPT2SAS_DEBUG_FMT
		printk(MPT2SAS_INFO_FMT
		    "\tiocstatus(0x%04x), loginfo(0x%08x)\n",
		    "\tiocstatus(0x%04x), loginfo(0x%08x)\n",
		    ioc->name, le16_to_cpu(mpi_reply->IOCStatus),
		    ioc->name, le16_to_cpu(mpi_reply->IOCStatus),
		    le32_to_cpu(mpi_reply->IOCLogInfo));
		    le32_to_cpu(mpi_reply->IOCLogInfo));
+34 −34
Original line number Original line Diff line number Diff line
@@ -188,14 +188,14 @@ _ctl_display_some_debug(struct MPT2SAS_ADAPTER *ioc, u16 smid,
	if (!desc)
	if (!desc)
		return;
		return;


	printk(MPT2SAS_DEBUG_FMT "%s: %s, smid(%d)\n",
	printk(MPT2SAS_INFO_FMT "%s: %s, smid(%d)\n",
	    ioc->name, calling_function_name, desc, smid);
	    ioc->name, calling_function_name, desc, smid);


	if (!mpi_reply)
	if (!mpi_reply)
		return;
		return;


	if (mpi_reply->IOCStatus || mpi_reply->IOCLogInfo)
	if (mpi_reply->IOCStatus || mpi_reply->IOCLogInfo)
		printk(MPT2SAS_DEBUG_FMT
		printk(MPT2SAS_INFO_FMT
		    "\tiocstatus(0x%04x), loginfo(0x%08x)\n",
		    "\tiocstatus(0x%04x), loginfo(0x%08x)\n",
		    ioc->name, le16_to_cpu(mpi_reply->IOCStatus),
		    ioc->name, le16_to_cpu(mpi_reply->IOCStatus),
		    le32_to_cpu(mpi_reply->IOCLogInfo));
		    le32_to_cpu(mpi_reply->IOCLogInfo));
@@ -206,7 +206,7 @@ _ctl_display_some_debug(struct MPT2SAS_ADAPTER *ioc, u16 smid,
		Mpi2SCSIIOReply_t *scsi_reply =
		Mpi2SCSIIOReply_t *scsi_reply =
		    (Mpi2SCSIIOReply_t *)mpi_reply;
		    (Mpi2SCSIIOReply_t *)mpi_reply;
		if (scsi_reply->SCSIState || scsi_reply->SCSIStatus)
		if (scsi_reply->SCSIState || scsi_reply->SCSIStatus)
			printk(MPT2SAS_DEBUG_FMT
			printk(MPT2SAS_INFO_FMT
			    "\tscsi_state(0x%02x), scsi_status"
			    "\tscsi_state(0x%02x), scsi_status"
			    "(0x%02x)\n", ioc->name,
			    "(0x%02x)\n", ioc->name,
			    scsi_reply->SCSIState,
			    scsi_reply->SCSIState,
@@ -392,7 +392,7 @@ mpt2sas_ctl_reset_handler(struct MPT2SAS_ADAPTER *ioc, int reset_phase)


	switch (reset_phase) {
	switch (reset_phase) {
	case MPT2_IOC_PRE_RESET:
	case MPT2_IOC_PRE_RESET:
		dtmprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: "
		dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: "
		    "MPT2_IOC_PRE_RESET\n", ioc->name, __func__));
		    "MPT2_IOC_PRE_RESET\n", ioc->name, __func__));
		for (i = 0; i < MPI2_DIAG_BUF_TYPE_COUNT; i++) {
		for (i = 0; i < MPI2_DIAG_BUF_TYPE_COUNT; i++) {
			if (!(ioc->diag_buffer_status[i] &
			if (!(ioc->diag_buffer_status[i] &
@@ -405,7 +405,7 @@ mpt2sas_ctl_reset_handler(struct MPT2SAS_ADAPTER *ioc, int reset_phase)
		}
		}
		break;
		break;
	case MPT2_IOC_AFTER_RESET:
	case MPT2_IOC_AFTER_RESET:
		dtmprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: "
		dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: "
		    "MPT2_IOC_AFTER_RESET\n", ioc->name, __func__));
		    "MPT2_IOC_AFTER_RESET\n", ioc->name, __func__));
		if (ioc->ctl_cmds.status & MPT2_CMD_PENDING) {
		if (ioc->ctl_cmds.status & MPT2_CMD_PENDING) {
			ioc->ctl_cmds.status |= MPT2_CMD_RESET;
			ioc->ctl_cmds.status |= MPT2_CMD_RESET;
@@ -414,7 +414,7 @@ mpt2sas_ctl_reset_handler(struct MPT2SAS_ADAPTER *ioc, int reset_phase)
		}
		}
		break;
		break;
	case MPT2_IOC_DONE_RESET:
	case MPT2_IOC_DONE_RESET:
		dtmprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: "
		dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: "
		    "MPT2_IOC_DONE_RESET\n", ioc->name, __func__));
		    "MPT2_IOC_DONE_RESET\n", ioc->name, __func__));


		for (i = 0; i < MPI2_DIAG_BUF_TYPE_COUNT; i++) {
		for (i = 0; i < MPI2_DIAG_BUF_TYPE_COUNT; i++) {
@@ -531,7 +531,7 @@ _ctl_set_task_mid(struct MPT2SAS_ADAPTER *ioc, struct mpt2_ioctl_command *karg,
	spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags);
	spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags);


	if (!found) {
	if (!found) {
		dctlprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: "
		dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: "
		    "handle(0x%04x), lun(%d), no active mid!!\n", ioc->name,
		    "handle(0x%04x), lun(%d), no active mid!!\n", ioc->name,
		    desc, le16_to_cpu(tm_request->DevHandle), lun));
		    desc, le16_to_cpu(tm_request->DevHandle), lun));
		tm_reply = ioc->ctl_cmds.reply;
		tm_reply = ioc->ctl_cmds.reply;
@@ -549,7 +549,7 @@ _ctl_set_task_mid(struct MPT2SAS_ADAPTER *ioc, struct mpt2_ioctl_command *karg,
		return 1;
		return 1;
	}
	}


	dctlprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: "
	dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: "
	    "handle(0x%04x), lun(%d), task_mid(%d)\n", ioc->name,
	    "handle(0x%04x), lun(%d), task_mid(%d)\n", ioc->name,
	    desc, le16_to_cpu(tm_request->DevHandle), lun,
	    desc, le16_to_cpu(tm_request->DevHandle), lun,
	     le16_to_cpu(tm_request->TaskMID)));
	     le16_to_cpu(tm_request->TaskMID)));
@@ -756,7 +756,7 @@ _ctl_do_mpt_command(struct MPT2SAS_ADAPTER *ioc,
		Mpi2SCSITaskManagementRequest_t *tm_request =
		Mpi2SCSITaskManagementRequest_t *tm_request =
		    (Mpi2SCSITaskManagementRequest_t *)mpi_request;
		    (Mpi2SCSITaskManagementRequest_t *)mpi_request;


		dtmprintk(ioc, printk(MPT2SAS_DEBUG_FMT "TASK_MGMT: "
		dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "TASK_MGMT: "
		    "handle(0x%04x), task_type(0x%02x)\n", ioc->name,
		    "handle(0x%04x), task_type(0x%02x)\n", ioc->name,
		    le16_to_cpu(tm_request->DevHandle), tm_request->TaskType));
		    le16_to_cpu(tm_request->DevHandle), tm_request->TaskType));


@@ -851,7 +851,7 @@ _ctl_do_mpt_command(struct MPT2SAS_ADAPTER *ioc,
		Mpi2SCSITaskManagementReply_t *tm_reply =
		Mpi2SCSITaskManagementReply_t *tm_reply =
		    (Mpi2SCSITaskManagementReply_t *)mpi_reply;
		    (Mpi2SCSITaskManagementReply_t *)mpi_reply;


		printk(MPT2SAS_DEBUG_FMT "TASK_MGMT: "
		printk(MPT2SAS_INFO_FMT "TASK_MGMT: "
		    "IOCStatus(0x%04x), IOCLogInfo(0x%08x), "
		    "IOCStatus(0x%04x), IOCLogInfo(0x%08x), "
		    "TerminationCount(0x%08x)\n", ioc->name,
		    "TerminationCount(0x%08x)\n", ioc->name,
		    le16_to_cpu(tm_reply->IOCStatus),
		    le16_to_cpu(tm_reply->IOCStatus),
@@ -950,7 +950,7 @@ _ctl_getiocinfo(void __user *arg)
	if (_ctl_verify_adapter(karg.hdr.ioc_number, &ioc) == -1 || !ioc)
	if (_ctl_verify_adapter(karg.hdr.ioc_number, &ioc) == -1 || !ioc)
		return -ENODEV;
		return -ENODEV;


	dctlprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: enter\n", ioc->name,
	dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: enter\n", ioc->name,
	    __func__));
	    __func__));


	memset(&karg, 0 , sizeof(karg));
	memset(&karg, 0 , sizeof(karg));
@@ -998,7 +998,7 @@ _ctl_eventquery(void __user *arg)
	if (_ctl_verify_adapter(karg.hdr.ioc_number, &ioc) == -1 || !ioc)
	if (_ctl_verify_adapter(karg.hdr.ioc_number, &ioc) == -1 || !ioc)
		return -ENODEV;
		return -ENODEV;


	dctlprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: enter\n", ioc->name,
	dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: enter\n", ioc->name,
	    __func__));
	    __func__));


	karg.event_entries = MPT2SAS_CTL_EVENT_LOG_SIZE;
	karg.event_entries = MPT2SAS_CTL_EVENT_LOG_SIZE;
@@ -1031,7 +1031,7 @@ _ctl_eventenable(void __user *arg)
	if (_ctl_verify_adapter(karg.hdr.ioc_number, &ioc) == -1 || !ioc)
	if (_ctl_verify_adapter(karg.hdr.ioc_number, &ioc) == -1 || !ioc)
		return -ENODEV;
		return -ENODEV;


	dctlprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: enter\n", ioc->name,
	dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: enter\n", ioc->name,
	    __func__));
	    __func__));


	if (ioc->event_log)
	if (ioc->event_log)
@@ -1073,7 +1073,7 @@ _ctl_eventreport(void __user *arg)
	if (_ctl_verify_adapter(karg.hdr.ioc_number, &ioc) == -1 || !ioc)
	if (_ctl_verify_adapter(karg.hdr.ioc_number, &ioc) == -1 || !ioc)
		return -ENODEV;
		return -ENODEV;


	dctlprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: enter\n", ioc->name,
	dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: enter\n", ioc->name,
	    __func__));
	    __func__));


	number_bytes = karg.hdr.max_data_size -
	number_bytes = karg.hdr.max_data_size -
@@ -1118,7 +1118,7 @@ _ctl_do_reset(void __user *arg)
	if (_ctl_verify_adapter(karg.hdr.ioc_number, &ioc) == -1 || !ioc)
	if (_ctl_verify_adapter(karg.hdr.ioc_number, &ioc) == -1 || !ioc)
		return -ENODEV;
		return -ENODEV;


	dctlprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: enter\n", ioc->name,
	dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: enter\n", ioc->name,
	    __func__));
	    __func__));


	retval = mpt2sas_base_hard_reset_handler(ioc, CAN_SLEEP,
	retval = mpt2sas_base_hard_reset_handler(ioc, CAN_SLEEP,
@@ -1219,7 +1219,7 @@ _ctl_btdh_mapping(void __user *arg)
	if (_ctl_verify_adapter(karg.hdr.ioc_number, &ioc) == -1 || !ioc)
	if (_ctl_verify_adapter(karg.hdr.ioc_number, &ioc) == -1 || !ioc)
		return -ENODEV;
		return -ENODEV;


	dctlprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name,
	dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
	    __func__));
	    __func__));


	rc = _ctl_btdh_search_sas_device(ioc, &karg);
	rc = _ctl_btdh_search_sas_device(ioc, &karg);
@@ -1288,7 +1288,7 @@ _ctl_diag_register_2(struct MPT2SAS_ADAPTER *ioc,
	u16 ioc_status;
	u16 ioc_status;
	u8 issue_reset = 0;
	u8 issue_reset = 0;


	dctlprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name,
	dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
	    __func__));
	    __func__));


	if (ioc->ctl_cmds.status != MPT2_CMD_NOT_USED) {
	if (ioc->ctl_cmds.status != MPT2_CMD_NOT_USED) {
@@ -1376,7 +1376,7 @@ _ctl_diag_register_2(struct MPT2SAS_ADAPTER *ioc,
	mpi_request->VF_ID = 0; /* TODO */
	mpi_request->VF_ID = 0; /* TODO */
	mpi_request->VP_ID = 0;
	mpi_request->VP_ID = 0;


	dctlprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: diag_buffer(0x%p), "
	dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: diag_buffer(0x%p), "
	    "dma(0x%llx), sz(%d)\n", ioc->name, __func__, request_data,
	    "dma(0x%llx), sz(%d)\n", ioc->name, __func__, request_data,
	    (unsigned long long)request_data_dma,
	    (unsigned long long)request_data_dma,
	    le32_to_cpu(mpi_request->BufferLength)));
	    le32_to_cpu(mpi_request->BufferLength)));
@@ -1414,10 +1414,10 @@ _ctl_diag_register_2(struct MPT2SAS_ADAPTER *ioc,
	if (ioc_status == MPI2_IOCSTATUS_SUCCESS) {
	if (ioc_status == MPI2_IOCSTATUS_SUCCESS) {
		ioc->diag_buffer_status[buffer_type] |=
		ioc->diag_buffer_status[buffer_type] |=
			MPT2_DIAG_BUFFER_IS_REGISTERED;
			MPT2_DIAG_BUFFER_IS_REGISTERED;
		dctlprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: success\n",
		dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: success\n",
		    ioc->name, __func__));
		    ioc->name, __func__));
	} else {
	} else {
		printk(MPT2SAS_DEBUG_FMT "%s: ioc_status(0x%04x) "
		printk(MPT2SAS_INFO_FMT "%s: ioc_status(0x%04x) "
		    "log_info(0x%08x)\n", ioc->name, __func__,
		    "log_info(0x%08x)\n", ioc->name, __func__,
		    ioc_status, le32_to_cpu(mpi_reply->IOCLogInfo));
		    ioc_status, le32_to_cpu(mpi_reply->IOCLogInfo));
		rc = -EFAULT;
		rc = -EFAULT;
@@ -1541,7 +1541,7 @@ _ctl_diag_unregister(void __user *arg)
	if (_ctl_verify_adapter(karg.hdr.ioc_number, &ioc) == -1 || !ioc)
	if (_ctl_verify_adapter(karg.hdr.ioc_number, &ioc) == -1 || !ioc)
		return -ENODEV;
		return -ENODEV;


	dctlprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name,
	dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
	    __func__));
	    __func__));


	buffer_type = karg.unique_id & 0x000000ff;
	buffer_type = karg.unique_id & 0x000000ff;
@@ -1611,7 +1611,7 @@ _ctl_diag_query(void __user *arg)
	if (_ctl_verify_adapter(karg.hdr.ioc_number, &ioc) == -1 || !ioc)
	if (_ctl_verify_adapter(karg.hdr.ioc_number, &ioc) == -1 || !ioc)
		return -ENODEV;
		return -ENODEV;


	dctlprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name,
	dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
	    __func__));
	    __func__));


	karg.application_flags = 0;
	karg.application_flags = 0;
@@ -1689,7 +1689,7 @@ _ctl_send_release(struct MPT2SAS_ADAPTER *ioc, u8 buffer_type, u8 *issue_reset)
	int rc;
	int rc;
	unsigned long timeleft;
	unsigned long timeleft;


	dctlprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name,
	dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
	    __func__));
	    __func__));


	rc = 0;
	rc = 0;
@@ -1697,7 +1697,7 @@ _ctl_send_release(struct MPT2SAS_ADAPTER *ioc, u8 buffer_type, u8 *issue_reset)


	ioc_state = mpt2sas_base_get_iocstate(ioc, 1);
	ioc_state = mpt2sas_base_get_iocstate(ioc, 1);
	if (ioc_state != MPI2_IOC_STATE_OPERATIONAL) {
	if (ioc_state != MPI2_IOC_STATE_OPERATIONAL) {
		dctlprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: "
		dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: "
		    "skipping due to FAULT state\n", ioc->name,
		    "skipping due to FAULT state\n", ioc->name,
		    __func__));
		    __func__));
		rc = -EAGAIN;
		rc = -EAGAIN;
@@ -1759,10 +1759,10 @@ _ctl_send_release(struct MPT2SAS_ADAPTER *ioc, u8 buffer_type, u8 *issue_reset)
	if (ioc_status == MPI2_IOCSTATUS_SUCCESS) {
	if (ioc_status == MPI2_IOCSTATUS_SUCCESS) {
		ioc->diag_buffer_status[buffer_type] |=
		ioc->diag_buffer_status[buffer_type] |=
		    MPT2_DIAG_BUFFER_IS_RELEASED;
		    MPT2_DIAG_BUFFER_IS_RELEASED;
		dctlprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: success\n",
		dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: success\n",
		    ioc->name, __func__));
		    ioc->name, __func__));
	} else {
	} else {
		printk(MPT2SAS_DEBUG_FMT "%s: ioc_status(0x%04x) "
		printk(MPT2SAS_INFO_FMT "%s: ioc_status(0x%04x) "
		    "log_info(0x%08x)\n", ioc->name, __func__,
		    "log_info(0x%08x)\n", ioc->name, __func__,
		    ioc_status, le32_to_cpu(mpi_reply->IOCLogInfo));
		    ioc_status, le32_to_cpu(mpi_reply->IOCLogInfo));
		rc = -EFAULT;
		rc = -EFAULT;
@@ -1800,7 +1800,7 @@ _ctl_diag_release(void __user *arg, enum block_state state)
	if (_ctl_verify_adapter(karg.hdr.ioc_number, &ioc) == -1 || !ioc)
	if (_ctl_verify_adapter(karg.hdr.ioc_number, &ioc) == -1 || !ioc)
		return -ENODEV;
		return -ENODEV;


	dctlprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name,
	dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
	    __func__));
	    __func__));


	buffer_type = karg.unique_id & 0x000000ff;
	buffer_type = karg.unique_id & 0x000000ff;
@@ -1896,7 +1896,7 @@ _ctl_diag_read_buffer(void __user *arg, enum block_state state)
	if (_ctl_verify_adapter(karg.hdr.ioc_number, &ioc) == -1 || !ioc)
	if (_ctl_verify_adapter(karg.hdr.ioc_number, &ioc) == -1 || !ioc)
		return -ENODEV;
		return -ENODEV;


	dctlprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name,
	dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
	    __func__));
	    __func__));


	buffer_type = karg.unique_id & 0x000000ff;
	buffer_type = karg.unique_id & 0x000000ff;
@@ -1927,7 +1927,7 @@ _ctl_diag_read_buffer(void __user *arg, enum block_state state)
	}
	}


	diag_data = (void *)(request_data + karg.starting_offset);
	diag_data = (void *)(request_data + karg.starting_offset);
	dctlprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: diag_buffer(%p), "
	dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: diag_buffer(%p), "
	    "offset(%d), sz(%d)\n", ioc->name, __func__,
	    "offset(%d), sz(%d)\n", ioc->name, __func__,
	    diag_data, karg.starting_offset, karg.bytes_to_read));
	    diag_data, karg.starting_offset, karg.bytes_to_read));


@@ -1942,11 +1942,11 @@ _ctl_diag_read_buffer(void __user *arg, enum block_state state)
	if ((karg.flags & MPT2_FLAGS_REREGISTER) == 0)
	if ((karg.flags & MPT2_FLAGS_REREGISTER) == 0)
		return 0;
		return 0;


	dctlprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: Reregister "
	dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: Reregister "
		"buffer_type(0x%02x)\n", ioc->name, __func__, buffer_type));
		"buffer_type(0x%02x)\n", ioc->name, __func__, buffer_type));
	if ((ioc->diag_buffer_status[buffer_type] &
	if ((ioc->diag_buffer_status[buffer_type] &
	    MPT2_DIAG_BUFFER_IS_RELEASED) == 0) {
	    MPT2_DIAG_BUFFER_IS_RELEASED) == 0) {
		dctlprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: "
		dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: "
		    "buffer_type(0x%02x) is still registered\n", ioc->name,
		    "buffer_type(0x%02x) is still registered\n", ioc->name,
		     __func__, buffer_type));
		     __func__, buffer_type));
		return 0;
		return 0;
@@ -2020,10 +2020,10 @@ _ctl_diag_read_buffer(void __user *arg, enum block_state state)
	if (ioc_status == MPI2_IOCSTATUS_SUCCESS) {
	if (ioc_status == MPI2_IOCSTATUS_SUCCESS) {
		ioc->diag_buffer_status[buffer_type] |=
		ioc->diag_buffer_status[buffer_type] |=
		    MPT2_DIAG_BUFFER_IS_REGISTERED;
		    MPT2_DIAG_BUFFER_IS_REGISTERED;
		dctlprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: success\n",
		dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: success\n",
		    ioc->name, __func__));
		    ioc->name, __func__));
	} else {
	} else {
		printk(MPT2SAS_DEBUG_FMT "%s: ioc_status(0x%04x) "
		printk(MPT2SAS_INFO_FMT "%s: ioc_status(0x%04x) "
		    "log_info(0x%08x)\n", ioc->name, __func__,
		    "log_info(0x%08x)\n", ioc->name, __func__,
		    ioc_status, le32_to_cpu(mpi_reply->IOCLogInfo));
		    ioc_status, le32_to_cpu(mpi_reply->IOCLogInfo));
		rc = -EFAULT;
		rc = -EFAULT;
@@ -2140,7 +2140,7 @@ _ctl_ioctl_main(struct file *file, unsigned int cmd, void __user *arg)
		    !ioc)
		    !ioc)
			return -ENODEV;
			return -ENODEV;


		dctlprintk(ioc, printk(MPT2SAS_DEBUG_FMT
		dctlprintk(ioc, printk(MPT2SAS_INFO_FMT
		    "unsupported ioctl opcode(0x%08x)\n", ioc->name, cmd));
		    "unsupported ioctl opcode(0x%08x)\n", ioc->name, cmd));
		break;
		break;
	}
	}
+28 −28

File changed.

Preview size limit exceeded, changes collapsed.

Loading