scatterlist fallout: drivers/scsi/arm/
Subsystems (4)
PATCH 1/1 scatterlist fallout: drivers/scsi/arm/
---
drivers/scsi/arm/scsi.h +2 -2
@@ -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;
Already have this one queued for Linus in my tree.
Quoted 25 lines · Al Viro
Signed-off-by Al Viro <[email protected]>---
drivers/scsi/arm/scsi.h +2
-2@@ -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;
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of:
Quoted 17 lines · Al Viro
Signed-off-by Al Viro <[email protected]>---
drivers/scsi/arm/scsi.h +1
-1@@ -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 {
drivers/scsi/arm/scsi.h static inline void init_SCp(struct scsi_cmnd *SCpnt) · line 83
Quoted 8 lines
drivers/scsi/arm/scsi.h +1
-1@@ -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):
drivers/scsi/arm/scsi.h +2 -6
@@ -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;
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of:
Quoted 2 lines · Russell King
FYI, here's what I have queued (cut'n'pasted so probably won't apply):
Yes, much nicer.
Linus
Quoted 45 lines · Russell King
Quoted 17 lines · Al Viro
Signed-off-by Al Viro <[email protected]>---
drivers/scsi/arm/scsi.h +1
-1@@ -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 {drivers/scsi/arm/scsi.h static inline void init_SCp(struct scsi_cmnd *SCpnt) · line 83
Quoted 8 lines
drivers/scsi/arm/scsi.h +1
-1@@ -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):
drivers/scsi/arm/scsi.h +1
-3@@ -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 ;
drivers/scsi/arm/scsi.h static inline void init_SCp(struct scsi_cmnd *SCpnt) · line 79
Quoted 9 lines
drivers/scsi/arm/scsi.h +1
-3@@ -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?
Signature · 1 line
Jens Axboe
Quoted 47 lines · Jens Axboe
Quoted 46 lines · Russell King
Quoted 17 lines · Al Viro
Signed-off-by Al Viro <[email protected]>---
drivers/scsi/arm/scsi.h +1
-1@@ -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 {drivers/scsi/arm/scsi.h static inline void init_SCp(struct scsi_cmnd *SCpnt) · line 83
Quoted 8 lines
drivers/scsi/arm/scsi.h +1
-1@@ -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):
drivers/scsi/arm/scsi.h +1
-3@@ -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)
Quoted 11 lines
drivers/scsi/arm/scsi.h static inline void init_SCp(struct scsi_cmnd *SCpnt) · line 79
Quoted 8 lines
drivers/scsi/arm/scsi.h +1
-3SCpnt->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.
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of:
Quoted 60 lines · Russell King
Quoted 47 lines · Jens Axboe
Quoted 46 lines · Russell King
Quoted 17 lines · Al Viro
Signed-off-by Al Viro <[email protected]>---
drivers/scsi/arm/scsi.h +1
-1@@ -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 {drivers/scsi/arm/scsi.h static inline void init_SCp(struct scsi_cmnd *SCpnt) · line 83
Quoted 8 lines
drivers/scsi/arm/scsi.h +1
-1@@ -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):
drivers/scsi/arm/scsi.h +1
-3@@ -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)Quoted 11 lines
drivers/scsi/arm/scsi.h static inline void init_SCp(struct scsi_cmnd *SCpnt) · line 79
Quoted 8 lines
drivers/scsi/arm/scsi.h +1
-3SCpnt->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?
Quoted 3 lines
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.
Signature · 1 line
Jens Axboe
Quoted 8 lines · Jens Axboe
Quoted 6 lines
Quoted 2 lines
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 voidzfcp_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.
Quoted 13 lines · Al Viro
Quoted 8 lines · Jens Axboe
Quoted 6 lines
Quoted 2 lines
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...
Quoted 7 lines
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:
drivers/s390/scsi/zfcp_def.h +3 -2
@@ -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
Signature · 1 line
Jens Axboe