mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthew Dharm <mdharm-kernel@one-eyed-alien.net>
To: matthieu castet <castet.matthieu@free.fr>
Cc: linux-usb@vger.kernel.org,
	Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH]  mass storage : emulation of sat scsi_pass_thru with ATACB
Date: Sun, 9 Mar 2008 11:45:24 -0700	[thread overview]
Message-ID: <20080309184524.GF2820@one-eyed-alien.net> (raw)
In-Reply-To: <47D39E14.9050900@free.fr>

[-- Attachment #1: Type: text/plain, Size: 1740 bytes --]

On Sun, Mar 09, 2008 at 09:21:40AM +0100, matthieu castet wrote:
> Hum, may be to avoid confusion with a new protocol handler, I can add my 
> hook in usb_stor_control_thread with a new flag.
> 
> Something like :
> [...]
>  /* Handle those devices which need us to fake
>          * their inquiry data */
>         else if ((us->srb->cmnd[0] == INQUIRY) &&
>                 (us->flags & US_FL_FIX_INQUIRY)) {
> [...]
> 	else if (( (us->srb->cmnd[0] == ATA_12) || (us->srb->cmnd[0] == 
> 	ATA_16)) &&
>                 (us->flags & US_FL_CYPRESS_ATACB)) {
>         US_DEBUGP("emulating ATA pass thru\n");
> 		call to emulate_pass_thru_with_atacb code
>         }
> 
>         /* we've got a command, let's do it! */
>         else {
>             US_DEBUG(usb_stor_show_command(us->srb));
>             us->proto_handler(us->srb, us);
>         }
> 
> Does it sound better ?

Somewhat better.  I still like a separate protocol handler better.

I guess I see this as being more like the ISD200 case.  In that code, it
attempts to identify the device as ATA or ATAPI.  If it's ATAPI, it
switches back to the transparent scsi protocol handler.  Here, we're just
talking about doing it on a command-by-command basis, instead of a one-time
selection.  But there is no confusion that the ISD200 code handles all
commands; but it does implement a new 'protocol' (a way to transport
commands to/from the device), which is exactly what you're doing.

Matt

-- 
Matthew Dharm                              Home: mdharm-usb@one-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

I'm seen in many forms.  Now open your mouth.  It's caffeine time.
					-- Cola Man to Greg
User Friendly, 10/28/1998

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2008-03-09 18:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-08 17:32 matthieu castet
2008-03-08 18:31 ` Matthew Dharm
2008-03-08 20:08   ` matthieu castet
2008-03-08 21:21     ` Matthew Dharm
2008-03-09  8:21       ` matthieu castet
2008-03-09 18:45         ` Matthew Dharm [this message]
2008-03-09 21:42           ` matthieu castet
2008-03-10  1:20             ` Matthew Dharm
2008-03-13 21:22               ` matthieu castet
2008-03-14  0:51                 ` Matthew Dharm
     [not found]                   ` <20080318221207.GY2820@one-eyed-alien.net>
2008-03-19 18:40                     ` matthieu castet
2008-03-19 20:02                       ` Matthew Dharm
2008-03-20 21:39                       ` patch usb-mass-storage-emulation-of-sat-scsi_pass_thru-with-atacb.patch added to gregkh-2.6 tree gregkh
2008-03-09 10:13   ` [PATCH] mass storage : emulation of sat scsi_pass_thru with ATACB Alan Cox

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=20080309184524.GF2820@one-eyed-alien.net \
    --to=mdharm-kernel@one-eyed-alien.net \
    --cc=castet.matthieu@free.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®