All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jack Byer <ojbyer@usa.net>
To: Andrew Morton <akpm@osdl.org>
Cc: Christoph Hellwig <hch@infradead.org>, linux-scsi@vger.kernel.org
Subject: Re: Fw: legacy megaraid driver bug in mm-series
Date: Mon, 12 Sep 2005 19:48:10 -0400	[thread overview]
Message-ID: <432613BA.5060606@usa.net> (raw)
In-Reply-To: <20050909165817.1a8ad251.akpm@osdl.org>

Andrew Morton wrote:
> Christoph Hellwig <hch@infradead.org> wrote:
> 
>>On Wed, Sep 07, 2005 at 02:52:58AM -0700, Andrew Morton wrote:
>>
>>>
>>>Begin forwarded message:
>>
>>This looks preyyu much like a breakage because we're now always sending
>>S/G list down the scsi layer.
>>
>>The patch below brings over code to handle that case from the megaraid_mbox
>>driver.  It's still wrong for the case someone sends a MODE_SENSE from
>>highmem userspace, but it should at least boot with the patch applied.
>>
> 
> 
> Jack, have you had a chance to test this?
> 
> Thanks.
> 
Sorry, I spent the weekend whitewater rafting :)  I will be able to test
this patch on Wednesday. Which kernel versions should I apply this patch to?




> 
>>Index: scsi-misc-2.6/drivers/scsi/megaraid.c
>>===================================================================
>>--- scsi-misc-2.6.orig/drivers/scsi/megaraid.c	2005-08-13 13:53:52.000000000 +0200
>>+++ scsi-misc-2.6/drivers/scsi/megaraid.c	2005-09-08 16:34:06.000000000 +0200
>>@@ -621,8 +621,6 @@
>> 	if(islogical) {
>> 		switch (cmd->cmnd[0]) {
>> 		case TEST_UNIT_READY:
>>-			memset(cmd->request_buffer, 0, cmd->request_bufflen);
>>-
>> #if MEGA_HAVE_CLUSTERING
>> 			/*
>> 			 * Do we support clustering and is the support enabled
>>@@ -653,7 +651,19 @@
>> #endif
>> 
>> 		case MODE_SENSE:
>>-			memset(cmd->request_buffer, 0, cmd->cmnd[4]);
>>+			if (cmd->use_sg) {
>>+				struct scatterlist	*sgl;
>>+				caddr_t			vaddr;
>>+
>>+				sgl = (struct scatterlist *)cmd->request_buffer;
>>+				vaddr = (caddr_t)
>>+					(page_address((&sgl[0])->page)
>>+					+ (&sgl[0])->offset);
>>+
>>+				memset(vaddr, 0, cmd->cmnd[4]);
>>+			} else {
>>+				memset(cmd->request_buffer, 0, cmd->cmnd[4]);
>>+			}
>> 			cmd->result = (DID_OK << 16);
>> 			cmd->scsi_done(cmd);
>> 			return NULL;
> 
> 


  reply	other threads:[~2005-09-12 23:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-07  9:52 Fw: legacy megaraid driver bug in mm-series Andrew Morton
2005-09-08 14:35 ` Christoph Hellwig
2005-09-09 23:58   ` Andrew Morton
2005-09-12 23:48     ` Jack Byer [this message]
2005-09-13  9:23       ` Christoph Hellwig
     [not found]         ` <4326A4A5.6090200@usa.net>
2005-09-14 18:14           ` Jack Byer
  -- strict thread matches above, loose matches on Subject: below --
2005-09-13 10:17 Jack Byer

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=432613BA.5060606@usa.net \
    --to=ojbyer@usa.net \
    --cc=akpm@osdl.org \
    --cc=hch@infradead.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 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.