From: Christoph Hellwig <hch@infradead.org>
To: Hannes Reinecke <hare@suse.de>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>,
"emmanuel.fuste" <emmanuel.fuste@laposte.net>
Subject: Re: [PATCH 1/3] aic79xx: convert qfrozen to atomic_t
Date: Tue, 7 Feb 2006 18:57:32 +0000 [thread overview]
Message-ID: <20060207185732.GA23340@infradead.org> (raw)
In-Reply-To: <43E851D2.1060306@suse.de>
On Tue, Feb 07, 2006 at 08:52:50AM +0100, Hannes Reinecke wrote:
> This patch converts platform_data->qfrozen to atomic_t.
> This way we can get rid of ahd_lock / ahd_unlock for the
> accessor functions; it also fixes some deadlocks in the
> recovery code (again).
While we're at it there's also a qfrozen variable in the ahd_linux_device
structure. Since the driver lost it's internal queueing it and the
surrounding core are totally unused.
Index: linux-2.6/drivers/scsi/aic7xxx/aic79xx_osm.c
===================================================================
--- linux-2.6.orig/drivers/scsi/aic7xxx/aic79xx_osm.c 2006-01-31 12:23:38.000000000 +0100
+++ linux-2.6/drivers/scsi/aic7xxx/aic79xx_osm.c 2006-02-07 19:52:47.000000000 +0100
@@ -1290,12 +1290,6 @@
now_queuing = AHD_DEV_Q_TAGGED;
break;
}
- if ((dev->flags & AHD_DEV_FREEZE_TIL_EMPTY) == 0
- && (was_queuing != now_queuing)
- && (dev->active != 0)) {
- dev->flags |= AHD_DEV_FREEZE_TIL_EMPTY;
- dev->qfrozen++;
- }
dev->flags &= ~(AHD_DEV_Q_BASIC|AHD_DEV_Q_TAGGED|AHD_DEV_PERIODIC_OTAG);
if (now_queuing) {
@@ -1705,10 +1699,7 @@
dev = scb->platform_data->dev;
dev->active--;
dev->openings++;
- if ((cmd->result & (CAM_DEV_QFRZN << 16)) != 0) {
- cmd->result &= ~(CAM_DEV_QFRZN << 16);
- dev->qfrozen--;
- }
+
ahd_linux_unmap_scb(ahd, scb);
/*
Index: linux-2.6/drivers/scsi/aic7xxx/aic79xx_osm.h
===================================================================
--- linux-2.6.orig/drivers/scsi/aic7xxx/aic79xx_osm.h 2006-01-31 12:23:38.000000000 +0100
+++ linux-2.6/drivers/scsi/aic7xxx/aic79xx_osm.h 2006-02-07 19:52:57.000000000 +0100
@@ -264,7 +264,6 @@
*/
typedef enum {
- AHD_DEV_FREEZE_TIL_EMPTY = 0x02, /* Freeze queue until active == 0 */
AHD_DEV_Q_BASIC = 0x10, /* Allow basic device queuing */
AHD_DEV_Q_TAGGED = 0x20, /* Allow full SCSI2 command queueing */
AHD_DEV_PERIODIC_OTAG = 0x40, /* Send OTAG to prevent starvation */
@@ -291,12 +290,6 @@
int openings;
/*
- * A positive count indicates that this
- * device's queue is halted.
- */
- u_int qfrozen;
-
- /*
* Cumulative command counter.
*/
u_long commands_issued;
@@ -870,10 +863,6 @@
static __inline void
ahd_freeze_scb(struct scb *scb)
{
- if ((scb->io_ctx->result & (CAM_DEV_QFRZN << 16)) == 0) {
- scb->io_ctx->result |= CAM_DEV_QFRZN << 16;
- scb->platform_data->dev->qfrozen++;
- }
}
void ahd_platform_set_tags(struct ahd_softc *ahd,
Index: linux-2.6/drivers/scsi/aic7xxx/aic79xx_proc.c
===================================================================
--- linux-2.6.orig/drivers/scsi/aic7xxx/aic79xx_proc.c 2005-10-31 12:23:45.000000000 +0100
+++ linux-2.6/drivers/scsi/aic7xxx/aic79xx_proc.c 2006-02-07 18:12:11.000000000 +0100
@@ -255,7 +255,6 @@
copy_info(info, "\t\tCommands Active %d\n", dev->active);
copy_info(info, "\t\tCommand Openings %d\n", dev->openings);
copy_info(info, "\t\tMax Tagged Openings %d\n", dev->maxtags);
- copy_info(info, "\t\tDevice Queue Frozen Count %d\n", dev->qfrozen);
}
static int
next prev parent reply other threads:[~2006-02-07 18:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-07 7:52 [PATCH 1/3] aic79xx: convert qfrozen to atomic_t Hannes Reinecke
2006-02-07 11:00 ` Christoph Hellwig
2006-02-07 11:30 ` Hannes Reinecke
2006-02-07 18:57 ` Christoph Hellwig
2006-02-07 18:57 ` Christoph Hellwig [this message]
2006-02-08 9:42 ` Hannes Reinecke
-- strict thread matches above, loose matches on Subject: below --
2006-02-08 10:16 Emmanuel Fusté
2006-02-08 10:52 ` Hannes Reinecke
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=20060207185732.GA23340@infradead.org \
--to=hch@infradead.org \
--cc=emmanuel.fuste@laposte.net \
--cc=hare@suse.de \
--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.