From: Jeff Garzik <jeff@garzik.org>
To: Dan Williams <dan.j.williams@intel.com>
Cc: JBottomley@parallels.com, Maciej Trela <maciej.trela@intel.com>,
dmilburn@redhat.com, dave.jiang@intel.com, hare@suse.de,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/5] isci: atapi support
Date: Thu, 29 Sep 2011 09:45:48 -0400 [thread overview]
Message-ID: <4E84768C.7030503@garzik.org> (raw)
In-Reply-To: <20110929014741.23617.56819.stgit@localhost6.localdomain6>
On 09/28/2011 09:47 PM, Dan Williams wrote:
> Based on original implementation from Jiangbi Liu and Maciej Trela.
>
> ATAPI transfers happen in two-to-three stages. The two stage atapi
> commands are those that include a dma data transfer. The data transfer
> portion of these operations is handled by the hardware packet-dma
> acceleration. The three-stage commands do not have a data transfer and
> are handled without hardware assistance in raw frame mode.
>
> stage1: transmit host-to-device fis to notify the device of an incoming
> atapi cdb. Upon reception of the pio-setup-fis repost the task_context
> to perform the dma transfer of the cdb+data (go to stage3), or repost
> the task_context to transmit the cdb as a raw frame (go to stage 2).
>
> stage2: wait for hardware notification of the cdb transmission and then
> go to stage 3.
>
> stage3: wait for the arrival of the terminating device-to-host fis and
> terminate the command.
>
> To keep the implementation simple we only support ATAPI packet-dma
> protocol (for commands with data) to avoid needing to handle the data
> transfer manually (like we do for SATA-PIO). This may affect
> compatibility for a small number of devices (see
> ATA_HORKAGE_ATAPI_MOD16_DMA).
>
> If the data-transfer underruns, or encounters an error the
> device-to-host fis is expected to arrive in the unsolicited frame queue
> to pass to libata for disposition. However, in the DONE_UNEXP_FIS (data
> underrun) case it appears we need to craft a response. In the
> DONE_REG_ERR case we do receive the UF and propagate it to libsas.
>
> Signed-off-by: Maciej Trela<maciej.trela@intel.com>
> Signed-off-by: Dan Williams<dan.j.williams@intel.com>
> ---
> drivers/scsi/isci/remote_device.c | 24 +++
> drivers/scsi/isci/remote_device.h | 9 +
> drivers/scsi/isci/request.c | 327 ++++++++++++++++++++++++++++++++++-
> drivers/scsi/isci/request.h | 28 +++
> drivers/scsi/libsas/sas_scsi_host.c | 2
> include/scsi/libsas.h | 5 +
> 6 files changed, 379 insertions(+), 16 deletions(-)
Acked-by: Jeff Garzik <jgarzik@redhat.com>
next prev parent reply other threads:[~2011-09-29 13:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-29 1:47 [GIT PATCH 0/5] isci updates for 3.2 Dan Williams
2011-09-29 1:47 ` [PATCH 1/5] isci: atapi support Dan Williams
2011-09-29 13:45 ` Jeff Garzik [this message]
2011-10-01 1:49 ` Dan Williams
2011-09-29 1:47 ` [PATCH 2/5] isci: SATA/STP I/O is only returned in the normal path to libsas Dan Williams
2011-09-29 1:47 ` [PATCH 3/5] isci: fix decode of DONE_CRC_ERR TC completion status Dan Williams
2011-09-29 1:47 ` [PATCH 4/5] isci: The port state should be set to stopping on the last phy Dan Williams
2011-09-29 1:48 ` [PATCH 5/5] isci: export phy events via ->lldd_control_phy() Dan Williams
2011-09-29 2:12 ` [GIT PATCH 0/5] isci updates for 3.2 Williams, Dan J
2011-10-01 1:55 ` Dan Williams
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=4E84768C.7030503@garzik.org \
--to=jeff@garzik.org \
--cc=JBottomley@parallels.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dmilburn@redhat.com \
--cc=hare@suse.de \
--cc=linux-scsi@vger.kernel.org \
--cc=maciej.trela@intel.com \
/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