2010-11-11 14:02:12

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH take 2] [USB] Use normalized sense when emulating autosense

On Fri, Oct 22, 2010 at 02:12:51PM -0700, Luben Tuikov wrote:
> This patch solves two things:
> 1) Enables autosense emulation code to correctly
> interpret descriptor format sense data, and
> 2) Fixes a bug whereby the autosense emulation
> code would overwrite descriptor format sense data
> with SENSE KEY HARDWARE ERROR in fixed format, to
> incorrectly look like this:
>
> Oct 21 14:11:07 localhost kernel: sd 7:0:0:0: [sdc] Sense Key : Recovered Error [current] [descriptor]
> Oct 21 14:11:07 localhost kernel: Descriptor sense data with sense descriptors (in hex):
> Oct 21 14:11:07 localhost kernel: 72 01 04 1d 00 00 00 0e 09 0c 00 00 00 00 00 00
> Oct 21 14:11:07 localhost kernel: 00 4f 00 c2 00 50
> Oct 21 14:11:07 localhost kernel: sd 7:0:0:0: [sdc] ASC=0x4 ASCQ=0x1d
>
> Signed-off-by: Luben Tuikov <[email protected]>

I need to get the ack from the usb-storage maintainer. Can you get that
so that I can apply this?

thanks,

greg k-h


2010-11-11 16:49:55

by Luben Tuikov

[permalink] [raw]
Subject: Re: [PATCH take 2] [USB] Use normalized sense when emulating autosense

--- On Thu, 11/11/10, Greg KH <[email protected]> wrote:
> On Fri, Oct 22, 2010 at 02:12:51PM
> -0700, Luben Tuikov wrote:
> > This patch solves two things:
> > 1) Enables autosense emulation code to correctly
> > interpret descriptor format sense data, and
> > 2) Fixes a bug whereby the autosense emulation
> > code would overwrite descriptor format sense data
> > with SENSE KEY HARDWARE ERROR in fixed format, to
> > incorrectly look like this:
> >
> > Oct 21 14:11:07 localhost kernel: sd 7:0:0:0:
> [sdc]? Sense Key : Recovered Error [current]
> [descriptor]
> > Oct 21 14:11:07 localhost kernel: Descriptor sense
> data with sense descriptors (in hex):
> > Oct 21 14:11:07 localhost kernel:? ? ?
> ? 72 01 04 1d 00 00 00 0e 09 0c 00 00 00 00 00 00
> > Oct 21 14:11:07 localhost kernel:? ? ?
> ? 00 4f 00 c2 00 50
> > Oct 21 14:11:07 localhost kernel: sd 7:0:0:0:
> [sdc]? ASC=0x4 ASCQ=0x1d
> >
> > Signed-off-by: Luben Tuikov <[email protected]>
>
> I need to get the ack from the usb-storage
> maintainer.? Can you get that
> so that I can apply this?

Hi Greg,

I don't know who the usb-storage maintainer is, as I've mostly contributed to linux-scsi. Do you? I know Alan acked this patch. Is it him? Any reason you didn't CC the usb-storage maintainer in this email? Can you reply back to this thread CC-ing him? The only email I have in my address book is yours.

Thank you for being so nice and patient in this long, difficult, arduous and intimidating[1] process.

Luben
[1]linux-2.6/Documentation/development-process/6.Followthrough:22:
"Working with reviewers can be, for many developers, the most intimidating part of the kernel development process."

2010-11-11 16:56:30

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH take 2] [USB] Use normalized sense when emulating autosense

On Thu, Nov 11, 2010 at 08:49:51AM -0800, Luben Tuikov wrote:
> --- On Thu, 11/11/10, Greg KH <[email protected]> wrote:
> > On Fri, Oct 22, 2010 at 02:12:51PM
> > -0700, Luben Tuikov wrote:
> > > This patch solves two things:
> > > 1) Enables autosense emulation code to correctly
> > > interpret descriptor format sense data, and
> > > 2) Fixes a bug whereby the autosense emulation
> > > code would overwrite descriptor format sense data
> > > with SENSE KEY HARDWARE ERROR in fixed format, to
> > > incorrectly look like this:
> > >
> > > Oct 21 14:11:07 localhost kernel: sd 7:0:0:0:
> > [sdc]? Sense Key : Recovered Error [current]
> > [descriptor]
> > > Oct 21 14:11:07 localhost kernel: Descriptor sense
> > data with sense descriptors (in hex):
> > > Oct 21 14:11:07 localhost kernel:? ? ?
> > ? 72 01 04 1d 00 00 00 0e 09 0c 00 00 00 00 00 00
> > > Oct 21 14:11:07 localhost kernel:? ? ?
> > ? 00 4f 00 c2 00 50
> > > Oct 21 14:11:07 localhost kernel: sd 7:0:0:0:
> > [sdc]? ASC=0x4 ASCQ=0x1d
> > >
> > > Signed-off-by: Luben Tuikov <[email protected]>
> >
> > I need to get the ack from the usb-storage
> > maintainer.? Can you get that
> > so that I can apply this?
>
> Hi Greg,
>
> I don't know who the usb-storage maintainer is, as I've mostly
> contributed to linux-scsi. Do you?

$ ./scripts/get_maintainer.pl --roles --file drivers/usb/storage/usb.c
Matthew Dharm <[email protected]> (maintainer:USB MASS STORAGE...)
Greg Kroah-Hartman <[email protected]> (supporter:USB SUBSYSTEM)
[email protected] (open list:USB MASS STORAGE...)
[email protected] (open list:USB MASS STORAGE...)
[email protected] (open list)

Or you can just look in the MAINTAINERS file :)

> I know Alan acked this patch. Is it him? Any reason you didn't CC the
> usb-storage maintainer in this email? Can you reply back to this
> thread CC-ing him? The only email I have in my address book is yours.

Please resend your patch to Matthew, and the people and lists listed
above. I need his ack before I can take it.

thanks,

greg k-h

2010-11-11 17:07:56

by Luben Tuikov

[permalink] [raw]
Subject: Re: [PATCH take 2] [USB] Use normalized sense when emulating autosense

--- On Thu, 11/11/10, Greg KH <[email protected]> wrote:
> On Thu, Nov 11, 2010 at 08:49:51AM
> -0800, Luben Tuikov wrote:
> > --- On Thu, 11/11/10, Greg KH <[email protected]>
> wrote:
> > > On Fri, Oct 22, 2010 at 02:12:51PM
> > > -0700, Luben Tuikov wrote:
> > > > This patch solves two things:
> > > > 1) Enables autosense emulation code to
> correctly
> > > > interpret descriptor format sense data, and
> > > > 2) Fixes a bug whereby the autosense
> emulation
> > > > code would overwrite descriptor format sense
> data
> > > > with SENSE KEY HARDWARE ERROR in fixed
> format, to
> > > > incorrectly look like this:
> > > >
> > > > Oct 21 14:11:07 localhost kernel: sd
> 7:0:0:0:
> > > [sdc]? Sense Key : Recovered Error [current]
> > > [descriptor]
> > > > Oct 21 14:11:07 localhost kernel: Descriptor
> sense
> > > data with sense descriptors (in hex):
> > > > Oct 21 14:11:07 localhost kernel:? ? ?
> > > ? 72 01 04 1d 00 00 00 0e 09 0c 00 00 00 00 00
> 00
> > > > Oct 21 14:11:07 localhost kernel:? ? ?
> > > ? 00 4f 00 c2 00 50
> > > > Oct 21 14:11:07 localhost kernel: sd
> 7:0:0:0:
> > > [sdc]? ASC=0x4 ASCQ=0x1d
> > > >
> > > > Signed-off-by: Luben Tuikov <[email protected]>
> > >
> > > I need to get the ack from the usb-storage
> > > maintainer.? Can you get that
> > > so that I can apply this?
> >
> > Hi Greg,
> >
> > I don't know who the usb-storage maintainer is, as
> I've mostly
> > contributed to linux-scsi. Do you?
>
> $ ./scripts/get_maintainer.pl --roles --file
> drivers/usb/storage/usb.c
> Matthew Dharm <[email protected]>
> (maintainer:USB MASS STORAGE...)
> Greg Kroah-Hartman <[email protected]>
> (supporter:USB SUBSYSTEM)
> [email protected]
> (open list:USB MASS STORAGE...)
> [email protected]
> (open list:USB MASS STORAGE...)
> [email protected]
> (open list)
>
> Or you can just look in the MAINTAINERS file :)

Oh, and I was looking for the MAINTAINERS file in Documentation/.

Wow! There is actually a "get_maintainer" script!? Unbelievable!

> > I know Alan acked this patch. Is it him? Any reason
> you didn't CC the
> > usb-storage maintainer in this email?? Can you
> reply back to this
> > thread CC-ing him? The only email I have in my address
> book is yours.
>
> Please resend your patch to Matthew, and the people and
> lists listed
> above.? I need his ack before I can take it.

Oh, I see. I'll re-post the patch then to Matthew and the people and lists you listed above.

2010-11-11 17:43:28

by Matthew Dharm

[permalink] [raw]
Subject: Re: [PATCH take 2] [USB] Use normalized sense when emulating autosense

On Thu, Nov 11, 2010 at 09:07:53AM -0800, Luben Tuikov wrote:
>
> Oh, I see. I'll re-post the patch then to Matthew and the people and lists you listed above.

Now that I'm on the CC, I see this.

What's the 10k-foot level summary here? Is there an alternate sense-data
format that uses some sort of "descriptor" structure? I'm assuming this is
a new SCSI-III thing, or did I just miss it in SCSI-II?

This *looks* like you're using functions provided by the SCSI core to
access and modify the sense data... so I'm assuming that's because there
are alternate formats...

Matt

--
Matthew Dharm Home: [email protected]
Maintainer, Linux USB Mass Storage Driver

It was a new hope.
-- Dust Puppy
User Friendly, 12/25/1998


Attachments:
(No filename) (771.00 B)
(No filename) (189.00 B)
Download all attachments

2010-11-11 18:27:14

by Luben Tuikov

[permalink] [raw]
Subject: Re: [PATCH take 2] [USB] Use normalized sense when emulating autosense

--- On Thu, 11/11/10, Matthew Dharm <[email protected]> wrote:
> On Thu, Nov 11, 2010 at 09:07:53AM -0800, Luben Tuikov wrote:
> >
> > Oh, I see. I'll re-post the patch then to Matthew and
> the people and lists you listed above.
>
> Now that I'm on the CC, I see this.
>
> What's the 10k-foot level summary here?

I'm not sure either. It's apparently the procedure of getting a patch into the linux kernel nowadays. Last time I did this was 5 years ago and in linux-scsi--I remember it being easier, again that was 5 years ago.

> Is there an alternate sense-data format that uses some sort of "descriptor" structure?

Yes. Some devices return this format of sense data for some commands.

> I'm assuming this is
> a new SCSI-III thing, or did I just miss it in SCSI-II?
> This *looks* like you're using functions provided by the
> SCSI core to
> access and modify the sense data... so I'm assuming that's
> because there
> are alternate formats...

The patch doesn't add code that modifies the sense data. That modification code is already there, the patch fixes the modification which assumed only one type of format of sense data.

The patch uses SCSI functions to abstract the sense information irrespective of the type of format of sense data.

>
> Matt
>
> --
> Matthew Dharm? ? ? ? ? ?
> ? ? ? ? ? ? ? ?
> ? Home: [email protected]
>
> Maintainer, Linux USB Mass Storage Driver
>
> It was a new hope.
> ??? ??? ???
> ??? ??? -- Dust Puppy
> User Friendly, 12/25/1998
>

2010-11-11 18:49:51

by Matthew Dharm

[permalink] [raw]
Subject: Re: [PATCH take 2] [USB] Use normalized sense when emulating autosense

On Thu, Nov 11, 2010 at 10:27:11AM -0800, Luben Tuikov wrote:
> The patch uses SCSI functions to abstract the sense information irrespective of the type of format of sense data.

Looks reasonable. The underlying SCSI functions seem to all have the tests
to distinguish between sense format types. Let's just hope there are no
devices out there which can confuse those tests, or we'll be buried in
regressions.

ACKed-by: Matthew Dharm <[email protected]>

Matt

--
Matthew Dharm Home: [email protected]
Maintainer, Linux USB Mass Storage Driver

My mother not mind to die for stoppink Windows NT! She is rememberink
Stalin!
-- Pitr
User Friendly, 9/6/1998


Attachments:
(No filename) (720.00 B)
(No filename) (189.00 B)
Download all attachments

2010-11-11 19:26:33

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH take 2] [USB] Use normalized sense when emulating autosense

On Thu, Nov 11, 2010 at 10:49:46AM -0800, Matthew Dharm wrote:
> On Thu, Nov 11, 2010 at 10:27:11AM -0800, Luben Tuikov wrote:
> > The patch uses SCSI functions to abstract the sense information irrespective of the type of format of sense data.
>
> Looks reasonable. The underlying SCSI functions seem to all have the tests
> to distinguish between sense format types. Let's just hope there are no
> devices out there which can confuse those tests, or we'll be buried in
> regressions.
>
> ACKed-by: Matthew Dharm <[email protected]>

Luben, can you resend me the original patch with Matthew's ack on it? I
no longer have it in my mboxes.

thanks,

greg k-h

2010-11-11 19:56:22

by Luben Tuikov

[permalink] [raw]
Subject: Re: [PATCH take 2] [USB] Use normalized sense when emulating autosense

On Nov 11, 2010, at 11:11, Greg KH <[email protected]> wrote:

> On Thu, Nov 11, 2010 at 10:49:46AM -0800, Matthew Dharm wrote:
>> On Thu, Nov 11, 2010 at 10:27:11AM -0800, Luben Tuikov wrote:
>>> The patch uses SCSI functions to abstract the sense information irrespective of the type of format of sense data.
>>
>> Looks reasonable. The underlying SCSI functions seem to all have the tests
>> to distinguish between sense format types. Let's just hope there are no
>> devices out there which can confuse those tests, or we'll be buried in
>> regressions.
>>
>> ACKed-by: Matthew Dharm <[email protected]>
>
> Luben, can you resend me the original patch with Matthew's ack on it? I
> no longer have it in my mboxes.
>

No prob.

> thanks,
>
> greg k-h