All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: Alexander Sabourenkov <screwdriver@lxnt.info>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: Short INQUIRY return
Date: Thu, 25 Oct 2007 16:41:52 +0200	[thread overview]
Message-ID: <4720AB30.5080003@panasas.com> (raw)
In-Reply-To: <4720940C.9040802@lxnt.info>

On Thu, Oct 25 2007 at 15:03 +0200, Alexander Sabourenkov <screwdriver@lxnt.info> wrote:
> Hello.
> 
> 
> Background:
> 	Promise TX4 SATA300 with sata_promise driver generates lots of errors, 
> both read and write.
> 
> 	I'm now trying to port Promise-written driver, which works ok with 
> 2.6.11, to 2.6.22,
> 	so that I can hopefully discover the error-inducing difference between 
> them, and gain
> 	some understanding of kernel internals in the process.
> 
> 	I have somewhat cleaned up the horrible mess the Promise driver code 
> is, so that it compiles,
> 	loads and attaches to the controller.
> 
> 
> Problem:
> 
> 	Its internal port scan prints out correct information about hard 
> drive(s) discovered, and correctly
> 	(i think) fills out response to the INQUIRY command, but when scsi 
> subsystem receives it back,
> 	it contains some garbage instead.
> 
> 	The same code works ok on 2.6.11, and I think it would work ok up to 
> 2.6.16 at least, but I have not checked yet.
> 
> Question:
> 	Can anyone please point out some drastic change in SCSI subsystem
> 	(and what it would take to fix the driver up)
> 	that would result in such behavior, so that I can save some time 
> digging it up myself?
> 
> 

Just at the top of my head without looking at the code at all. I would
say the bigest change would be the use of use_sg != 0 for all commands
in Later kernels. (k>=2.6.17)
Look for and around the scsi_cmnd->request_buffer usage. It used to be
that for commands like INQUIRY it points to a linear char pointer.
Today it will always point to a scatterlist array and use_sg is the sg count
of that array. (Usually ==1 in the INQUIRY case)

Just a shot in the dark
(Where is the code for that driver?)
Boaz


  reply	other threads:[~2007-10-25 14:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-25 13:03 Short INQUIRY return Alexander Sabourenkov
2007-10-25 14:41 ` Boaz Harrosh [this message]
2007-10-25 18:54   ` Alexander Sabourenkov

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=4720AB30.5080003@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=screwdriver@lxnt.info \
    /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.