All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: dougg@torque.net
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
	Al Viro <viro@parcelfarce.linux.theplanet.co.uk>,
	Jeff Garzik <jgarzik@pobox.com>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>,
	linux1394-devel@lists.sourceforge.net
Subject: Re: TYPE_RBC cache fixes (sbp2.c affected)
Date: Sun, 22 May 2005 15:08:06 +1000	[thread overview]
Message-ID: <429013B6.3010505@torque.net> (raw)
In-Reply-To: <428FB0FA.7040302@torque.net>

Douglas Gilbert wrote:
> James Bottomley wrote:
> 
>> On Sat, 2005-05-21 at 17:22 +0100, Al Viro wrote:
>>
>>> Tell that to firmware authors, why don't you?
>>
>>
>>
>> I do ... but they don't listen ...
>>  
>>
>>>> Does anyone actually have one of these RBC devices and does it reject
>>>> the six byte mode sense commands?
>>>
>>>
>>> Yes, will check and do not expect the results to apply to other 
>>> devices...
>>
>>
>>
>> Thanks ... I'd be surprised if the entire class of RBC devices simply
>> ignored the standard; I wouldn't be surprised to find one or two that
>> are out of spec.
>>
>> James
> 
> James,
> Perhaps __scsi_mode_sense() could do a simple sanity
> check: for any valid mode page [after the header and
> block descriptor(s) are stepped over]:
>      ((mpage[0] & 3f) == page_num)
> 
> If a response fails that test, we don't believe it.

A bit more accurate sanity check:
     if ((page_num > 0) && (page_num < 0x3f) &&
         ((mpage[0] & 3f) == page_num))
	// page looks ok (even if subpage_num was 0xff)
     else
	// nah

Mode page number 0 is the unit attention vendor specific
page which is not necessarily in "mode page format".
The vendor that I know does use it, does at least follow
mode page format.
A requested page_num of 0x3f and a requested subpage_num
of 0xff are wildcards.

Doug Gilbert



-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click

  reply	other threads:[~2005-05-22  5:08 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-16  1:59 TYPE_RBC cache fixes (sbp2.c affected) Al Viro
2005-05-16  3:26 ` Douglas Gilbert
2005-05-16  4:18   ` Al Viro
2005-05-21  5:03 ` Douglas Gilbert
2005-05-21 15:01 ` James Bottomley
2005-05-21 15:38   ` Jeff Garzik
2005-05-21 16:00     ` James Bottomley
2005-05-21 16:22       ` Al Viro
2005-05-21 18:12         ` James Bottomley
2005-05-21 22:06           ` Douglas Gilbert
2005-05-22  5:08             ` Douglas Gilbert [this message]
2005-05-21 15:24 ` James Bottomley
2005-05-22 10:15   ` Douglas Gilbert
2005-05-22  6:31 ` Douglas Gilbert
2005-05-22 14:06   ` James Bottomley
2005-05-23 15:14     ` Douglas Gilbert
2006-02-08 23:39 ` Stefan Richter
2006-02-08 23:54   ` Al Viro
2006-02-11  9:50     ` Stefan Richter
2006-02-11 13:05       ` Al Viro
2006-02-13 20:40       ` Stefan Richter
2006-02-20  6:08       ` Al Viro
2006-02-21 19:56         ` Stefan Richter
2006-02-21 21:51           ` Al Viro
2006-02-21 22:41             ` Stefan Richter
2006-02-22  7:08             ` Stefan Richter
2006-02-22  7:16               ` Al Viro
2006-02-22  7:35                 ` Stefan Richter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=429013B6.3010505@torque.net \
    --to=dougg@torque.net \
    --cc=James.Bottomley@SteelEye.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.