All of lore.kernel.org
 help / color / mirror / Atom feed
From: thomas schorpp <t.schorpp@gmx.de>
To: Timothy Thelin <Timothy.Thelin@wdc.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	usb-storage@lists.one-eyed-alien.net, linux-ide@vger.kernel.org
Subject: Re: [usb-storage] [Merging ATA passthru] on integrating SMART/ATA-Security in usb-storage driver
Date: Wed, 02 Nov 2005 22:55:57 +0100	[thread overview]
Message-ID: <436935ED.6030805@gmx.de> (raw)
In-Reply-To: <CA45571DE57E1C45BF3552118BA92C9D69BF37@WDSCEXBECL03.sc.wdc.com>

Timothy Thelin wrote:
>>They aren't ATA read/write commands; they are SCSI commands.  
>>If there is 
>>a version of SMART that runs over SCSI, you might be able to use it.
>>
>>
>>>and sata is short of smart support. both use scsi-emu(?).
>>>
>>>i dont think theres a hardware problem.
>>
>>Yes there is.  The USB interface on the drive won't recognize 
>>an ATA SMART
>>command and won't pass it on to the drive controller.
>>
> 
> 
> To expand on this, its really the USB device firmware which needs
> the passthru mechanism implmented, since (as stated) it expects
> to be getting scsi commands.  Now there are many vendor specific
> ways to embed ATA commands inside of scsi cdbs, and then there are
> two public methods that I'm aware of: SAT and the At2lp (cypress
> bridge board, docs on their website).
> 
> And to send these commands, user-space already has SG_IO.
> 

so sg3_utils and sdparm could be used for commands(?)

my device can do:

tom1:~# sdparm -avfl /dev/sda
    /dev/sda: IC35L030  AVVN07-0
Read write error recovery [PS=0] mode page:
  AWRE        0  [cha: n, def:  0, sav:  0]  Automatic write
reallocation enabled
  ARRE        0  [cha: n, def:  0, sav:  0]  Automatic read reallocation
enabled
  TB          0  [cha: n, def:  0, sav:  0]  Transfer block
  RC          0  [cha: n, def:  0, sav:  0]  Read continuous
  EER         0  [cha: n, def:  0, sav:  0]  Enable early recover
  PER         0  [cha: n, def:  0, sav:  0]  Post error
  DTE         0  [cha: n, def:  0, sav:  0]  Data terminate on error
  DCR         0  [cha: n, def:  0, sav:  0]  Disable correction
  RRC         0  [cha: n, def:  0, sav:  0]  Read retry count
  EMCDR       0  [cha: n, def:  0, sav:  0]  Enhanced media
certification and defect reporting
  WRC         0  [cha: n, def:  0, sav:  0]  Write retry count
  RTL         0  [cha: n, def:  0, sav:  0]  Recovery time limit (ms)
>> Format (SBC) mode page not supported
>> Rigid disk (SBC) mode page not supported
Write parameters (MMC) [PS=0] mode page:
  BUFE        1  [cha: y, def:  1, sav:  1]  Buffer underrun free
recording enable
  LS_V        1  [cha: y, def:  1, sav:  1]  Link size valid
  TST_W       1  [cha: y, def:  1, sav:  1]  Test write
  WR_T       15  [cha: y, def: 15, sav: 15]  Write type
  MULTI_S     3  [cha: y, def:  3, sav:  3]  Multi session
  FP          1  [cha: y, def:  1, sav:  1]  Fixed packet type
  COPY        1  [cha: y, def:  1, sav:  1]  Serial copy management
system (SCMS) enable
  TRACK_M    15  [cha: y, def: 15, sav: 15]  Track mode
  DBT         0  [cha: n, def:  0, sav:  0]  Data block type
  LINK_S     63  [cha: y, def: 63, sav: 63]  Link size
  IAC         0  [cha: n, def:  0, sav:  0]  Initiator application code
  SESS_F     63  [cha: y, def: 63, sav: 63]  Session format
  PACK_S      0  [cha: n, def:  0, sav:  0]  Packet size
 >> hereafter field position exceeds mode page length=12
  APL         0  [cha: n, def:  0, sav:  0]  Audio pause length (blocks)
>> RBC device parameters (RBC) mode page not supported
>> Verify error recovery (SBC) mode page not supported
Caching (SBC) [PS=0] mode page:
  IC          0  [cha: n, def:  0, sav:  0]  Initiator control
  ABPF        0  [cha: n, def:  0, sav:  0]  Abort pre-fetch
  CAP         0  [cha: n, def:  0, sav:  0]  Caching analysis permitted
  DISC        0  [cha: n, def:  0, sav:  0]  Discontinuity
  SIZE        0  [cha: n, def:  0, sav:  0]  Size (1->CSS valid, 0->NCS
valid)
  WCE         0  [cha: n, def:  0, sav:  0]  Write cache enable
  MF          0  [cha: n, def:  0, sav:  0]  Multiplication factor
  RCD         0  [cha: n, def:  0, sav:  0]  Read cache disable
  DRRP        0  [cha: n, def:  0, sav:  0]  Demand read retension priority
  WRP         0  [cha: n, def:  0, sav:  0]  Write retension priority
  DPTL        0  [cha: n, def:  0, sav:  0]  Disable pre-fetch transfer
length
  MIPF        0  [cha: n, def:  0, sav:  0]  Minimum pre-fetch
  MAPF        0  [cha: n, def:  0, sav:  0]  Maximum pre-fetch
  MAPFC       0  [cha: n, def:  0, sav:  0]  Maximum pre-fetch ceiling
 >> hereafter field position exceeds mode page length=12
  FSW         0  [cha: n, def:  0, sav:  0]  Force sequential write
  LBCSS       0  [cha: n, def:  0, sav:  0]  Logical block cache segment
size
  DRA         0  [cha: n, def:  0, sav:  0]  Disable read ahead
  NV_DIS      0  [cha: n, def:  0, sav:  0]  Non-volatile cache disable
  NCS         0  [cha: n, def:  0, sav:  0]  Number of cache segments
  CSS         0  [cha: n, def:  0, sav:  0]  Cache segment size
>> Control mode page not supported
>> Data compression (SSC) mode page not supported
>> XOR control (SBC) mode page not supported
>> Enclosure services management (SES) mode page not supported
>> Protocol specific logical unit mode page not supported
>> Protocol specific port mode page not supported
>> Power condition mode page not supported
>> Informational exceptions control mode page not supported
>> Background control (SBC) mode subpage not supported
>> Timeout and protect (MMC) mode page not supported
>> CD/DVD (MM) capabilities and mechanical status (MMC) mode page not
supported
tom1:~#


> So I'm not sure usb-storage can do much, since it can't force a usb
> device to accept passthru cdbs, and SG_IO already allows cdbs
> to be sent to usb devices.

yes, fine to me :)

> 
> Regards,
> Tim Thelin
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ide" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

thx
y
tom schorpp


  reply	other threads:[~2005-11-02 21:56 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-02 20:33 [usb-storage] [Merging ATA passthru] on integrating SMART/ATA-Security in usb-storage driver Timothy Thelin
2005-11-02 21:55 ` thomas schorpp [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-11-08 19:50 Timothy Thelin
2005-11-09  9:04 ` thomas schorpp
2005-11-09  9:45   ` thomas schorpp
2005-11-09 10:05     ` thomas schorpp
2005-11-09 13:21     ` Mark Lord
2005-11-09 14:05       ` thomas schorpp
2005-11-07 20:18 Timothy Thelin
2005-11-07 17:51 Timothy Thelin
2005-11-04 18:30 Timothy Thelin
2005-11-04 18:58 ` James Bottomley
2005-11-04 20:30   ` Matthew Dharm
2005-11-04 20:49     ` James Bottomley
2005-11-05 23:55       ` Matthew Dharm
2005-11-06  0:49         ` James Bottomley
2005-11-06  3:38           ` thomas schorpp
2005-11-06 21:58           ` Matthew Dharm
2005-11-06 22:28             ` thomas schorpp
2005-11-06 23:52               ` Patrick Mansfield
2005-11-07 16:59                 ` Matthew Dharm
2005-11-07 17:05                 ` Matthew Dharm
2005-11-07 17:24                   ` Patrick Mansfield
2005-11-07 17:46                     ` Alan Stern
2005-11-07 18:06                       ` thomas schorpp
2005-11-07 19:33                         ` Alan Stern
2005-11-07 20:07                           ` thomas schorpp
2005-11-07 17:53                     ` Christoph Hellwig
2005-11-07 17:54                     ` thomas schorpp
2005-11-07 18:57                       ` Patrick Mansfield
2005-11-07 19:53                         ` Alan Stern
2005-11-07 20:47                           ` Patrick Mansfield
2005-11-07 20:59                             ` Alan Stern
2005-11-07 22:05                               ` James Bottomley
2005-11-08 17:09                                 ` Alan Stern
2005-11-08 23:05                                   ` Mike Anderson
2005-11-09 15:35                                     ` Alan Stern
2005-11-06 23:15             ` James Bottomley
2005-11-07 18:14         ` Patrick Mansfield
2005-11-04 23:56     ` Andries Brouwer
2005-11-04 23:46 ` Pete Zaitcev
2005-11-05 16:20   ` thomas schorpp
2005-11-02 22:18 Timothy Thelin
2005-11-02 23:22 ` thomas schorpp
2005-11-02 23:45 ` Matthew Dharm
2005-11-04  4:08   ` James Bottomley
2005-11-04 17:28     ` Matthew Dharm
2005-11-04 18:33       ` James Bottomley
2005-11-04 20:30         ` Matthew Dharm
2005-11-04 20:53           ` James Bottomley
2005-11-02 14:08 thomas schorpp
2005-11-02 16:05 ` [usb-storage] " Alan Stern
2005-11-02 19:12   ` thomas schorpp
2005-11-02 19:26     ` Alan Stern
2005-11-02 20:41       ` thomas schorpp

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=436935ED.6030805@gmx.de \
    --to=t.schorpp@gmx.de \
    --cc=Timothy.Thelin@wdc.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=usb-storage@lists.one-eyed-alien.net \
    /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.