Re: [PATCH 3/3] [SCSI] ufs: Process SCSI command for UFS device

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

 



On Sat, Apr 21, 2012 at 4:29 PM, James Bottomley
<James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> wrote:
> On Sat, 2012-04-21 at 14:39 +0530, Santosh Y wrote:
>> UFS Spec specifies that the SCSI CDB fields, that are not
>> supported by UFS should be set to zero. It also mentions
>> that some of the CDB fields should be set to default
>> values before issuing the command to a UFS device.
>> Ex: Mode Select - Page Format bit should be set to 1.
>>
>> If the fields are not set to values mentioned in UFS spec,
>> strict CDB checking UFS device may complete the commands
>> with a check condition.
>
> Altering CDB field values in the driver is a bad idea.  If you tamper
> with commands in the driver unexpected things will be returned to
> userspace.  The general principle is that the mid layer tries to be as
> correct and conservative as possible, but we don't forbid users from
> sending out of spec commands because sometimes that's required.
>
> Are you actually trying to fix a bug, or is this just theoretical?  If

At this point it is theoretical, since the UFS spec mentions it.
But I guess soon enough I'll run into this problem when I'll start
testing with updated firmwares. Which may strictly follow UFS spec
and expect some of the SCSI CDB fields must be set to UFS specific
default values.

> the former, the way to fix it is to get the mid layer to be more
> conservative about what it does (or possibly add a quirk flag).

As you suggested, will try to find a better approach.

> James
>

-- 
~Santosh
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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