RE: [PATCH v3 13/24] mpi3mr: implement scsi error handler hooks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > +/**
> > + * mpi3mr_print_response_code - print TM response as a string
> > + * @mrioc: Adapter instance reference
> > + * @resp_code: TM response code
> > + *
> > + * Print TM response code as a readable string.
> > + *
> > + * Return: Nothing.
> > + */
> > +static void mpi3mr_print_response_code(struct mpi3mr_ioc *mrioc, u8
> > +resp_code) {
> > +	char *desc;
> > +
> > +	switch (resp_code) {
> > +	case MPI3MR_RSP_TM_COMPLETE:
> > +		desc = "task management request completed";
> > +		break;
> > +	case MPI3MR_RSP_INVALID_FRAME:
> > +		desc = "invalid frame";
> > +		break;
> > +	case MPI3MR_RSP_TM_NOT_SUPPORTED:
> > +		desc = "task management request not supported";
> > +		break;
> > +	case MPI3MR_RSP_TM_FAILED:
> > +		desc = "task management request failed";
> > +		break;
> > +	case MPI3MR_RSP_TM_SUCCEEDED:
> > +		desc = "task management request succeeded";
> > +		break;
> > +	case MPI3MR_RSP_TM_INVALID_LUN:
> > +		desc = "invalid lun";
> > +		break;
> > +	case MPI3MR_RSP_TM_OVERLAPPED_TAG:
> > +		desc = "overlapped tag attempted";
> > +		break;
> > +	case MPI3MR_RSP_IO_QUEUED_ON_IOC:
> > +		desc = "task queued, however not sent to target";
> > +		break;
> > +	default:
> > +		desc = "unknown";
> > +		break;
> > +	}
>
> You could use a mapping structure here instead of the switch, right?

Hannes -

I agree. Noted your feedback.
We have used mapping structure for "mpi3mr_reset_reason" can do similar
thing here as well. If I can accommodate relevant changes in this series I
will update the change log.
I have to change MPI header files (as requested by Christopher and Bart) and
that is major rework for this patch series.
I want to avoid any logical changes in V4 post so that I can easily review
diff between V3 and V4.

Kashyap

>
> Otherwise:
>
> Reviewed-by: Hannes Reinecke <hare@xxxxxxx>
>
> Cheers,
>
> Hannes
> --
> Dr. Hannes Reinecke		        Kernel Storage Architect
> hare@xxxxxxx			               +49 911 74053 688
> SUSE Software Solutions Germany GmbH, 90409 Nürnberg
> GF: F. Imendörffer, HRB 36809 (AG Nürnberg)

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux