Merge acpi-2.6.12 to-akpm
[powerpc.git] / drivers / scsi / qlogicfc.c
index 24c1174..a4b3b3f 100644 (file)
@@ -746,7 +746,6 @@ static int isp2x00_detect(Scsi_Host_Template * tmpt)
                                printk("qlogicfc%d : could not register host.\n", hosts);
                                continue;
                        }
-                       scsi_set_device(host, &pdev->dev);
                        host->max_id = QLOGICFC_MAX_ID + 1;
                        host->max_lun = QLOGICFC_MAX_LUN;
                        hostdata = (struct isp2x00_hostdata *) host->hostdata;
@@ -1261,7 +1260,7 @@ static int isp2x00_queuecommand(Scsi_Cmnd * Cmnd, void (*done) (Scsi_Cmnd *))
 
        if (Cmnd->use_sg) {
                sg = (struct scatterlist *) Cmnd->request_buffer;
-               sg_count = pci_map_sg(hostdata->pci_dev, sg, Cmnd->use_sg, scsi_to_pci_dma_dir(Cmnd->sc_data_direction));
+               sg_count = pci_map_sg(hostdata->pci_dev, sg, Cmnd->use_sg, Cmnd->sc_data_direction);
                cmd->segment_cnt = cpu_to_le16(sg_count);
                ds = cmd->dataseg;
                /* fill in first two sg entries: */
@@ -1307,7 +1306,7 @@ static int isp2x00_queuecommand(Scsi_Cmnd * Cmnd, void (*done) (Scsi_Cmnd *))
                dma_addr_t busaddr = pci_map_page(hostdata->pci_dev,
                                                  page, offset,
                                                  Cmnd->request_bufflen,
-                                                 scsi_to_pci_dma_dir(Cmnd->sc_data_direction));
+                                                 Cmnd->sc_data_direction);
                Cmnd->SCp.dma_handle = busaddr;
 
                cmd->dataseg[0].d_base = cpu_to_le32(pci64_dma_lo32(busaddr));
@@ -1320,7 +1319,7 @@ static int isp2x00_queuecommand(Scsi_Cmnd * Cmnd, void (*done) (Scsi_Cmnd *))
                cmd->segment_cnt = cpu_to_le16(1); /* Shouldn't this be 0? */
        }
 
-       if (Cmnd->sc_data_direction == SCSI_DATA_WRITE)
+       if (Cmnd->sc_data_direction == DMA_TO_DEVICE)
                cmd->control_flags = cpu_to_le16(CFLAG_WRITE);
        else 
                cmd->control_flags = cpu_to_le16(CFLAG_READ);
@@ -1405,13 +1404,13 @@ static void redo_port_db(unsigned long arg)
                                                 pci_unmap_sg(hostdata->pci_dev,
                                                              (struct scatterlist *)Cmnd->buffer,
                                                              Cmnd->use_sg,
-                                                             scsi_to_pci_dma_dir(Cmnd->sc_data_direction));
+                                                             Cmnd->sc_data_direction);
                                         else if (Cmnd->request_bufflen &&
                                                  Cmnd->sc_data_direction != PCI_DMA_NONE) {
                                                 pci_unmap_page(hostdata->pci_dev,
                                                                Cmnd->SCp.dma_handle,
                                                                Cmnd->request_bufflen,
-                                                               scsi_to_pci_dma_dir(Cmnd->sc_data_direction));
+                                                               Cmnd->sc_data_direction);
                                         }
 
                                         hostdata->handle_ptrs[i]->result = DID_SOFT_ERROR << 16;
@@ -1515,13 +1514,13 @@ void isp2x00_intr_handler(int irq, void *dev_id, struct pt_regs *regs)
                                        pci_unmap_sg(hostdata->pci_dev,
                                                     (struct scatterlist *)Cmnd->buffer,
                                                     Cmnd->use_sg,
-                                                    scsi_to_pci_dma_dir(Cmnd->sc_data_direction));
+                                                    Cmnd->sc_data_direction);
                                else if (Cmnd->request_bufflen &&
                                         Cmnd->sc_data_direction != PCI_DMA_NONE)
                                        pci_unmap_page(hostdata->pci_dev,
                                                       Cmnd->SCp.dma_handle,
                                                       Cmnd->request_bufflen,
-                                                      scsi_to_pci_dma_dir(Cmnd->sc_data_direction));
+                                                      Cmnd->sc_data_direction);
                                Cmnd->result = 0x0;
                                (*Cmnd->scsi_done) (Cmnd);
                        } else
@@ -1569,12 +1568,12 @@ void isp2x00_intr_handler(int irq, void *dev_id, struct pt_regs *regs)
                                if (Cmnd->use_sg)
                                        pci_unmap_sg(hostdata->pci_dev,
                                                     (struct scatterlist *)Cmnd->buffer, Cmnd->use_sg,
-                                                    scsi_to_pci_dma_dir(Cmnd->sc_data_direction));
+                                                    Cmnd->sc_data_direction);
                                else if (Cmnd->request_bufflen && Cmnd->sc_data_direction != PCI_DMA_NONE)
                                        pci_unmap_page(hostdata->pci_dev,
                                                       Cmnd->SCp.dma_handle,
                                                       Cmnd->request_bufflen,
-                                                      scsi_to_pci_dma_dir(Cmnd->sc_data_direction));
+                                                      Cmnd->sc_data_direction);
 
                                /* 
                                 * if any of the following are true we do not