]> err.no Git - linux-2.6/blobdiff - drivers/fc4/fc.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
[linux-2.6] / drivers / fc4 / fc.c
index e375995a2e9b70bb357402674033a622c93c3cfc..22d17474755f73ac86660c499e486750132f3c60 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
@@ -554,8 +554,8 @@ int fcp_initialize(fc_channel *fcchain, int count)
        l->logi = kzalloc (count * 3 * sizeof(logi), GFP_KERNEL);
        l->fcmds = kzalloc (count * sizeof(fcp_cmnd), GFP_KERNEL);
        if (!l->logi || !l->fcmds) {
-               if (l->logi) kfree (l->logi);
-               if (l->fcmds) kfree (l->fcmds);
+               kfree (l->logi);
+               kfree (l->fcmds);
                kfree (l);
                printk ("FC: Cannot allocate DMA memory for initialization\n");
                return -ENOMEM;
@@ -674,7 +674,6 @@ int fcp_forceoffline(fc_channel *fcchain, int count)
        atomic_set (&l.todo, count);
        l.fcmds = kzalloc (count * sizeof(fcp_cmnd), GFP_KERNEL);
        if (!l.fcmds) {
-               kfree (l.fcmds);
                printk ("FC: Cannot allocate memory for forcing offline\n");
                return -ENOMEM;
        }
@@ -811,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))
@@ -975,7 +974,6 @@ int fcp_scsi_dev_reset(Scsi_Cmnd *SCpnt)
         */
 
        fc->rst_pkt->device->host->eh_action = &sem;
-       fc->rst_pkt->request->rq_status = RQ_SCSI_BUSY;
 
        fc->rst_pkt->done = fcp_scsi_reset_done;
 
@@ -1054,7 +1052,7 @@ static int fc_do_els(fc_channel *fc, unsigned int alpa, void *data, int len)
        int i;
 
        fcmd = &_fcmd;
-       memset(fcmd, 0, sizeof(fcmd));
+       memset(fcmd, 0, sizeof(fcp_cmnd));
        FCD(("PLOGI SID %d DID %d\n", fc->sid, alpa))
        fch = &fcmd->fch;
        FILL_FCHDR_RCTL_DID(fch, R_CTL_ELS_REQ, alpa);