Merge HEAD from ../scsi-misc-2.6-tmp
[sfrench/cifs-2.6.git] / drivers / scsi / aic7xxx / aic7xxx_osm.c
index d79a2ae89979c9899854900f3d7e3ceb4d29bc5f..54173887e1605af55efa56fe7da334e85291bb89 100644 (file)
@@ -635,6 +635,8 @@ ahc_linux_slave_alloc(struct scsi_device *sdev)
        
        targ->sdev[sdev->lun] = sdev;
 
+       spi_period(starget) = 0;
+
        return 0;
 }
 
@@ -1264,14 +1266,12 @@ ahc_platform_set_tags(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
        }
        switch ((dev->flags & (AHC_DEV_Q_BASIC|AHC_DEV_Q_TAGGED))) {
        case AHC_DEV_Q_BASIC:
-               scsi_adjust_queue_depth(sdev,
-                                       MSG_SIMPLE_TASK,
-                                       dev->openings + dev->active);
+               scsi_set_tag_type(sdev, MSG_SIMPLE_TAG);
+               scsi_activate_tcq(sdev, dev->openings + dev->active);
                break;
        case AHC_DEV_Q_TAGGED:
-               scsi_adjust_queue_depth(sdev,
-                                       MSG_ORDERED_TASK,
-                                       dev->openings + dev->active);
+               scsi_set_tag_type(sdev, MSG_ORDERED_TAG);
+               scsi_activate_tcq(sdev, dev->openings + dev->active);
                break;
        default:
                /*
@@ -1280,9 +1280,7 @@ ahc_platform_set_tags(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
                 * serially on the controller/device.  This should
                 * remove some latency.
                 */
-               scsi_adjust_queue_depth(sdev,
-                                       /*NON-TAGGED*/0,
-                                       /*queue depth*/2);
+               scsi_deactivate_tcq(sdev, 2);
                break;
        }
 }
@@ -1616,9 +1614,9 @@ ahc_send_async(struct ahc_softc *ahc, char channel,
                if (channel == 'B')
                        target_offset += 8;
                starget = ahc->platform_data->starget[target_offset];
-               targ = scsi_transport_target_data(starget);
-               if (targ == NULL)
+               if (starget == NULL)
                        break;
+               targ = scsi_transport_target_data(starget);
 
                target_ppr_options =
                        (spi_dt(starget) ? MSG_EXT_PPR_DT_REQ : 0)
@@ -2333,8 +2331,6 @@ ahc_platform_dump_card_state(struct ahc_softc *ahc)
 {
 }
 
-static void ahc_linux_exit(void);
-
 static void ahc_linux_set_width(struct scsi_target *starget, int width)
 {
        struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);