Re: [PATCH 05/14] libata: make -data_xfer return the number of consumed bytes

2007-12-04 Thread Jeff Garzik
Tejun Heo wrote: Depending on how many bytes are transferred as a unit, PIO data tranasfer may consume more bytes than requested. Knowing how much data is consumed is necessary to determine how much is left for draining. This patch update -data_xfer such that it returns the number of consumed

Re: [PATCH 05/14] libata: make -data_xfer return the number of consumed bytes

2007-12-04 Thread Tejun Heo
Jeff Garzik wrote: IMO s/buflen/len/ causes needless patch noise, and makes this harder review Separating out s/buflen/len/ to a separate patch seemed silly yet I wanted to renamed it. :-P If you want to kill it, I'll kill the renaming. If you want it in a separate patch, I'll separate it

Re: [PATCH 05/14] libata: make -data_xfer return the number of consumed bytes

2007-12-04 Thread Jeff Garzik
Tejun Heo wrote: Jeff Garzik wrote: IMO s/buflen/len/ causes needless patch noise, and makes this harder review Separating out s/buflen/len/ to a separate patch seemed silly yet I wanted to renamed it. :-P If you want to kill it, I'll kill the renaming. If you want it in a separate patch,

[PATCH 05/14] libata: make -data_xfer return the number of consumed bytes

2007-11-29 Thread Tejun Heo
Depending on how many bytes are transferred as a unit, PIO data tranasfer may consume more bytes than requested. Knowing how much data is consumed is necessary to determine how much is left for draining. This patch update -data_xfer such that it returns the number of consumed bytes. While at

Re: [PATCH 05/14] libata: make -data_xfer return the number of consumed bytes

2007-11-29 Thread Alan Cox
On Thu, 29 Nov 2007 23:33:28 +0900 Tejun Heo [EMAIL PROTECTED] wrote: Depending on how many bytes are transferred as a unit, PIO data tranasfer may consume more bytes than requested. Knowing how much data is consumed is necessary to determine how much is left for draining. This patch update

Re: [PATCH 05/14] libata: make -data_xfer return the number of consumed bytes

2007-11-29 Thread Tejun Heo
Alan Cox wrote: On Thu, 29 Nov 2007 23:33:28 +0900 Tejun Heo [EMAIL PROTECTED] wrote: Depending on how many bytes are transferred as a unit, PIO data tranasfer may consume more bytes than requested. Knowing how much data is consumed is necessary to determine how much is left for draining.

Re: [PATCH 05/14] libata: make -data_xfer return the number of consumed bytes

2007-11-29 Thread Alan Cox
It's for draining. Let's say drive says it wanna transfer 18 bytes but the buffer is only 13 bytes long. If the transfer method consumes 2 bytes per read, it would consume 14 bytes. If the transfer method consumes 4 bytes per read, it would consume 16 bytes. If we drain too much, we risk

Re: [PATCH 05/14] libata: make -data_xfer return the number of consumed bytes

2007-11-29 Thread Tejun Heo
Alan Cox wrote: It's for draining. Let's say drive says it wanna transfer 18 bytes but the buffer is only 13 bytes long. If the transfer method consumes 2 bytes per read, it would consume 14 bytes. If the transfer method consumes 4 bytes per read, it would consume 16 bytes. If we drain too

Re: [PATCH 05/14] libata: make -data_xfer return the number of consumed bytes

2007-11-29 Thread Alan Cox
DMA alignment is host restriction so I think it belongs to ata_host if we ever need it. Do you know of any controller which require such thing? No need to add complexity when it's not necessary. If we ever get the blasted inic162x working then that appears to have some alignment limits. At

Re: [PATCH 05/14] libata: make -data_xfer return the number of consumed bytes

2007-11-29 Thread Mark Lord
Alan Cox wrote: DMA alignment is host restriction so I think it belongs to ata_host if we ever need it. Do you know of any controller which require such thing? No need to add complexity when it's not necessary. If we ever get the blasted inic162x working then that appears to have some

Re: [PATCH 05/14] libata: make -data_xfer return the number of consumed bytes

2007-11-29 Thread Jeff Garzik
Alan Cox wrote: DMA alignment is host restriction so I think it belongs to ata_host if we ever need it. Do you know of any controller which require such thing? No need to add complexity when it's not necessary. If we ever get the blasted inic162x working then that appears to have some

Re: [PATCH 05/14] libata: make -data_xfer return the number of consumed bytes

2007-11-29 Thread Jeff Garzik
Mark Lord wrote: Alan Cox wrote: DMA alignment is host restriction so I think it belongs to ata_host if we ever need it. Do you know of any controller which require such thing? No need to add complexity when it's not necessary. If we ever get the blasted inic162x working then that appears