RE: [PATCH 06/43] hpsa: hpsa decode sense data for io and tmf

brace
2015-02-25T18:06:37Z

This is intriguing. And you found a bug in our version of the decode_sense_data function, the ASC/ASCQ bytes are reversed for the descriptor formatted sense data.

Cool.

I'll try to work this in...

> -----Original Message-----
> From: Christoph Hellwig [mailto:hch@infradead.org]
> Sent: Monday, February 23, 2015 2:18 PM
> To: Don Brace
> Cc: Scott Teel; Kevin Barnett; james.bottomley@parallels.com;
> hch@infradead.org; Justin Lindley; brace; linux-scsi@vger.kernel.org
> Subject: Re: [PATCH 06/43] hpsa: hpsa decode sense data for io and tmf
>
> On Sat, Feb 21, 2015 at 04:18:03PM -0600, Don Brace wrote:
> > +/* extract sense key, asc, and ascq from sense data. -1 means invalid. */
> > +static void decode_sense_data(const u8 *sense_data, int sense_data_len,
> > + int *sense_key, int *asc, int *ascq)
> > +{
>
> Can't you just use scsi_normalize_sense()?