]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] More buffer->request_buffer changes
authorChristoph Hellwig <hch@lst.de>
Fri, 14 Jul 2006 08:29:34 +0000 (10:29 +0200)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Fri, 14 Jul 2006 14:41:13 +0000 (09:41 -0500)
Seem like quite a few splipped through the cracks.  Here's a patch to
update all references I could find:

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
14 files changed:
drivers/fc4/fc.c
drivers/scsi/53c7xx.c
drivers/scsi/NCR53C9x.c
drivers/scsi/atari_NCR5380.c
drivers/scsi/esp.c
drivers/scsi/jazz_esp.c
drivers/scsi/mac53c94.c
drivers/scsi/mesh.c
drivers/scsi/pluto.c
drivers/scsi/qlogicpti.c
drivers/scsi/seagate.c
drivers/scsi/sun3_NCR5380.c
drivers/scsi/sun3x_esp.c
drivers/scsi/wd33c93.c

index 66d03f242d3ce7f1c741109a6b235494a90efca7..1a159e8843ca47dd27778937d350df400448c48f 100644 (file)
@@ -429,7 +429,7 @@ static inline void fcp_scsi_receive(fc_channel *fc, int token, int status, fc_hd
                
                if (fcmd->data) {
                        if (SCpnt->use_sg)
-                               dma_unmap_sg(fc->dev, (struct scatterlist *)SCpnt->buffer,
+                               dma_unmap_sg(fc->dev, (struct scatterlist *)SCpnt->request_buffer,
                                                SCpnt->use_sg,
                                                SCpnt->sc_data_direction);
                        else
@@ -810,7 +810,7 @@ static int fcp_scsi_queue_it(fc_channel *fc, Scsi_Cmnd *SCpnt, fcp_cmnd *fcmd, i
                                                             SCpnt->request_bufflen,
                                                             SCpnt->sc_data_direction);
                        } else {
-                               struct scatterlist *sg = (struct scatterlist *)SCpnt->buffer;
+                               struct scatterlist *sg = (struct scatterlist *)SCpnt->request_buffer;
                                int nents;
 
                                FCD(("XXX: Use_sg %d %d\n", SCpnt->use_sg, sg->length))
index c690c2b89e41ddf59abb611a3a7c2f43448bbed8..acf292736b4e18403a59daef06da6171c1dd4282 100644 (file)
@@ -3451,12 +3451,12 @@ create_cmd (Scsi_Cmnd *cmd) {
     for (i = 0; cmd->use_sg ? (i < cmd->use_sg) : !i; cmd_datain += 4, 
        cmd_dataout += 4, ++i) {
        u32 vbuf = cmd->use_sg
-           ? (u32)page_address(((struct scatterlist *)cmd->buffer)[i].page)+
-             ((struct scatterlist *)cmd->buffer)[i].offset
+           ? (u32)page_address(((struct scatterlist *)cmd->request_buffer)[i].page)+
+             ((struct scatterlist *)cmd->request_buffer)[i].offset
            : (u32)(cmd->request_buffer);
        u32 bbuf = virt_to_bus((void *)vbuf);
        u32 count = cmd->use_sg ?
-           ((struct scatterlist *)cmd->buffer)[i].length :
+           ((struct scatterlist *)cmd->request_buffer)[i].length :
            cmd->request_bufflen;
 
        /*
@@ -5417,7 +5417,7 @@ insn_to_offset (Scsi_Cmnd *cmd, u32 *insn) {
 
            if ((buffers = cmd->use_sg)) {
                for (offset = 0, 
-                       segment = (struct scatterlist *) cmd->buffer;
+                       segment = (struct scatterlist *) cmd->request_buffer;
                     buffers && !((found = ((ptr >= (char *)page_address(segment->page)+segment->offset) && 
                            (ptr < ((char *)page_address(segment->page)+segment->offset+segment->length)))));
                     --buffers, offset += segment->length, ++segment)
index 8a4659e94105c58c81327db2cbc876bf46c93611..085db4826e0ed16f9fb3f371825fb59c604e214c 100644 (file)
@@ -911,7 +911,7 @@ static void esp_get_dmabufs(struct NCR_ESP *esp, Scsi_Cmnd *sp)
                        sp->SCp.ptr =
                                (char *) virt_to_phys(sp->request_buffer);
        } else {
-               sp->SCp.buffer = (struct scatterlist *) sp->buffer;
+               sp->SCp.buffer = (struct scatterlist *) sp->request_buffer;
                sp->SCp.buffers_residual = sp->use_sg - 1;
                sp->SCp.this_residual = sp->SCp.buffer->length;
                if (esp->dma_mmu_get_scsi_sgl)
index 007a14e5c3fddac952adcdd467c72bd744329007..e397129c90d188e689ac260a34fe90f49c01daea 100644 (file)
@@ -507,7 +507,7 @@ static __inline__ void initialize_SCp(Scsi_Cmnd *cmd)
      */
 
     if (cmd->use_sg) {
-       cmd->SCp.buffer = (struct scatterlist *) cmd->buffer;
+       cmd->SCp.buffer = (struct scatterlist *) cmd->request_buffer;
        cmd->SCp.buffers_residual = cmd->use_sg - 1;
        cmd->SCp.ptr = (char *)page_address(cmd->SCp.buffer->page)+
                       cmd->SCp.buffer->offset;
index 10573c24a50bc02a514770d6b09272efdd73e30a..eaf64c7e54e7014821b5145536edeb28090dfe03 100644 (file)
@@ -1397,7 +1397,7 @@ static void esp_get_dmabufs(struct esp *esp, struct scsi_cmnd *sp)
                        sp->SCp.ptr = NULL;
                }
        } else {
-               sp->SCp.buffer = (struct scatterlist *) sp->buffer;
+               sp->SCp.buffer = (struct scatterlist *) sp->request_buffer;
                sp->SCp.buffers_residual = sbus_map_sg(esp->sdev,
                                                       sp->SCp.buffer,
                                                       sp->use_sg,
@@ -1410,7 +1410,7 @@ static void esp_get_dmabufs(struct esp *esp, struct scsi_cmnd *sp)
 static void esp_release_dmabufs(struct esp *esp, struct scsi_cmnd *sp)
 {
        if (sp->use_sg) {
-               sbus_unmap_sg(esp->sdev, sp->buffer, sp->use_sg,
+               sbus_unmap_sg(esp->sdev, sp->request_buffer, sp->use_sg,
                              sp->sc_data_direction);
        } else if (sp->request_bufflen) {
                sbus_unmap_single(esp->sdev,
index 3fd8a96f2af397989c80788e65423ad02ed50de3..bfac4441d89fdcad18132a6e9e8720774697d364 100644 (file)
@@ -257,7 +257,7 @@ static void dma_mmu_release_scsi_one (struct NCR_ESP *esp, struct scsi_cmnd *sp)
 static void dma_mmu_release_scsi_sgl (struct NCR_ESP *esp, struct scsi_cmnd *sp)
 {
     int sz = sp->use_sg - 1;
-    struct scatterlist *sg = (struct scatterlist *)sp->buffer;
+    struct scatterlist *sg = (struct scatterlist *)sp->request_buffer;
                        
     while(sz >= 0) {
        vdma_free(sg[sz].dma_address);
index 93edaa8696cf35e0b54a72dc3cfd266931e2c18b..89ef34df5a1db443eb15b28727b5f9b91df413f1 100644 (file)
@@ -378,7 +378,7 @@ static void set_dma_cmds(struct fsc_state *state, struct scsi_cmnd *cmd)
                int nseg;
 
                total = 0;
-               scl = (struct scatterlist *) cmd->buffer;
+               scl = (struct scatterlist *) cmd->request_buffer;
                nseg = pci_map_sg(state->pdev, scl, cmd->use_sg,
                                cmd->sc_data_direction);
                for (i = 0; i < nseg; ++i) {
index c88717727be8ed58e9cbf23a2b1c376a2819ac09..5572981a9f925648f5fd44c841499d93ab63c70e 100644 (file)
@@ -1268,7 +1268,7 @@ static void set_dma_cmds(struct mesh_state *ms, struct scsi_cmnd *cmd)
                if (cmd->use_sg > 0) {
                        int nseg;
                        total = 0;
-                       scl = (struct scatterlist *) cmd->buffer;
+                       scl = (struct scatterlist *) cmd->request_buffer;
                        off = ms->data_ptr;
                        nseg = pci_map_sg(ms->pdev, scl, cmd->use_sg,
                                          cmd->sc_data_direction);
index 7abf64d1bfc9960c051b827b6d3c0377e51041be..0bd9c60e6455b879b831c4b7a64854422213ee8c 100644 (file)
@@ -169,8 +169,6 @@ int __init pluto_detect(struct scsi_host_template *tpnt)
                SCpnt->request->rq_status = RQ_SCSI_BUSY;
                
                SCpnt->done = pluto_detect_done;
-               SCpnt->bufflen = 256;
-               SCpnt->buffer = fcs[i].inquiry;
                SCpnt->request_bufflen = 256;
                SCpnt->request_buffer = fcs[i].inquiry;
                PLD(("set up %d %08lx\n", i, (long)SCpnt))
index 69e0551a81d26abf80e5a4a53dda1ed9f8c6459e..5b2f0741a55b841f06ad6dc93e9eba81dd809e27 100644 (file)
@@ -874,7 +874,7 @@ static inline int load_cmd(struct scsi_cmnd *Cmnd, struct Command_Entry *cmd,
        if (Cmnd->use_sg) {
                int sg_count;
 
-               sg = (struct scatterlist *) Cmnd->buffer;
+               sg = (struct scatterlist *) Cmnd->request_buffer;
                sg_count = sbus_map_sg(qpti->sdev, sg, Cmnd->use_sg, Cmnd->sc_data_direction);
 
                ds = cmd->dataseg;
@@ -1278,7 +1278,7 @@ static struct scsi_cmnd *qlogicpti_intr_handler(struct qlogicpti *qpti)
 
                if (Cmnd->use_sg) {
                        sbus_unmap_sg(qpti->sdev,
-                                     (struct scatterlist *)Cmnd->buffer,
+                                     (struct scatterlist *)Cmnd->request_buffer,
                                      Cmnd->use_sg,
                                      Cmnd->sc_data_direction);
                } else {
index 3f312a84c6a7d585dc7d9f08859b35bc6daff9a8..2679ea8bff1a98365225ff22662c7a3990239321 100644 (file)
@@ -1002,7 +1002,7 @@ connect_loop:
                        }
 #endif
 
-                       buffer = (struct scatterlist *) SCint->buffer;
+                       buffer = (struct scatterlist *) SCint->request_buffer;
                        len = buffer->length;
                        data = page_address(buffer->page) + buffer->offset;
                } else {
index 2ebe0d66389969b3cc6504ee7deed2515e4e1fc0..2f8073b73bf30d1d5924498ec899c8984c0549ff 100644 (file)
@@ -517,7 +517,7 @@ static __inline__ void initialize_SCp(Scsi_Cmnd *cmd)
      */
 
     if (cmd->use_sg) {
-       cmd->SCp.buffer = (struct scatterlist *) cmd->buffer;
+       cmd->SCp.buffer = (struct scatterlist *) cmd->request_buffer;
        cmd->SCp.buffers_residual = cmd->use_sg - 1;
        cmd->SCp.ptr = (char *) SGADDR(cmd->SCp.buffer);
        cmd->SCp.this_residual = cmd->SCp.buffer->length;
index 1f328cae5c05c2faf303204f7acd16329e4ba23b..6b60536ac92b4bb11278eb2f8b9ae37519f649e4 100644 (file)
@@ -347,7 +347,7 @@ static void dma_mmu_release_scsi_one (struct NCR_ESP *esp, Scsi_Cmnd *sp)
 static void dma_mmu_release_scsi_sgl (struct NCR_ESP *esp, Scsi_Cmnd *sp)
 {
     int sz = sp->use_sg - 1;
-    struct scatterlist *sg = (struct scatterlist *)sp->buffer;
+    struct scatterlist *sg = (struct scatterlist *)sp->request_buffer;
                         
     while(sz >= 0) {
         dvma_unmap((char *)sg[sz].dma_address);
index 680f38ab60d8800c4458738b337a75156bba5d17..2083454db511d7daf260eb8ceace3f2580cc47bc 100644 (file)
@@ -373,7 +373,7 @@ wd33c93_queuecommand(struct scsi_cmnd *cmd,
  */
 
        if (cmd->use_sg) {
-               cmd->SCp.buffer = (struct scatterlist *) cmd->buffer;
+               cmd->SCp.buffer = (struct scatterlist *) cmd->request_buffer;
                cmd->SCp.buffers_residual = cmd->use_sg - 1;
                cmd->SCp.ptr = page_address(cmd->SCp.buffer->page) +
                    cmd->SCp.buffer->offset;