public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vasily Averin <vvs@sw.ru>
To: "Justin T. Gibbs" <gibbs@scsiguy.com>
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	Marcelo Tosatti <marcelo.tosatti@cyclades.com>,
	Stanislav Protassov <st@sw.com.sg>
Subject: [SCSI] aic7xxx: reset handler selects a wrong command
Date: Sun, 27 Nov 2005 20:15:06 +0300	[thread overview]
Message-ID: <4389E99A.8020204@sw.ru> (raw)

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

Hello Justin

To transport scsi reset command to device aic7xxx reset handler looks at the
driver's pending_list and searches any proper command. However the search
condition has been inverted: ahc_match_scb() returns TRUE if a matched command
is found.
As a result the reset on required devices did not turn out well, a correctly
working neighbour device may be surprised by the reset. aic7xxx reset handler
reports about the success, but really the original situation is not corrected yet.

The problem has been found first on 2.4 kernels but still it is present in
latest 2.6 drivers too.

Marcelo, you can use this patch for 2.4 kernel tree.

Thank you,
        Vasily Averin
SWSoft Linux Kernel Team

[SCSI] aic7xxx: reset handler selects a wrong command

To transport scsi reset command to device aic7xxx reset handler looks at the
driver's pending_list and searches any proper command. However the search
condition has been inverted: ahc_match_scb() returns TRUE if a matched command
is found.
As a result the reset on required devices did not turn out well, a correctly
working neighbour device may be surprised by the reset. aic7xxx reset handler
reports about the success, but really the original situation is not corrected yet.

Signed-off-by: Vasily Averin <vvs@sw.ru>
---

[-- Attachment #2: diff-drv-aic7xxx-20051127 --]
[-- Type: text/plain, Size: 438 bytes --]

--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c	2005-11-27 18:05:03.000000000 +0300
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c	2005-11-27 18:06:36.000000000 +0300
@@ -2169,7 +2169,7 @@ ahc_linux_queue_recovery_cmd(struct scsi
 		  	if (ahc_match_scb(ahc, pending_scb, scmd_id(cmd),
 					  scmd_channel(cmd) + 'A',
 					  CAM_LUN_WILDCARD,
-					  SCB_LIST_NULL, ROLE_INITIATOR) == 0)
+					  SCB_LIST_NULL, ROLE_INITIATOR))
 				break;
 		}
 	}

                 reply	other threads:[~2005-11-27 17:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4389E99A.8020204@sw.ru \
    --to=vvs@sw.ru \
    --cc=gibbs@scsiguy.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com \
    --cc=st@sw.com.sg \
    /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