From: James Bottomley <James.Bottomley@steeleye.com>
To: Christoph Hellwig <hch@lst.de>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] scsi_device refcounting and list lockdown
Date: 30 Oct 2003 16:41:01 -0600 [thread overview]
Message-ID: <1067553662.1839.363.camel@mulgrave> (raw)
In-Reply-To: <20031027155713.GA28140@lst.de>
On Mon, 2003-10-27 at 09:57, Christoph Hellwig wrote:
> --- 1.44/drivers/scsi/53c700.c Sat Sep 20 11:35:53 2003
> +++ edited/drivers/scsi/53c700.c Mon Oct 27 12:01:48 2003
> @@ -1057,15 +1057,18 @@
> __u8 lun;
> struct NCR_700_command_slot *slot;
> __u8 reselection_id = hostdata->reselection_id;
> - Scsi_Device *SDp;
> + struct scsi_device *SDp;
> + unsigned long flags;
>
> lun = hostdata->msgin[0] & 0x1f;
>
> hostdata->reselection_id = 0xff;
> DEBUG(("scsi%d: (%d:%d) RESELECTED!\n",
> host->host_no, reselection_id, lun));
> +
> /* clear the reselection indicator */
> - SDp = scsi_find_device(host, 0, reselection_id, lun);
> + spin_lock_irqsave(host->host_lock, flags);
> + SDp = __scsi_device_lookup(host, 0, reselection_id, lun);
> if(unlikely(SDp == NULL)) {
> printk(KERN_ERR "scsi%d: (%d:%d) HAS NO device\n",
> host->host_no, reselection_id, lun);
This is wrong. The messages are processed in the middle of a SCSI
transaction, so the host lock is already held.
[...]
> ===== drivers/scsi/scsi.h 1.91 vs edited =====
> --- 1.91/drivers/scsi/scsi.h Sat Sep 20 13:50:50 2003
> +++ edited/drivers/scsi/scsi.h Mon Oct 27 12:01:41 2003
> @@ -116,12 +116,6 @@
> #define scsi_to_pci_dma_dir(scsi_dir) ((int)(scsi_dir))
> #define scsi_to_sbus_dma_dir(scsi_dir) ((int)(scsi_dir))
>
> -/*
> - * This is the crap from the old error handling code. We have it in a special
> - * place so that we can more easily delete it later on.
> - */
> -#include "scsi_obsolete.h"
> -
> /* obsolete typedef junk. */
> #include "scsi_typedefs.h"
This isn't a bug fix, and removing the obsolete include breaks all of
the drivers relying on its defines (cpqfc, qlogicisp, qlogicfc,
ncr53c8xx etc.)
> ===== drivers/scsi/scsi_error.c 1.65 vs edited =====
> --- 1.65/drivers/scsi/scsi_error.c Sun Sep 21 19:49:36 2003
> +++ edited/drivers/scsi/scsi_error.c Mon Oct 27 12:01:49 2003
> @@ -22,11 +22,10 @@
> #include <linux/kernel.h>
> #include <linux/interrupt.h>
> #include <linux/blkdev.h>
> -#include <linux/smp_lock.h>
This is a required include for lock/unlock_kernel() calls used in the
error handler thread.
> ===== include/scsi/scsi_host.h 1.12 vs edited =====
> --- 1.12/include/scsi/scsi_host.h Thu Oct 16 10:56:58 2003
> +++ edited/include/scsi/scsi_host.h Mon Oct 27 12:01:50 2003
> @@ -125,15 +125,6 @@
> int (* eh_host_reset_handler)(struct scsi_cmnd *);
>
> /*
> - * Old EH handlers, no longer used. Make them warn the user of old
> - * drivers by using a wrong type
> - *
> - * Status: MORE THAN OBSOLETE
> - */
> - int (* abort)(int);
> - int (* reset)(int, int);
> -
> - /*
This isn't a bugfix either...it will just break unconverted drivers.
James
next prev parent reply other threads:[~2003-10-30 22:41 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-27 15:57 [PATCH] scsi_device refcounting and list lockdown Christoph Hellwig
2003-10-28 0:01 ` Randy.Dunlap
2003-10-28 9:06 ` Christoph Hellwig
2003-10-28 20:45 ` [PATCH] [v2] aha152x cmnd->device oops Randy.Dunlap
2003-10-28 22:50 ` Mike Christie
2003-10-28 22:50 ` Randy.Dunlap
2003-10-29 0:26 ` Randy.Dunlap
2003-10-29 12:20 ` Juergen E. Fischer
2003-10-29 14:58 ` James Bottomley
2003-10-29 17:56 ` Juergen E. Fischer
2003-10-29 18:10 ` James Bottomley
2003-10-30 21:19 ` Juergen E. Fischer
2003-10-29 13:42 ` Christoph Hellwig
2003-10-28 2:32 ` [PATCH] scsi_device refcounting and list lockdown Mike Anderson
2003-10-28 9:07 ` Christoph Hellwig
2003-10-28 15:52 ` James Bottomley
2003-10-28 17:37 ` Christoph Hellwig
2003-10-30 22:41 ` James Bottomley [this message]
2003-10-31 9:11 ` Christoph Hellwig
2003-11-14 11:50 ` Christoph Hellwig
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=1067553662.1839.363.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=hch@lst.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox