All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladislav Bolkhovitin <vst@vlnb.net>
To: linux-scsi@vger.kernel.org
Cc: linux-driver@qlogic.com
Subject: [PATCH] qla2xxx: Fix to allow to reset devices using sg interface (sg_reset)
Date: Tue, 25 Jul 2006 17:21:40 +0400	[thread overview]
Message-ID: <44C61AE4.2010600@vlnb.net> (raw)

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

Currently it is impossible to reset provided by Qlogic QLA2xxx driver 
SCSI devices externally using corresponding sg devices, particularly via 
sg_reset utility, because qla2xxx driver in qla2xxx_eh_device_reset() 
function checks if the input scsi_cmnd has its private data (CMD_SP()) 
attached. Then the found pointer isn't used anywhere inside of 
qla2xxx_eh_device_reset(). If the RESET request comes from sg device, it 
doesn't have such private data.

The attached patch removes check for non-NULL CMD_SP() from 
qla2xxx_eh_device_reset(), hence allows to reset QLA2xxx's devices using 
corresponding sg devices.

Against 2.6.18-rc2.

Signed-off-by: Vladislav Bolkhovitin <vst@vlnb.net>

Vlad

P.S. Sorry for the attachment format, I hope there will be no problems 
with it for such a small patch.


[-- Attachment #2: qla_reset_fix.diff --]
[-- Type: text/x-patch, Size: 621 bytes --]

--- linux-2.6.18-rc2/drivers/scsi/qla2xxx/qla_os.c	2006-07-21 18:05:55.000000000 +0400
+++ linux-2.6.18-rc2/drivers/scsi/qla2xxx/qla_os.c	2006-07-21 18:07:26.000000000 +0400
@@ -744,7 +744,6 @@ qla2xxx_eh_device_reset(struct scsi_cmnd
 {
 	scsi_qla_host_t *ha = to_qla_host(cmd->device->host);
 	fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata;
-	srb_t *sp;
 	int ret;
 	unsigned int id, lun;
 	unsigned long serial;
@@ -755,8 +754,7 @@
 	lun = cmd->device->lun;
 	serial = cmd->serial_number;
 
-	sp = (srb_t *) CMD_SP(cmd);
-	if (!sp || !fcport)
+	if (!fcport)
 		return ret;
 
 	qla_printk(KERN_INFO, ha,

             reply	other threads:[~2006-07-25 13:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-25 13:21 Vladislav Bolkhovitin [this message]
2006-07-27 17:21 ` [PATCH] qla2xxx: Fix to allow to reset devices using sg interface (sg_reset) Vladislav Bolkhovitin
2006-07-27 22:53   ` [Suspected Spam:#] " Andrew Vasquez
2006-07-30 17:18     ` Christoph Hellwig
2006-07-27 22:49 ` Andrew Vasquez

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=44C61AE4.2010600@vlnb.net \
    --to=vst@vlnb.net \
    --cc=linux-driver@qlogic.com \
    --cc=linux-scsi@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 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.