linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] some block and scsi layer additions for ULD scatterlist code
@ 2005-12-05  8:37 Mike Christie
  2005-12-07  1:17 ` Yanggun
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Christie @ 2005-12-05  8:37 UTC (permalink / raw)
  To: axboe, Linux SCSI list

These two patches are some of the core or bugfix code for the SCSI ULD
scatterlist code. The first patch exports the block layer functions
needed to be able to do async REQ_BLOCK_PC commands and hook into the
request end_io callout and it adds the max_hw_sectors code. And the
second patch fixes a bug in st where it allows SCSI-ml to retry commands
and reverts SCSI-ml back to its previous behavior where it does not
allow scsi_io_completion to retry REQ_BLOCK_PC (previously special
requests) commands.

These patches were made against linux-2.6-block, but apply with some
offset to scsi-misc.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] some block and scsi layer additions for ULD scatterlist code
  2005-12-05  8:37 [PATCH 0/2] some block and scsi layer additions for ULD scatterlist code Mike Christie
@ 2005-12-07  1:17 ` Yanggun
  2005-12-07  1:49   ` Mike Christie
  0 siblings, 1 reply; 6+ messages in thread
From: Yanggun @ 2005-12-07  1:17 UTC (permalink / raw)
  To: Mike Christie; +Cc: axboe, Linux SCSI list

Hi,

i am currently using linux kernel version 2.6.15-rc5 on x86 with Promise
SATAII150 TX2Plus(250G SATA HDD Disk x 2).

But, SATA HDD disk does not become. program execute result of "fdisk
/dev/sda" is  "Unable to read /dev/sda".

Work well in linux kernel version 2.6.13.2.

Do not act below since change as result that do debugging.
      "[SCSI] use scatter lists for all block pc requests and
simplify hw handlers"
      -  http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=392160335c798bbe94ab3aae6ea0c85d32b81bbc


Test and tried your bug patch,  but, result is same.

By result that I do debugging, if queuecommand () of LLD layer returns
result properly, but execute scsi_probe_lun () -> scsi_execute_req ()
-> blk_execute_rq ()  by thing which is not realized to proc/scsi/scsi
come out . after execute blk_execute_rq(), then cmd->buffer,
cmd->request_buffer is NULL. so, "Model:"  in scsi_add_lun() ->
print_inquiry() comes out NULL.

I what whether must do debugging inform can?

what should I do?

Test Enviroment
--------------
Kernel version: 2.6.15-rc5
SATA Controller: Promise SATAII150 TX2Plus
SATA HDD: Western Digital 250G x 2
SATA Driver: http://www.promise.com/support/download/download2_eng.asp?productID=126&category=all&os=100#

Log
----------------
Nov 24 18:08:27 kernel: ulsata2:[info] Drive 1/0: WDC
WD2500JS-22MHB0    488397167s 250059MB  UDMA6
Nov 24 18:08:27 kernel: ulsata2:[info] Drive 3/0: WDC
WD2500JS-22MHB0    488397167s 250059MB  UDMA6
Nov 24 18:08:27 kernel: scsi0 : ulsata2
Nov 24 18:08:27 kernel:   Vendor:           Model:
      Rev:
Nov 24 18:08:27 kernel:   Type:   Direct-Access
      ANSI SCSI revision: 00
Nov 24 18:08:27 kernel: sda : sector size 0 reported, assuming 512.
Nov 24 18:08:27 kernel: SCSI device sda: 1 512-byte hdwr sectors (0 MB)
Nov 24 18:08:27 kernel: sda: asking for cache data failed
Nov 24 18:08:27 kernel: sda: assuming drive cache: write through
Nov 24 18:08:27 kernel: sda : sector size 0 reported, assuming 512.
Nov 24 18:08:27 kernel: SCSI device sda: 1 512-byte hdwr sectors (0 MB)
Nov 24 18:08:27 kernel: sda: asking for cache data failed
Nov 24 18:08:27 kernel: sda: assuming drive cache: write through
Nov 24 18:08:27 kernel:  sda: sda1
Nov 24 18:08:27 kernel: sd 0:0:0:0: Attached scsi disk sda
Nov 24 18:08:27 kernel: sd 0:0:0:0: Attached scsi generic sg0 type 0
Nov 24 18:08:27 kernel:   Vendor:           Model:
      Rev:
Nov 24 18:08:27 kernel:   Type:   Direct-Access
      ANSI SCSI revision: 00
Nov 24 18:08:27 kernel: sdb : sector size 0 reported, assuming 512.
Nov 24 18:08:27 kernel: SCSI device sdb: 1 512-byte hdwr sectors (0 MB)
Nov 24 18:08:27 kernel: sdb: asking for cache data failed
Nov 24 18:08:27 kernel: sdb: assuming drive cache: write through
Nov 24 18:08:27 kernel: sdb : sector size 0 reported, assuming 512.
Nov 24 18:08:27 kernel: SCSI device sdb: 1 512-byte hdwr sectors (0 MB)
Nov 24 18:08:27 kernel: sdb: asking for cache data failed
Nov 24 18:08:27 kernel: sdb: assuming drive cache: write through
Nov 24 18:08:27 kernel:  sdb: sdb1
Nov 24 18:08:27 kernel: sd 0:0:2:0: Attached scsi disk sdb
Nov 24 18:08:27 kernel: sd 0:0:2:0: Attached scsi generic sg1 type 0


[root@test root]# lsmod
Module                  Size  Used by
snd_pcm_oss            48288  0
snd_pcm                80520  1 snd_pcm_oss
snd_timer              21508  1 snd_pcm
snd_page_alloc          8456  1 snd_pcm
snd_mixer_oss          17024  1 snd_pcm_oss
lp                      9412  0
parport                31816  1 lp
snd                    47076  4 snd_pcm_oss,snd_pcm,snd_timer,snd_mixer_oss
soundcore               7776  1 snd
sr_mod                 15268  0
sg                     34208  0
i810                   20480  0
i830                   24832  0
odcap                  21488  2
button                  5008  0
sbp2                   21252  0
ohci1394               31540  0
ieee1394               87224  2 sbp2,ohci1394
pl2303                 18948  0
usbserial              27368  1 pl2303
usb_storage            53696  0
uhci_hcd               30096  0
ide_scsi               14468  0
raid1                  17920  0
md_mod                 59088  1 raid1
ehci_hcd               29960  0
usbcore               106880  6 pl2303,usbserial,usb_storage,uhci_hcd,ehci_hcd
e1000                  99892  0
sd_mod                 15888  0
ulsata2               132060  0
scsi_mod              122984  7
sr_mod,sg,sbp2,usb_storage,ide_scsi,sd_mod,ulsata2



[root@sentry24 root]# sfdisk -l

Disk /dev/hda: 1007 cylinders, 16 heads, 63 sectors/track
Units = cylinders of 516096 bytes, blocks of 1024 bytes, counting from 0

  Device Boot Start     End   #cyls    #blocks   Id  System
/dev/hda1   *      0+   1006    1007-    507496+  83  Linux
/dev/hda2          0       -       0          0    0  Empty
/dev/hda3          0       -       0          0    0  Empty
/dev/hda4          0       -       0          0    0  Empty

Disk /dev/sda: 0 cylinders, 64 heads, 32 sectors/track
Warning: The partition table looks like it was made
 for C/H/S=*/255/63 (instead of 0/64/32).
For this listing I'll assume that geometry.
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

  Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1          0+  30400   30401- 244196001   83  Linux
/dev/sda2          0       -       0          0    0  Empty
/dev/sda3          0       -       0          0    0  Empty
/dev/sda4          0       -       0          0    0  Empty

Disk /dev/sdb: 0 cylinders, 64 heads, 32 sectors/track
Warning: The partition table looks like it was made
 for C/H/S=*/255/63 (instead of 0/64/32).
For this listing I'll assume that geometry.
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

  Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1          0+  30400   30401- 244196001   83  Linux
/dev/sdb2          0       -       0          0    0  Empty
/dev/sdb3          0       -       0          0    0  Empty
/dev/sdb4          0       -       0          0    0  Empty
[root@sentry24 root]#



[root@sentry24 root]# sg_map -i -x
/dev/sg0  0 0 0 0  0  /dev/sda    WDC WD2500JS-00M
/dev/sg1  0 0 2 0  0  /dev/sdb    WDC WD2500JS-00M
[root@sentry24 root]#



[root@sentry24 root]# fdisk -l /dev/sda
[root@sentry24 root]# fdisk /dev/sda

Unable to read /dev/sda
[root@sentry24 root]#

[root@sentry24 root]# !parted
parted --script /dev/sda mklabel msdos
Error: Can't have a partition outside the disk!
Error: Operation not permitted during read on /dev/sda
Error: Operation not permitted during write on /dev/sda

2005/12/5, Mike Christie <michaelc@cs.wisc.edu>:
> These two patches are some of the core or bugfix code for the SCSI ULD
> scatterlist code. The first patch exports the block layer functions
> needed to be able to do async REQ_BLOCK_PC commands and hook into the
> request end_io callout and it adds the max_hw_sectors code. And the
> second patch fixes a bug in st where it allows SCSI-ml to retry commands
> and reverts SCSI-ml back to its previous behavior where it does not
> allow scsi_io_completion to retry REQ_BLOCK_PC (previously special
> requests) commands.
>
> These patches were made against linux-2.6-block, but apply with some
> offset to scsi-misc.
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] some block and scsi layer additions for ULD scatterlist code
  2005-12-07  1:17 ` Yanggun
@ 2005-12-07  1:49   ` Mike Christie
  2005-12-07  2:03     ` Mike Christie
  2005-12-07  2:09     ` Yanggun
  0 siblings, 2 replies; 6+ messages in thread
From: Mike Christie @ 2005-12-07  1:49 UTC (permalink / raw)
  To: Yanggun; +Cc: axboe, Linux SCSI list

Yanggun wrote:
> Hi,
> 
> i am currently using linux kernel version 2.6.15-rc5 on x86 with Promise
> SATAII150 TX2Plus(250G SATA HDD Disk x 2).
> 
> But, SATA HDD disk does not become. program execute result of "fdisk
> /dev/sda" is  "Unable to read /dev/sda".
> 
> Work well in linux kernel version 2.6.13.2.
> 
> Do not act below since change as result that do debugging.
>       "[SCSI] use scatter lists for all block pc requests and
> simplify hw handlers"
>       -  http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=392160335c798bbe94ab3aae6ea0c85d32b81bbc
> 
> 
> Test and tried your bug patch,  but, result is same.

I do not think my patch was meant to address your issue :(

> 
> By result that I do debugging, if queuecommand () of LLD layer returns
> result properly, but execute scsi_probe_lun () -> scsi_execute_req ()
> -> blk_execute_rq ()  by thing which is not realized to proc/scsi/scsi
> come out . after execute blk_execute_rq(), then cmd->buffer,
> cmd->request_buffer is NULL. so, "Model:"  in scsi_add_lun() ->
> print_inquiry() comes out NULL.

I am not sure I understand correctly, but I do not think the analysis 
above is completely correct. scsi_execute_req gets a buffer passed to it 
so it should not matter if those fields are set to NULL when 
scsi_execute_req completes as long as something has been copied to the 
buffer passed into scsi_execute_req.

> --------------
> Kernel version: 2.6.15-rc5
> SATA Controller: Promise SATAII150 TX2Plus
> SATA HDD: Western Digital 250G x 2
> SATA Driver: http://www.promise.com/support/download/download2_eng.asp?productID=126&category=all&os=100#
> 

I am not too familar with SATA. Is this driver in mainline and does it 
use libata? Which module is it?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] some block and scsi layer additions for ULD scatterlist code
  2005-12-07  1:49   ` Mike Christie
@ 2005-12-07  2:03     ` Mike Christie
  2005-12-07  2:12       ` Yanggun
  2005-12-07  2:09     ` Yanggun
  1 sibling, 1 reply; 6+ messages in thread
From: Mike Christie @ 2005-12-07  2:03 UTC (permalink / raw)
  To: Yanggun; +Cc: axboe, Linux SCSI list

Mike Christie wrote:
> Yanggun wrote:
> 
>> Hi,
>>
>> i am currently using linux kernel version 2.6.15-rc5 on x86 with Promise
>> SATAII150 TX2Plus(250G SATA HDD Disk x 2).
>>
>> But, SATA HDD disk does not become. program execute result of "fdisk
>> /dev/sda" is  "Unable to read /dev/sda".
>>
>> Work well in linux kernel version 2.6.13.2.
>>
>> Do not act below since change as result that do debugging.
>>       "[SCSI] use scatter lists for all block pc requests and
>> simplify hw handlers"
>>       -  
>> http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=392160335c798bbe94ab3aae6ea0c85d32b81bbc 
>>
>>
>>
>> Test and tried your bug patch,  but, result is same.
> 
> 
> I do not think my patch was meant to address your issue :(
> 
>>
>> By result that I do debugging, if queuecommand () of LLD layer returns
>> result properly, but execute scsi_probe_lun () -> scsi_execute_req ()
>> -> blk_execute_rq ()  by thing which is not realized to proc/scsi/scsi
>> come out . after execute blk_execute_rq(), then cmd->buffer,
>> cmd->request_buffer is NULL. so, "Model:"  in scsi_add_lun() ->
>> print_inquiry() comes out NULL.
> 
> 
> I am not sure I understand correctly, but I do not think the analysis 
> above is completely correct. scsi_execute_req gets a buffer passed to it 
> so it should not matter if those fields are set to NULL when 
> scsi_execute_req completes as long as something has been copied to the 
> buffer passed into scsi_execute_req.
> 
>> --------------
>> Kernel version: 2.6.15-rc5
>> SATA Controller: Promise SATAII150 TX2Plus
>> SATA HDD: Western Digital 250G x 2
>> SATA Driver: 
>> http://www.promise.com/support/download/download2_eng.asp?productID=126&category=all&os=100# 
>>
>>
> 
> I am not too familar with SATA. Is this driver in mainline and does it 
> use libata? Which module is it?

I downloaded SATAII150_300_Series_Linux_src of that site and it looks 
like it should not assume some commands are scatterlist based and some 
are use_sg=0. The driver needs to be updated.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] some block and scsi layer additions for ULD scatterlist code
  2005-12-07  1:49   ` Mike Christie
  2005-12-07  2:03     ` Mike Christie
@ 2005-12-07  2:09     ` Yanggun
  1 sibling, 0 replies; 6+ messages in thread
From: Yanggun @ 2005-12-07  2:09 UTC (permalink / raw)
  To: Mike Christie; +Cc: axboe, Linux SCSI list

thanks comment.

Using driver is SATA controller driver who offer in Promise company.
this driver does not mainline driver. and this driver does not use
libata.

Promise SATAII150 TX2plus Driver of main line does sata_promise. but
do not use doing not support sata_promise + libata to hotswap yet.

I will do debugging little more.

2005/12/7, Mike Christie <michaelc@cs.wisc.edu>:
> Yanggun wrote:
> > Hi,
> >
> > i am currently using linux kernel version 2.6.15-rc5 on x86 with Promise
> > SATAII150 TX2Plus(250G SATA HDD Disk x 2).
> >
> > But, SATA HDD disk does not become. program execute result of "fdisk
> > /dev/sda" is  "Unable to read /dev/sda".
> >
> > Work well in linux kernel version 2.6.13.2.
> >
> > Do not act below since change as result that do debugging.
> >       "[SCSI] use scatter lists for all block pc requests and
> > simplify hw handlers"
> >       -  http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=392160335c798bbe94ab3aae6ea0c85d32b81bbc
> >
> >
> > Test and tried your bug patch,  but, result is same.
>
> I do not think my patch was meant to address your issue :(
>
> >
> > By result that I do debugging, if queuecommand () of LLD layer returns
> > result properly, but execute scsi_probe_lun () -> scsi_execute_req ()
> > -> blk_execute_rq ()  by thing which is not realized to proc/scsi/scsi
> > come out . after execute blk_execute_rq(), then cmd->buffer,
> > cmd->request_buffer is NULL. so, "Model:"  in scsi_add_lun() ->
> > print_inquiry() comes out NULL.
>
> I am not sure I understand correctly, but I do not think the analysis
> above is completely correct. scsi_execute_req gets a buffer passed to it
> so it should not matter if those fields are set to NULL when
> scsi_execute_req completes as long as something has been copied to the
> buffer passed into scsi_execute_req.
>
> > --------------
> > Kernel version: 2.6.15-rc5
> > SATA Controller: Promise SATAII150 TX2Plus
> > SATA HDD: Western Digital 250G x 2
> > SATA Driver: http://www.promise.com/support/download/download2_eng.asp?productID=126&category=all&os=100#
> >
>
> I am not too familar with SATA. Is this driver in mainline and does it
> use libata? Which module is it?
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] some block and scsi layer additions for ULD scatterlist code
  2005-12-07  2:03     ` Mike Christie
@ 2005-12-07  2:12       ` Yanggun
  0 siblings, 0 replies; 6+ messages in thread
From: Yanggun @ 2005-12-07  2:12 UTC (permalink / raw)
  To: Mike Christie; +Cc: axboe, Linux SCSI list

thanks. I am really appreciative for helping.

2005/12/7, Mike Christie <michaelc@cs.wisc.edu>:
> Mike Christie wrote:
> > Yanggun wrote:
> >
> >> Hi,
> >>
> >> i am currently using linux kernel version 2.6.15-rc5 on x86 with Promise
> >> SATAII150 TX2Plus(250G SATA HDD Disk x 2).
> >>
> >> But, SATA HDD disk does not become. program execute result of "fdisk
> >> /dev/sda" is  "Unable to read /dev/sda".
> >>
> >> Work well in linux kernel version 2.6.13.2.
> >>
> >> Do not act below since change as result that do debugging.
> >>       "[SCSI] use scatter lists for all block pc requests and
> >> simplify hw handlers"
> >>       -
> >> http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=392160335c798bbe94ab3aae6ea0c85d32b81bbc
> >>
> >>
> >>
> >> Test and tried your bug patch,  but, result is same.
> >
> >
> > I do not think my patch was meant to address your issue :(
> >
> >>
> >> By result that I do debugging, if queuecommand () of LLD layer returns
> >> result properly, but execute scsi_probe_lun () -> scsi_execute_req ()
> >> -> blk_execute_rq ()  by thing which is not realized to proc/scsi/scsi
> >> come out . after execute blk_execute_rq(), then cmd->buffer,
> >> cmd->request_buffer is NULL. so, "Model:"  in scsi_add_lun() ->
> >> print_inquiry() comes out NULL.
> >
> >
> > I am not sure I understand correctly, but I do not think the analysis
> > above is completely correct. scsi_execute_req gets a buffer passed to it
> > so it should not matter if those fields are set to NULL when
> > scsi_execute_req completes as long as something has been copied to the
> > buffer passed into scsi_execute_req.
> >
> >> --------------
> >> Kernel version: 2.6.15-rc5
> >> SATA Controller: Promise SATAII150 TX2Plus
> >> SATA HDD: Western Digital 250G x 2
> >> SATA Driver:
> >> http://www.promise.com/support/download/download2_eng.asp?productID=126&category=all&os=100#
> >>
> >>
> >
> > I am not too familar with SATA. Is this driver in mainline and does it
> > use libata? Which module is it?
>
> I downloaded SATAII150_300_Series_Linux_src of that site and it looks
> like it should not assume some commands are scatterlist based and some
> are use_sg=0. The driver needs to be updated.
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-12-07  2:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-05  8:37 [PATCH 0/2] some block and scsi layer additions for ULD scatterlist code Mike Christie
2005-12-07  1:17 ` Yanggun
2005-12-07  1:49   ` Mike Christie
2005-12-07  2:03     ` Mike Christie
2005-12-07  2:12       ` Yanggun
2005-12-07  2:09     ` Yanggun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).