* [PATCH] scatterlist fallout: drivers/scsi/arm/
@ 2007-10-27 18:44 Al Viro
2007-10-27 19:21 ` Russell King
2007-10-27 20:17 ` Russell King
0 siblings, 2 replies; 9+ messages in thread
From: Al Viro @ 2007-10-27 18:44 UTC (permalink / raw)
To: Linus Torvalds; +Cc: rmk, axboe, linux-kernel
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
diff --git a/drivers/scsi/arm/scsi.h b/drivers/scsi/arm/scsi.h
index 21ba571..2d09fef 100644
--- a/drivers/scsi/arm/scsi.h
+++ b/drivers/scsi/arm/scsi.h
@@ -39,7 +39,7 @@ static inline int next_SCp(struct scsi_pointer *SCp)
SCp->buffer++;
SCp->buffers_residual--;
SCp->ptr = (char *)
- (page_address(SCp->buffer->page) +
+ (page_address(sg_page(SCp->buffer)) +
SCp->buffer->offset);
SCp->this_residual = SCp->buffer->length;
} else {
@@ -77,7 +77,7 @@ static inline void init_SCp(struct scsi_cmnd *SCpnt)
SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->request_buffer;
SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1;
SCpnt->SCp.ptr = (char *)
- (page_address(SCpnt->SCp.buffer->page) +
+ (page_address(sg_page(SCpnt->SCp.buffer)) +
SCpnt->SCp.buffer->offset);
SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length;
SCpnt->SCp.phase = SCpnt->request_bufflen;
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] scatterlist fallout: drivers/scsi/arm/
2007-10-27 18:44 [PATCH] scatterlist fallout: drivers/scsi/arm/ Al Viro
@ 2007-10-27 19:21 ` Russell King
2007-10-27 20:17 ` Russell King
1 sibling, 0 replies; 9+ messages in thread
From: Russell King @ 2007-10-27 19:21 UTC (permalink / raw)
To: Al Viro; +Cc: Linus Torvalds, axboe, linux-kernel
Already have this one queued for Linus in my tree.
On Sat, Oct 27, 2007 at 07:44:04PM +0100, Al Viro wrote:
>
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---
> diff --git a/drivers/scsi/arm/scsi.h b/drivers/scsi/arm/scsi.h
> index 21ba571..2d09fef 100644
> --- a/drivers/scsi/arm/scsi.h
> +++ b/drivers/scsi/arm/scsi.h
> @@ -39,7 +39,7 @@ static inline int next_SCp(struct scsi_pointer *SCp)
> SCp->buffer++;
> SCp->buffers_residual--;
> SCp->ptr = (char *)
> - (page_address(SCp->buffer->page) +
> + (page_address(sg_page(SCp->buffer)) +
> SCp->buffer->offset);
> SCp->this_residual = SCp->buffer->length;
> } else {
> @@ -77,7 +77,7 @@ static inline void init_SCp(struct scsi_cmnd *SCpnt)
> SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->request_buffer;
> SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1;
> SCpnt->SCp.ptr = (char *)
> - (page_address(SCpnt->SCp.buffer->page) +
> + (page_address(sg_page(SCpnt->SCp.buffer)) +
> SCpnt->SCp.buffer->offset);
> SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length;
> SCpnt->SCp.phase = SCpnt->request_bufflen;
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] scatterlist fallout: drivers/scsi/arm/
2007-10-27 18:44 [PATCH] scatterlist fallout: drivers/scsi/arm/ Al Viro
2007-10-27 19:21 ` Russell King
@ 2007-10-27 20:17 ` Russell King
2007-10-28 5:20 ` Linus Torvalds
2007-10-29 8:59 ` Jens Axboe
1 sibling, 2 replies; 9+ messages in thread
From: Russell King @ 2007-10-27 20:17 UTC (permalink / raw)
To: Al Viro; +Cc: Linus Torvalds, axboe, linux-kernel
On Sat, Oct 27, 2007 at 07:44:04PM +0100, Al Viro wrote:
>
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---
> diff --git a/drivers/scsi/arm/scsi.h b/drivers/scsi/arm/scsi.h
> index 21ba571..2d09fef 100644
> --- a/drivers/scsi/arm/scsi.h
> +++ b/drivers/scsi/arm/scsi.h
> @@ -39,7 +39,7 @@ static inline int next_SCp(struct scsi_pointer *SCp)
> SCp->buffer++;
> SCp->buffers_residual--;
> SCp->ptr = (char *)
> - (page_address(SCp->buffer->page) +
> + (page_address(sg_page(SCp->buffer)) +
> SCp->buffer->offset);
> SCp->this_residual = SCp->buffer->length;
> } else {
> @@ -77,7 +77,7 @@ static inline void init_SCp(struct scsi_cmnd *SCpnt)
> SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->request_buffer;
> SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1;
> SCpnt->SCp.ptr = (char *)
> - (page_address(SCpnt->SCp.buffer->page) +
> + (page_address(sg_page(SCpnt->SCp.buffer)) +
> SCpnt->SCp.buffer->offset);
> SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length;
> SCpnt->SCp.phase = SCpnt->request_bufflen;
FYI, here's what I have queued (cut'n'pasted so probably won't apply):
diff --git a/drivers/scsi/arm/scsi.h b/drivers/scsi/arm/scsi.h
index 21ba571..bb6550e 100644
--- a/drivers/scsi/arm/scsi.h
+++ b/drivers/scsi/arm/scsi.h
@@ -38,9 +38,7 @@ static inline int next_SCp(struct scsi_pointer *SCp)
if (ret) {
SCp->buffer++;
SCp->buffers_residual--;
- SCp->ptr = (char *)
- (page_address(SCp->buffer->page) +
- SCp->buffer->offset);
+ SCp->ptr = sg_virt(SCp->buffer);
SCp->this_residual = SCp->buffer->length;
} else {
SCp->ptr = NULL;
@@ -76,9 +74,7 @@ static inline void init_SCp(struct scsi_cmnd *SCpnt)
SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->request_buffer;
SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1;
- SCpnt->SCp.ptr = (char *)
- (page_address(SCpnt->SCp.buffer->page) +
- SCpnt->SCp.buffer->offset);
+ SCpnt->SCp.ptr = sg_virt(SCpnt->SCp.buffer);
SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length;
SCpnt->SCp.phase = SCpnt->request_bufflen;
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] scatterlist fallout: drivers/scsi/arm/
2007-10-27 20:17 ` Russell King
@ 2007-10-28 5:20 ` Linus Torvalds
2007-10-29 8:59 ` Jens Axboe
1 sibling, 0 replies; 9+ messages in thread
From: Linus Torvalds @ 2007-10-28 5:20 UTC (permalink / raw)
To: Russell King; +Cc: Al Viro, axboe, linux-kernel
On Sat, 27 Oct 2007, Russell King wrote:
>
> FYI, here's what I have queued (cut'n'pasted so probably won't apply):
Yes, much nicer.
Linus
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] scatterlist fallout: drivers/scsi/arm/
2007-10-27 20:17 ` Russell King
2007-10-28 5:20 ` Linus Torvalds
@ 2007-10-29 8:59 ` Jens Axboe
2007-10-29 9:07 ` Russell King
1 sibling, 1 reply; 9+ messages in thread
From: Jens Axboe @ 2007-10-29 8:59 UTC (permalink / raw)
To: Russell King; +Cc: Al Viro, Linus Torvalds, linux-kernel
On Sat, Oct 27 2007, Russell King wrote:
> On Sat, Oct 27, 2007 at 07:44:04PM +0100, Al Viro wrote:
> >
> > Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> > ---
> > diff --git a/drivers/scsi/arm/scsi.h b/drivers/scsi/arm/scsi.h
> > index 21ba571..2d09fef 100644
> > --- a/drivers/scsi/arm/scsi.h
> > +++ b/drivers/scsi/arm/scsi.h
> > @@ -39,7 +39,7 @@ static inline int next_SCp(struct scsi_pointer *SCp)
> > SCp->buffer++;
> > SCp->buffers_residual--;
> > SCp->ptr = (char *)
> > - (page_address(SCp->buffer->page) +
> > + (page_address(sg_page(SCp->buffer)) +
> > SCp->buffer->offset);
> > SCp->this_residual = SCp->buffer->length;
> > } else {
> > @@ -77,7 +77,7 @@ static inline void init_SCp(struct scsi_cmnd *SCpnt)
> > SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->request_buffer;
> > SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1;
> > SCpnt->SCp.ptr = (char *)
> > - (page_address(SCpnt->SCp.buffer->page) +
> > + (page_address(sg_page(SCpnt->SCp.buffer)) +
> > SCpnt->SCp.buffer->offset);
> > SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length;
> > SCpnt->SCp.phase = SCpnt->request_bufflen;
>
> FYI, here's what I have queued (cut'n'pasted so probably won't apply):
>
> diff --git a/drivers/scsi/arm/scsi.h b/drivers/scsi/arm/scsi.h
> index 21ba571..bb6550e 100644
> --- a/drivers/scsi/arm/scsi.h
> +++ b/drivers/scsi/arm/scsi.h
> @@ -38,9 +38,7 @@ static inline int next_SCp(struct scsi_pointer *SCp)
> if (ret) {
> SCp->buffer++;
> SCp->buffers_residual--;
> - SCp->ptr = (char *)
> - (page_address(SCp->buffer->page) +
> - SCp->buffer->offset);
> + SCp->ptr = sg_virt(SCp->buffer);
> SCp->this_residual = SCp->buffer->length;
> } else {
> SCp->ptr = NULL;
> @@ -76,9 +74,7 @@ static inline void init_SCp(struct scsi_cmnd *SCpnt)
>
> SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->request_buffer;
> SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1;
> - SCpnt->SCp.ptr = (char *)
> - (page_address(SCpnt->SCp.buffer->page) +
> - SCpnt->SCp.buffer->offset);
> + SCpnt->SCp.ptr = sg_virt(SCpnt->SCp.buffer);
> SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length;
> SCpnt->SCp.phase = SCpnt->request_bufflen;
Russell, will you be merging this yourself or do you want me to include
it in the sg fixup branch?
--
Jens Axboe
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] scatterlist fallout: drivers/scsi/arm/
2007-10-29 8:59 ` Jens Axboe
@ 2007-10-29 9:07 ` Russell King
2007-10-29 9:12 ` Jens Axboe
0 siblings, 1 reply; 9+ messages in thread
From: Russell King @ 2007-10-29 9:07 UTC (permalink / raw)
To: Jens Axboe; +Cc: Al Viro, Linus Torvalds, linux-kernel
On Mon, Oct 29, 2007 at 09:59:36AM +0100, Jens Axboe wrote:
> On Sat, Oct 27 2007, Russell King wrote:
> > On Sat, Oct 27, 2007 at 07:44:04PM +0100, Al Viro wrote:
> > >
> > > Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> > > ---
> > > diff --git a/drivers/scsi/arm/scsi.h b/drivers/scsi/arm/scsi.h
> > > index 21ba571..2d09fef 100644
> > > --- a/drivers/scsi/arm/scsi.h
> > > +++ b/drivers/scsi/arm/scsi.h
> > > @@ -39,7 +39,7 @@ static inline int next_SCp(struct scsi_pointer *SCp)
> > > SCp->buffer++;
> > > SCp->buffers_residual--;
> > > SCp->ptr = (char *)
> > > - (page_address(SCp->buffer->page) +
> > > + (page_address(sg_page(SCp->buffer)) +
> > > SCp->buffer->offset);
> > > SCp->this_residual = SCp->buffer->length;
> > > } else {
> > > @@ -77,7 +77,7 @@ static inline void init_SCp(struct scsi_cmnd *SCpnt)
> > > SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->request_buffer;
> > > SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1;
> > > SCpnt->SCp.ptr = (char *)
> > > - (page_address(SCpnt->SCp.buffer->page) +
> > > + (page_address(sg_page(SCpnt->SCp.buffer)) +
> > > SCpnt->SCp.buffer->offset);
> > > SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length;
> > > SCpnt->SCp.phase = SCpnt->request_bufflen;
> >
> > FYI, here's what I have queued (cut'n'pasted so probably won't apply):
> >
> > diff --git a/drivers/scsi/arm/scsi.h b/drivers/scsi/arm/scsi.h
> > index 21ba571..bb6550e 100644
> > --- a/drivers/scsi/arm/scsi.h
> > +++ b/drivers/scsi/arm/scsi.h
> > @@ -38,9 +38,7 @@ static inline int next_SCp(struct scsi_pointer *SCp)
> > if (ret) {
> > SCp->buffer++;
> > SCp->buffers_residual--;
> > - SCp->ptr = (char *)
> > - (page_address(SCp->buffer->page) +
> > - SCp->buffer->offset);
> > + SCp->ptr = sg_virt(SCp->buffer);
> > SCp->this_residual = SCp->buffer->length;
> > } else {
> > SCp->ptr = NULL;
> > @@ -76,9 +74,7 @@ static inline void init_SCp(struct scsi_cmnd *SCpnt)
> >
> > SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->request_buffer;
> > SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1;
> > - SCpnt->SCp.ptr = (char *)
> > - (page_address(SCpnt->SCp.buffer->page) +
> > - SCpnt->SCp.buffer->offset);
> > + SCpnt->SCp.ptr = sg_virt(SCpnt->SCp.buffer);
> > SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length;
> > SCpnt->SCp.phase = SCpnt->request_bufflen;
>
> Russell, will you be merging this yourself or do you want me to include
> it in the sg fixup branch?
It's already merged into the ARM git tree as of Friday. Waiting for
ack's from various people for other merged patches before sending the
set to Linus.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] scatterlist fallout: drivers/scsi/arm/
2007-10-29 9:07 ` Russell King
@ 2007-10-29 9:12 ` Jens Axboe
2007-10-29 9:21 ` Al Viro
0 siblings, 1 reply; 9+ messages in thread
From: Jens Axboe @ 2007-10-29 9:12 UTC (permalink / raw)
To: Russell King; +Cc: Al Viro, Linus Torvalds, linux-kernel
On Mon, Oct 29 2007, Russell King wrote:
> On Mon, Oct 29, 2007 at 09:59:36AM +0100, Jens Axboe wrote:
> > On Sat, Oct 27 2007, Russell King wrote:
> > > On Sat, Oct 27, 2007 at 07:44:04PM +0100, Al Viro wrote:
> > > >
> > > > Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> > > > ---
> > > > diff --git a/drivers/scsi/arm/scsi.h b/drivers/scsi/arm/scsi.h
> > > > index 21ba571..2d09fef 100644
> > > > --- a/drivers/scsi/arm/scsi.h
> > > > +++ b/drivers/scsi/arm/scsi.h
> > > > @@ -39,7 +39,7 @@ static inline int next_SCp(struct scsi_pointer *SCp)
> > > > SCp->buffer++;
> > > > SCp->buffers_residual--;
> > > > SCp->ptr = (char *)
> > > > - (page_address(SCp->buffer->page) +
> > > > + (page_address(sg_page(SCp->buffer)) +
> > > > SCp->buffer->offset);
> > > > SCp->this_residual = SCp->buffer->length;
> > > > } else {
> > > > @@ -77,7 +77,7 @@ static inline void init_SCp(struct scsi_cmnd *SCpnt)
> > > > SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->request_buffer;
> > > > SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1;
> > > > SCpnt->SCp.ptr = (char *)
> > > > - (page_address(SCpnt->SCp.buffer->page) +
> > > > + (page_address(sg_page(SCpnt->SCp.buffer)) +
> > > > SCpnt->SCp.buffer->offset);
> > > > SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length;
> > > > SCpnt->SCp.phase = SCpnt->request_bufflen;
> > >
> > > FYI, here's what I have queued (cut'n'pasted so probably won't apply):
> > >
> > > diff --git a/drivers/scsi/arm/scsi.h b/drivers/scsi/arm/scsi.h
> > > index 21ba571..bb6550e 100644
> > > --- a/drivers/scsi/arm/scsi.h
> > > +++ b/drivers/scsi/arm/scsi.h
> > > @@ -38,9 +38,7 @@ static inline int next_SCp(struct scsi_pointer *SCp)
> > > if (ret) {
> > > SCp->buffer++;
> > > SCp->buffers_residual--;
> > > - SCp->ptr = (char *)
> > > - (page_address(SCp->buffer->page) +
> > > - SCp->buffer->offset);
> > > + SCp->ptr = sg_virt(SCp->buffer);
> > > SCp->this_residual = SCp->buffer->length;
> > > } else {
> > > SCp->ptr = NULL;
> > > @@ -76,9 +74,7 @@ static inline void init_SCp(struct scsi_cmnd *SCpnt)
> > >
> > > SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->request_buffer;
> > > SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1;
> > > - SCpnt->SCp.ptr = (char *)
> > > - (page_address(SCpnt->SCp.buffer->page) +
> > > - SCpnt->SCp.buffer->offset);
> > > + SCpnt->SCp.ptr = sg_virt(SCpnt->SCp.buffer);
> > > SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length;
> > > SCpnt->SCp.phase = SCpnt->request_bufflen;
> >
> > Russell, will you be merging this yourself or do you want me to include
> > it in the sg fixup branch?
>
> It's already merged into the ARM git tree as of Friday. Waiting for
> ack's from various people for other merged patches before sending the
> set to Linus.
Great, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] scatterlist fallout: drivers/scsi/arm/
2007-10-29 9:12 ` Jens Axboe
@ 2007-10-29 9:21 ` Al Viro
2007-10-29 9:36 ` Jens Axboe
0 siblings, 1 reply; 9+ messages in thread
From: Al Viro @ 2007-10-29 9:21 UTC (permalink / raw)
To: Jens Axboe; +Cc: Russell King, Linus Torvalds, linux-kernel
On Mon, Oct 29, 2007 at 10:12:06AM +0100, Jens Axboe wrote:
> > > Russell, will you be merging this yourself or do you want me to include
> > > it in the sg fixup branch?
> >
> > It's already merged into the ARM git tree as of Friday. Waiting for
> > ack's from various people for other merged patches before sending the
> > set to Linus.
>
> Great, thanks.
Speaking of sg fixups... What should be done about zfcp_address_to_sg()?
You've added the third argument to all calls, but not to definition...
static inline void
zfcp_address_to_sg(void *address, struct scatterlist *list, size_t size)
{
sg_set_buf(list, address, size);
}
seems to be a plausible guess at what you meant to do, but that's a guess
without anything to back it - I really have not looked into the area at all.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] scatterlist fallout: drivers/scsi/arm/
2007-10-29 9:21 ` Al Viro
@ 2007-10-29 9:36 ` Jens Axboe
0 siblings, 0 replies; 9+ messages in thread
From: Jens Axboe @ 2007-10-29 9:36 UTC (permalink / raw)
To: Al Viro; +Cc: Russell King, Linus Torvalds, linux-kernel
On Mon, Oct 29 2007, Al Viro wrote:
> On Mon, Oct 29, 2007 at 10:12:06AM +0100, Jens Axboe wrote:
> > > > Russell, will you be merging this yourself or do you want me to include
> > > > it in the sg fixup branch?
> > >
> > > It's already merged into the ARM git tree as of Friday. Waiting for
> > > ack's from various people for other merged patches before sending the
> > > set to Linus.
> >
> > Great, thanks.
>
> Speaking of sg fixups... What should be done about zfcp_address_to_sg()?
> You've added the third argument to all calls, but not to definition...
>
> static inline void
> zfcp_address_to_sg(void *address, struct scatterlist *list, size_t size)
> {
> sg_set_buf(list, address, size);
> }
> seems to be a plausible guess at what you meant to do, but that's a guess
> without anything to back it - I really have not looked into the area at all.
Should already be fixed up in the 'sg' branch, like this:
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h
index 0754542..e268f79 100644
--- a/drivers/s390/scsi/zfcp_def.h
+++ b/drivers/s390/scsi/zfcp_def.h
@@ -70,11 +70,12 @@ zfcp_sg_to_address(struct scatterlist *list)
* zfcp_address_to_sg - set up struct scatterlist from kernel address
* @address: kernel address
* @list: struct scatterlist
+ * @size: buffer size
*/
static inline void
-zfcp_address_to_sg(void *address, struct scatterlist *list)
+zfcp_address_to_sg(void *address, struct scatterlist *list, unsigned int size)
{
- sg_set_buf(list, address, 0);
+ sg_set_buf(list, address, size);
}
#define REQUEST_LIST_SIZE 128
--
Jens Axboe
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-10-29 9:38 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-27 18:44 [PATCH] scatterlist fallout: drivers/scsi/arm/ Al Viro
2007-10-27 19:21 ` Russell King
2007-10-27 20:17 ` Russell King
2007-10-28 5:20 ` Linus Torvalds
2007-10-29 8:59 ` Jens Axboe
2007-10-29 9:07 ` Russell King
2007-10-29 9:12 ` Jens Axboe
2007-10-29 9:21 ` Al Viro
2007-10-29 9:36 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox