From: Helge Deller <deller@gmx.de>
To: Christoph Hellwig <hch@infradead.org>,
James Bottomley <jejb@linux.vnet.ibm.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
Parisc List <linux-parisc@vger.kernel.org>
Subject: Re: [PATCH] 53c700: fix BUG on untagged commands
Date: Tue, 14 Jun 2016 22:32:55 +0200 [thread overview]
Message-ID: <576069F7.6040706@gmx.de> (raw)
In-Reply-To: <20160614150555.GA698@infradead.org>
On 14.06.2016 17:05, Christoph Hellwig wrote:
> Looks fine:
>
> Acked-by: Christoph Hellwig <hch@lst.de>
>
> But it should really go together with something like this:
>
> ---
> From e54d1462ae244db3189a8b69018bc5f3e3d3b468 Mon Sep 17 00:00:00 2001
> From: Christoph Hellwig <hch@lst.de>
> Date: Tue, 14 Jun 2016 17:04:10 +0200
> Subject: scsi: move current_cmnd into the 53c700 driver
>
> The 53c700 driver is the only user of the current_cmnd field in
> struct scsi_device, so let's move it into the driver private data.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Patch is OK.
Tested-by: Helge Deller <deller@gmx.de>
Even if this is not a real fix, I still would suggest to add
Cc: stable@vger.kernel.org # 4.4+
as well to get both patches backported at the same time.
Helge
> ---
> drivers/scsi/53c700.c | 8 +++++---
> drivers/scsi/53c700.h | 1 +
> include/scsi/scsi_device.h | 1 -
> 3 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c
> index 3ddc85e..de53b23 100644
> --- a/drivers/scsi/53c700.c
> +++ b/drivers/scsi/53c700.c
> @@ -1120,9 +1120,9 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp,
> "reselection is tag %d, slot %p(%d)\n",
> hostdata->msgin[2], slot, slot->tag);
> } else {
> - struct scsi_cmnd *SCp;
> + struct NCR_700_Device_Parameters *p = SDp->hostdata;
> + struct scsi_cmnd *SCp = p->current_cmnd;
>
> - SCp = SDp->current_cmnd;
> if(unlikely(SCp == NULL)) {
> sdev_printk(KERN_ERR, SDp,
> "no saved request for untagged cmd\n");
> @@ -1825,9 +1825,11 @@ NCR_700_queuecommand_lck(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *)
> CDEBUG(KERN_DEBUG, SCp, "sending out tag %d, slot %p\n",
> slot->tag, slot);
> } else {
> + struct NCR_700_Device_Parameters *p = SCp->device->hostdata;
> +
> slot->tag = SCSI_NO_TAG;
> /* save current command for reselection */
> - SCp->device->current_cmnd = SCp;
> + p->current_cmnd = SCp;
> }
> /* sanity check: some of the commands generated by the mid-layer
> * have an eccentric idea of their sc_data_direction */
> diff --git a/drivers/scsi/53c700.h b/drivers/scsi/53c700.h
> index e06bdfe..83b157e 100644
> --- a/drivers/scsi/53c700.h
> +++ b/drivers/scsi/53c700.h
> @@ -82,6 +82,7 @@ struct NCR_700_Device_Parameters {
> * cmnd[1], this could be in static storage */
> unsigned char cmnd[MAX_COMMAND_SIZE];
> __u8 depth;
> + struct scsi_cmnd *current_cmnd; /* currently active command */
> };
>
>
> diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
> index a6c346d..8a95631 100644
> --- a/include/scsi/scsi_device.h
> +++ b/include/scsi/scsi_device.h
> @@ -94,7 +94,6 @@ struct scsi_device {
> spinlock_t list_lock;
> struct list_head cmd_list; /* queue of in use SCSI Command structures */
> struct list_head starved_entry;
> - struct scsi_cmnd *current_cmnd; /* currently active command */
> unsigned short queue_depth; /* How deep of a queue we want */
> unsigned short max_queue_depth; /* max queue depth */
> unsigned short last_queue_full_depth; /* These two are used by */
>
next prev parent reply other threads:[~2016-06-14 20:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-14 5:00 [PATCH] 53c700: fix BUG on untagged commands James Bottomley
2016-06-14 7:15 ` Johannes Thumshirn
2016-06-14 13:10 ` Ewan D. Milne
2016-06-14 15:05 ` Christoph Hellwig
2016-06-14 20:32 ` Helge Deller [this message]
2016-06-15 2:03 ` Martin K. Petersen
2016-06-15 3:31 ` James Bottomley
2016-06-15 6:41 ` Hannes Reinecke
2016-06-15 2:00 ` Martin K. Petersen
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=576069F7.6040706@gmx.de \
--to=deller@gmx.de \
--cc=hch@infradead.org \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-parisc@vger.kernel.org \
--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