linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 01/15] libata: Setup nbytes in ata_sg_init_one
@ 2006-02-06 15:42 brking
  2006-02-09  7:14 ` Jeff Garzik
  0 siblings, 1 reply; 5+ messages in thread
From: brking @ 2006-02-06 15:42 UTC (permalink / raw)
  To: jgarzik; +Cc: linux-ide, linux-scsi, brking


Setup nbytes in ata_sg_init_one to the total transfer length
of the command.

Signed-off-by: Brian King <brking@us.ibm.com>
---

 drivers/scsi/libata-core.c |    1 +
 1 files changed, 1 insertion(+)

diff -puN drivers/scsi/libata-core.c~libata_setup_nbytes drivers/scsi/libata-core.c
--- libata-dev/drivers/scsi/libata-core.c~libata_setup_nbytes	2006-02-03 12:31:49.000000000 -0600
+++ libata-dev-bjking1/drivers/scsi/libata-core.c	2006-02-03 12:31:49.000000000 -0600
@@ -2996,6 +2996,7 @@ void ata_sg_init_one(struct ata_queued_c
 	qc->n_elem = 1;
 	qc->orig_n_elem = 1;
 	qc->buf_virt = buf;
+	qc->nbytes = buflen;
 
 	sg = qc->__sg;
 	sg_init_one(sg, buf, buflen);
_

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

* Re: [patch 01/15] libata: Setup nbytes in ata_sg_init_one
  2006-02-06 15:42 [patch " brking
@ 2006-02-09  7:14 ` Jeff Garzik
  0 siblings, 0 replies; 5+ messages in thread
From: Jeff Garzik @ 2006-02-09  7:14 UTC (permalink / raw)
  To: brking; +Cc: linux-ide, linux-scsi

brking@us.ibm.com wrote:
> Setup nbytes in ata_sg_init_one to the total transfer length
> of the command.
> 
> Signed-off-by: Brian King <brking@us.ibm.com>

ACK, but I will wait for your resend to apply any of these patches. 
[see comments coming soon, for later patches]


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

* [PATCH 01/15] libata: Setup nbytes in ata_sg_init_one
@ 2006-03-17 23:03 Brian King
  2006-03-22  1:46 ` Jeff Garzik
  0 siblings, 1 reply; 5+ messages in thread
From: Brian King @ 2006-03-17 23:03 UTC (permalink / raw)
  To: jgarzik; +Cc: linux-ide, linux-scsi, brking


Setup nbytes in ata_sg_init_one to the total transfer length
of the command.

Signed-off-by: Brian King <brking@us.ibm.com>
---

 libata-dev-bjking1/drivers/scsi/libata-core.c |    1 +
 1 files changed, 1 insertion(+)

diff -puN drivers/scsi/libata-core.c~libata_setup_nbytes drivers/scsi/libata-core.c
--- libata-dev/drivers/scsi/libata-core.c~libata_setup_nbytes	2006-03-17 15:35:26.000000000 -0600
+++ libata-dev-bjking1/drivers/scsi/libata-core.c	2006-03-17 15:35:26.000000000 -0600
@@ -2887,6 +2887,7 @@ void ata_sg_init_one(struct ata_queued_c
 	qc->n_elem = 1;
 	qc->orig_n_elem = 1;
 	qc->buf_virt = buf;
+	qc->nbytes = buflen;
 
 	sg = qc->__sg;
 	sg_init_one(sg, buf, buflen);
_

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

* Re: [PATCH 01/15] libata: Setup nbytes in ata_sg_init_one
  2006-03-17 23:03 [PATCH 01/15] libata: Setup nbytes in ata_sg_init_one Brian King
@ 2006-03-22  1:46 ` Jeff Garzik
  2006-03-22 14:36   ` Brian King
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Garzik @ 2006-03-22  1:46 UTC (permalink / raw)
  To: Brian King; +Cc: linux-ide, linux-scsi

Brian King wrote:
> Setup nbytes in ata_sg_init_one to the total transfer length
> of the command.
> 
> Signed-off-by: Brian King <brking@us.ibm.com>
> ---
> 
>  libata-dev-bjking1/drivers/scsi/libata-core.c |    1 +
>  1 files changed, 1 insertion(+)
> 
> diff -puN drivers/scsi/libata-core.c~libata_setup_nbytes drivers/scsi/libata-core.c
> --- libata-dev/drivers/scsi/libata-core.c~libata_setup_nbytes	2006-03-17 15:35:26.000000000 -0600
> +++ libata-dev-bjking1/drivers/scsi/libata-core.c	2006-03-17 15:35:26.000000000 -0600
> @@ -2887,6 +2887,7 @@ void ata_sg_init_one(struct ata_queued_c
>  	qc->n_elem = 1;
>  	qc->orig_n_elem = 1;
>  	qc->buf_virt = buf;
> +	qc->nbytes = buflen;

Why?

This is largely an internal variable used by the ATAPI code.

	Jeff




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

* Re: [PATCH 01/15] libata: Setup nbytes in ata_sg_init_one
  2006-03-22  1:46 ` Jeff Garzik
@ 2006-03-22 14:36   ` Brian King
  0 siblings, 0 replies; 5+ messages in thread
From: Brian King @ 2006-03-22 14:36 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-ide, linux-scsi

Jeff Garzik wrote:
> Brian King wrote:
>> Setup nbytes in ata_sg_init_one to the total transfer length
>> of the command.
>>
>> Signed-off-by: Brian King <brking@us.ibm.com>
>> ---
>>
>>  libata-dev-bjking1/drivers/scsi/libata-core.c |    1 +
>>  1 files changed, 1 insertion(+)
>>
>> diff -puN drivers/scsi/libata-core.c~libata_setup_nbytes drivers/scsi/libata-core.c
>> --- libata-dev/drivers/scsi/libata-core.c~libata_setup_nbytes	2006-03-17 15:35:26.000000000 -0600
>> +++ libata-dev-bjking1/drivers/scsi/libata-core.c	2006-03-17 15:35:26.000000000 -0600
>> @@ -2887,6 +2887,7 @@ void ata_sg_init_one(struct ata_queued_c
>>  	qc->n_elem = 1;
>>  	qc->orig_n_elem = 1;
>>  	qc->buf_virt = buf;
>> +	qc->nbytes = buflen;
> 
> Why?
> 
> This is largely an internal variable used by the ATAPI code.

The ipr driver needs to know the total transfer length of the command
in bytes to setup the command to the adapter properly, since the adapter
firmware interface requires it. I didn't see anywhere else to get this
information, the only other option would be to compute it based on the
scatterlist.


-- 
Brian King
eServer Storage I/O
IBM Linux Technology Center

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

end of thread, other threads:[~2006-03-22 14:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-17 23:03 [PATCH 01/15] libata: Setup nbytes in ata_sg_init_one Brian King
2006-03-22  1:46 ` Jeff Garzik
2006-03-22 14:36   ` Brian King
  -- strict thread matches above, loose matches on Subject: below --
2006-02-06 15:42 [patch " brking
2006-02-09  7:14 ` Jeff Garzik

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).