From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: linux1394-devel@lists.sourceforge.net
Cc: Christoph Hellwig <hch@infradead.org>,
Bart Van Assche <bart.vanassche@sandisk.com>,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH 07/17] sbp2: Fix bidi command test
Date: Fri, 23 Jan 2015 15:05:13 +0100 [thread overview]
Message-ID: <20150123150513.13fb8682@kant> (raw)
In-Reply-To: <54C23A02.9010807@sandisk.com>
On Jan 23 Bart Van Assche wrote:
> The SCSI core never sets sc_data_direction to DMA_BIDIRECTIONAL.
>
> Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
> Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
> ---
> drivers/firewire/sbp2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c
> index 64ac8f8..ab1b114 100644
> --- a/drivers/firewire/sbp2.c
> +++ b/drivers/firewire/sbp2.c
> @@ -1467,7 +1467,7 @@ static int sbp2_scsi_queuecommand(struct Scsi_Host *shost,
> * Bidirectional commands are not yet implemented, and unknown
> * transfer direction not handled.
> */
> - if (cmd->sc_data_direction == DMA_BIDIRECTIONAL) {
> + if (scsi_bidi_cmnd(cmd)) {
> dev_err(lu_dev(lu), "cannot handle bidirectional command\n");
> cmd->result = DID_ERROR << 16;
> cmd->scsi_done(cmd);
---- 8< ----
Subject: [PATCH] firewire: sbp2: remove redundant check for bidi command
[Bart van Asche:] SCSI core never sets cmd->sc_data_direction to
DMA_BIDIRECTIONAL, scsi_bidi_cmnd(cmd) should be used instead.
[Christoph Hellwig:] Bidirectional commands won't ever be queued
anyway, unless a LLD or transport driver sets QUEUE_FLAG_BIDI.
So, simply remove the respective queuecommand check in the SBP-2
transport driver.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
drivers/firewire/sbp2.c | 11 -----------
1 file changed, 11 deletions(-)
--- a/drivers/firewire/sbp2.c
+++ b/drivers/firewire/sbp2.c
@@ -1463,17 +1463,6 @@ static int sbp2_scsi_queuecommand(struct
struct sbp2_command_orb *orb;
int generation, retval = SCSI_MLQUEUE_HOST_BUSY;
- /*
- * Bidirectional commands are not yet implemented, and unknown
- * transfer direction not handled.
- */
- if (cmd->sc_data_direction == DMA_BIDIRECTIONAL) {
- dev_err(lu_dev(lu), "cannot handle bidirectional command\n");
- cmd->result = DID_ERROR << 16;
- cmd->scsi_done(cmd);
- return 0;
- }
-
orb = kzalloc(sizeof(*orb), GFP_ATOMIC);
if (orb == NULL)
return SCSI_MLQUEUE_HOST_BUSY;
--
Stefan Richter
-=====-===== ---= =-===
http://arcgraph.de/sr/
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
next prev parent reply other threads:[~2015-01-23 14:05 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-23 12:05 [PATCH 0/17] Clear up bidi command confusion Bart Van Assche
2015-01-23 12:06 ` [PATCH 01/17] Clear up sc_data_direction documentation Bart Van Assche
2015-01-23 12:06 ` [PATCH 02/17] Clean up scsi_ioctl_reset() Bart Van Assche
2015-01-23 12:07 ` [PATCH 03/17] sg: Remove an unused variable Bart Van Assche
2015-01-23 12:30 ` Douglas Gilbert
2015-01-23 12:07 ` [PATCH 04/17] dpt_i2o: Fix bidi command test Bart Van Assche
2015-01-23 12:08 ` [PATCH 05/17] aachba: " Bart Van Assche
2015-01-23 12:08 ` [PATCH 06/17] eata: Remove dead code Bart Van Assche
2015-01-23 12:09 ` [PATCH 07/17] sbp2: Fix bidi command test Bart Van Assche
2015-01-23 14:05 ` Stefan Richter [this message]
2015-01-23 12:10 ` [PATCH 08/17] ibmvscsi: " Bart Van Assche
2015-01-27 22:10 ` Tyrel Datwyler
2015-01-28 7:57 ` Bart Van Assche
2015-01-28 22:42 ` Tyrel Datwyler
2015-01-23 12:10 ` [PATCH 09/17] cciss: Remove dead code Bart Van Assche
2015-01-23 12:11 ` [PATCH 10/17] hpsa: " Bart Van Assche
2015-01-23 12:11 ` [PATCH 11/17] 3w-9xxx: " Bart Van Assche
2015-01-23 12:12 ` [PATCH 12/17] ncr53c8xx: Fix bidi command support Bart Van Assche
2015-01-23 12:13 ` [PATCH 13/17] qla1280: " Bart Van Assche
2015-01-23 12:13 ` [PATCH 14/17] 53c700: Remove dead code Bart Van Assche
2015-01-23 12:14 ` [PATCH 15/17] mvumi: " Bart Van Assche
2015-01-23 12:15 ` [PATCH 16/17] sym_glue: Fix bidi command test Bart Van Assche
2015-01-23 12:17 ` [PATCH 17/17] IB/srp: Detect bidi commands properly Bart Van Assche
2015-01-25 16:58 ` Sagi Grimberg
2015-01-23 13:12 ` [PATCH 0/17] Clear up bidi command confusion Christoph Hellwig
2015-01-26 9:58 ` Bart Van Assche
2015-01-29 13:07 ` Boaz Harrosh
2015-01-29 13:20 ` Bart Van Assche
2015-01-29 14:43 ` Boaz Harrosh
2015-01-29 13:00 ` Boaz Harrosh
2015-01-29 14:41 ` James Bottomley
2015-01-29 14:56 ` Boaz Harrosh
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=20150123150513.13fb8682@kant \
--to=stefanr@s5r6.in-berlin.de \
--cc=bart.vanassche@sandisk.com \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).