]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/qla1280.c
[SG] Get rid of __sg_mark_end()
[linux-2.6-omap-h63xx.git] / drivers / scsi / qla1280.c
index 1f17dec7d6fcc08f2022f940a44c294acd8ee99b..3aeb68bcb7accce6ae3556a54fea2d66ab692ae5 100644 (file)
@@ -2977,8 +2977,8 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
                                                cpu_to_le32(pci_dma_hi32(dma_handle)),
                                                cpu_to_le32(pci_dma_lo32(dma_handle)),
                                                cpu_to_le32(sg_dma_len(s)));
-                                       remseg--;
                                }
+                               remseg -= cnt;
                                dprintk(5, "qla1280_64bit_start_scsi: "
                                        "continuation packet data - b %i, t "
                                        "%i, l %i \n", SCSI_BUS_32(cmd),
@@ -3250,6 +3250,8 @@ qla1280_32bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
 
                                /* Load continuation entry data segments. */
                                for_each_sg(sg, s, remseg, cnt) {
+                                       if (cnt == 7)
+                                               break;
                                        *dword_ptr++ =
                                                cpu_to_le32(pci_dma_lo32(sg_dma_address(s)));
                                        *dword_ptr++ =
@@ -3260,6 +3262,7 @@ qla1280_32bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
                                                cpu_to_le32(pci_dma_lo32(sg_dma_address(s))),
                                                cpu_to_le32(sg_dma_len(s)));
                                }
+                               remseg -= cnt;
                                dprintk(5, "qla1280_32bit_start_scsi: "
                                        "continuation packet data - "
                                        "scsi(%i:%i:%i)\n", SCSI_BUS_32(cmd),
@@ -4256,6 +4259,7 @@ static struct scsi_host_template qla1280_driver_template = {
        .sg_tablesize           = SG_ALL,
        .cmd_per_lun            = 1,
        .use_clustering         = ENABLE_CLUSTERING,
+       .use_sg_chaining        = ENABLE_SG_CHAINING,
 };
 
 
@@ -4306,7 +4310,7 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
                        printk(KERN_WARNING "scsi(%li): Unable to set a "
                               "suitable DMA mask - aborting\n", ha->host_no);
                        error = -ENODEV;
-                       goto error_free_irq;
+                       goto error_put_host;
                }
        } else
                dprintk(2, "scsi(%li): 64 Bit PCI Addressing Enabled\n",
@@ -4316,7 +4320,7 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
                printk(KERN_WARNING "scsi(%li): Unable to set a "
                       "suitable DMA mask - aborting\n", ha->host_no);
                error = -ENODEV;
-               goto error_free_irq;
+               goto error_put_host;
        }
 #endif