Re: Short INQUIRY return

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 25 2007 at 15:03 +0200, Alexander Sabourenkov <screwdriver@xxxxxxxxx> 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

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux