public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* how to limit number of sectors each time
@ 2008-10-16  3:29 gshan
  2008-10-16  5:44 ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: gshan @ 2008-10-16  3:29 UTC (permalink / raw)
  To: linux-kernel

Hi All,

I want to limit requested sectors each time in function 
drivers/ide/ide-disk.c::__ide_do_rw_disk. The requested
sectors were defined in rq->nr_sectors. So how to limit or decrease 
nr_sectors for data transfer each time?

Thanks in advance,
Gavin

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

* Re: how to limit number of sectors each time
  2008-10-16  3:29 how to limit number of sectors each time gshan
@ 2008-10-16  5:44 ` Jens Axboe
       [not found]   ` <48F6DA7A.9080003@alcatel-lucent.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2008-10-16  5:44 UTC (permalink / raw)
  To: gshan; +Cc: linux-kernel

On Thu, Oct 16 2008, gshan wrote:
> Hi All,
> 
> I want to limit requested sectors each time in function 
> drivers/ide/ide-disk.c::__ide_do_rw_disk. The requested
> sectors were defined in rq->nr_sectors. So how to limit or decrease 
> nr_sectors for data transfer each time?

Set max_sectors_kb in sysfs for that device or q->max_sectors
internally.

-- 
Jens Axboe


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

* Re: how to limit number of sectors each time
       [not found]     ` <20081016061808.GS19428@kernel.dk>
@ 2008-10-16  6:21       ` gshan
  2008-10-16  6:25         ` Jens Axboe
  2008-10-17 16:47         ` Bartlomiej Zolnierkiewicz
  0 siblings, 2 replies; 6+ messages in thread
From: gshan @ 2008-10-16  6:21 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel


> (please never send out html only emails, it's considered very bad style
> on this list)
>
> Sounds like you need a quirk/blacklist entry for that drive, if it
> doesn't support 0x00 as meaning 256 sectors. If you are using libata,
> you can add a ATA_HORKAGE_MAX_SEC_128 entry to ata_device_blacklist[] in
> drivers/ata/libata-core.c
>   
I'm using IDE driver instead of HD driver.


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

* Re: how to limit number of sectors each time
  2008-10-16  6:21       ` gshan
@ 2008-10-16  6:25         ` Jens Axboe
  2008-10-16  6:28           ` gshan
  2008-10-17 16:47         ` Bartlomiej Zolnierkiewicz
  1 sibling, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2008-10-16  6:25 UTC (permalink / raw)
  To: gshan; +Cc: linux-kernel, bzolnier

On Thu, Oct 16 2008, gshan wrote:
> 
> >(please never send out html only emails, it's considered very bad style
> >on this list)
> >
> >Sounds like you need a quirk/blacklist entry for that drive, if it
> >doesn't support 0x00 as meaning 256 sectors. If you are using libata,
> >you can add a ATA_HORKAGE_MAX_SEC_128 entry to ata_device_blacklist[] in
> >drivers/ata/libata-core.c
> >  
> I'm using IDE driver instead of HD driver.

Then I'm sure Bart can help you out (CC'ed).

-- 
Jens Axboe


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

* Re: how to limit number of sectors each time
  2008-10-16  6:25         ` Jens Axboe
@ 2008-10-16  6:28           ` gshan
  0 siblings, 0 replies; 6+ messages in thread
From: gshan @ 2008-10-16  6:28 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel, bzolnier


>> I'm using IDE driver instead of HD driver.
>>     
I dumped out IO registers and PRD table. Note that
maxinum allowed sector number has been decreased
from 256 to 32.

hdc: dma_timer_expiry: dma status == 0x21
========IDE Register DUmp========
DMA start sector: 0x007d5fb5
DMA sectors     : 0x0020
Data Reg        : 0x00
Error Reg       : 0x00
Nsector Reg     : 0x19
Sector Reg      : 0xbc
LCYL Reg        : 0x5f
HCYL Reg        : 0x7d
Select Reg      : 0xe0
Status Reg      : 0x58
Control Reg     : 0x58
IRQ Reg         : 0x58
======Physical Region Descriptor=======
Base_PRD: 0x0189f000  Current_PRD: 0x0189f008  Entries:3
index=0  base=0x00204d1c lengh=0x00100000
index=1  base=0x00604c1c lengh=0x00200000
index=2  base=0x00304d1c lengh=0x00100080


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

* Re: how to limit number of sectors each time
  2008-10-16  6:21       ` gshan
  2008-10-16  6:25         ` Jens Axboe
@ 2008-10-17 16:47         ` Bartlomiej Zolnierkiewicz
  1 sibling, 0 replies; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-10-17 16:47 UTC (permalink / raw)
  To: gshan; +Cc: Jens Axboe, linux-kernel, linux-ide


[ added linux-ide@ to cc:, please use it for ATA questions ]

On Thursday 16 October 2008, gshan wrote:
> 
> > (please never send out html only emails, it's considered very bad style
> > on this list)
> >
> > Sounds like you need a quirk/blacklist entry for that drive, if it
> > doesn't support 0x00 as meaning 256 sectors. If you are using libata,
> > you can add a ATA_HORKAGE_MAX_SEC_128 entry to ata_device_blacklist[] in
> > drivers/ata/libata-core.c
> >   
> I'm using IDE driver instead of HD driver.

Then you need to add check for this device to ide_disk_setup()
(prior to blk_queue_max_sectors() call) in drivers/ide/ide-disk.c.

Thanks,
Bart

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

end of thread, other threads:[~2008-10-17 16:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-16  3:29 how to limit number of sectors each time gshan
2008-10-16  5:44 ` Jens Axboe
     [not found]   ` <48F6DA7A.9080003@alcatel-lucent.com>
     [not found]     ` <20081016061808.GS19428@kernel.dk>
2008-10-16  6:21       ` gshan
2008-10-16  6:25         ` Jens Axboe
2008-10-16  6:28           ` gshan
2008-10-17 16:47         ` Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox