linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Pat LaVarre <p.lavarre@ieee.org>
Cc: linux-scsi@vger.kernel.org
Subject: Re: bytes/CDB of SCSI pass thru grossly limited maybe
Date: Mon, 23 Aug 2004 20:17:15 +0200	[thread overview]
Message-ID: <20040823181715.GA24499@suse.de> (raw)
In-Reply-To: <E04775E6-F529-11D8-BFA2-00039398BB5E@ieee.org>

On Mon, Aug 23 2004, Pat LaVarre wrote:
> Jens A:
> 
> >What you can shove into the cdb is of lesser interest than the fact 
> >that
> >ATAPI itself cannot do more than
> 
> Yes.
> 
> >the request_queue structure in blkdev.h, you'll find such things as:
> >
> >        unsigned short          max_sectors;
> >        unsigned short          max_phys_segments;
> >        unsigned short          max_hw_segments;
> >        unsigned int            max_segment_size;
> >
> >which are set by the driver and limit how big a request you can submit
> >through SG_IO.
> 
> I will return to study this further.
> 
> Sorry I still do not yet immediately understand precisely who is 
> limiting what.
> 
> I do not see how these 16 and 32 bit limits correspond to a 128 KiB 
> limit on how many bytes of data may accompany a CDB.  Instead I see:
> 
> (1 << (4 + 16)) is 1 Mi.
> (1 << (9 + 16)) is 32 Mi.
> (1 << (11 + 16)) is 128 Mi.
> 
> (1 << 9) is 0.5 Ki, often = B/LBA of HDD
> (1 << 11) is 2 Ki, often = B/LBA of DVD/CD.
> (1 << 12) is 4 Ki, often = B/page of x86 virtual memory
> (1 << 16) is 64 Ki.
> (1 << 32) is 4 Ti.
> 
> No 128 Ki anywhere.
> 
> >What you can shove into the cdb is of lesser interest than the fact 
> >that
> >ATAPI itself cannot do more than 128KiB _per command_.
> 
> Possibly I have misunderstood what is "ATAPI itself"?
> 
> The PIO and DMA I know in PATAPI do not limit data bytes per command.  
> Even PIO limits only data bytes per DRQ, not per command.
> 
> I think PATAPI itself is the standard launched by SFF 8020i that 
> appears now at ANSI/ NCITS t13.org.  I see that standard as a transport 
> for SCSI over IDE, with no definite limit on data per command, though 
> arguably the UDMA CRC may grow less reliable if the host and device 
> neglect to cooperate to insert such CRC often into the data.
> 
> I see PATAPI does limit max bytes of CDB, to 16 (x10) else to 12 (xC), 
> by neglecting to enumerate any other CDB-containing packet lengths for 
> the op xA1 "IDENTIFY" data to request.

Sorry my clowning around, I'm too ATA damaged. You can play with bigger
transfers with something ala this applied, will allow you to pass in <=
512KiB/command.

===== drivers/ide/ide-cd.c 1.89 vs edited =====
--- 1.89/drivers/ide/ide-cd.c	2004-08-13 02:03:53 +02:00
+++ edited/drivers/ide/ide-cd.c	2004-08-23 20:15:52 +02:00
@@ -3138,6 +3138,7 @@
 
 	blk_queue_prep_rq(drive->queue, ide_cdrom_prep_fn);
 	blk_queue_dma_alignment(drive->queue, 31);
+	blk_queue_max_sectors(drive->queue, 1024);
 	drive->queue->unplug_delay = (1 * HZ) / 1000;
 	if (!drive->queue->unplug_delay)
 		drive->queue->unplug_delay = 1;

-- 
Jens Axboe


  reply	other threads:[~2004-08-23 18:17 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-30 23:04 bytes/CDB of SCSI pass thru grossly limited maybe Pat LaVarre
2004-07-31 14:12 ` Jens Axboe
2004-08-16 17:55   ` Pat LaVarre
2004-08-17 18:07     ` Pat LaVarre
2004-08-23 15:46     ` Jens Axboe
2004-08-23 16:05       ` Pat LaVarre
2004-08-23 17:08         ` Jens Axboe
2004-08-23 17:28           ` Pat LaVarre
2004-08-23 18:17             ` Jens Axboe [this message]
2004-08-26 23:20               ` Pat LaVarre
2004-08-23 16:06       ` Jeff Garzik
2004-08-23 17:05         ` Pat LaVarre
2004-08-23 18:48         ` Luben Tuikov
2004-08-23 19:06           ` Jeff Garzik
2004-08-23 19:14             ` Luben Tuikov
     [not found] <A8E06BE4-F7BA-11D8-AC6B-00039398BB5E@ieee.org>
     [not found] ` <Pine.LNX.4.44L0 .0408271100590.1238-100000@ida.rowland.org>
2004-08-27 15:09 ` Alan Stern
2004-08-28 14:31   ` Jens Axboe
2004-08-28 15:14     ` Alan Stern
2004-08-28 15:36       ` Jens Axboe
2004-08-28 17:51     ` James Bottomley
2004-08-28 17:55       ` Jens Axboe
2004-08-28 18:20         ` James Bottomley
2004-08-28 18:41           ` Jens Axboe
2004-08-29 13:34             ` James Bottomley
2004-08-29 13:45               ` Jens Axboe
2004-08-30 18:15                 ` Pat LaVarre
2004-09-01 15:20                   ` Pat LaVarre

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=20040823181715.GA24499@suse.de \
    --to=axboe@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=p.lavarre@ieee.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 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).