]> git.proxmox.com Git - mirror_ubuntu-kernels.git/blobdiff - drivers/scsi/aic7xxx/aic7xxx_osm.c
[PATCH] completions: lockdep annotate on stack completions
[mirror_ubuntu-kernels.git] / drivers / scsi / aic7xxx / aic7xxx_osm.c
index eadfefdd8d7a975373c4a752ee7d3b2436d91a8b..339b85cb61cdbefb4a5bb9af77da7caf9f03b4ed 100644 (file)
@@ -341,7 +341,7 @@ MODULE_LICENSE("Dual BSD/GPL");
 MODULE_VERSION(AIC7XXX_DRIVER_VERSION);
 module_param(aic7xxx, charp, 0444);
 MODULE_PARM_DESC(aic7xxx,
-"period delimited, options string.\n"
+"period-delimited options string:\n"
 "      verbose                 Enable verbose/diagnostic logging\n"
 "      allow_memio             Allow device registers to be memory mapped\n"
 "      debug                   Bitmask of debug values to enable\n"
@@ -353,7 +353,6 @@ MODULE_PARM_DESC(aic7xxx,
 "                              periodically to prevent tag starvation.\n"
 "                              This may be required by some older disk\n"
 "                              drives or RAID arrays.\n"
-"      reverse_scan            Sort PCI devices highest Bus/Slot to lowest\n"
 "      tag_info:<tag_str>      Set per-target tag depth\n"
 "      global_tag_depth:<int>  Global tag depth for every target\n"
 "                              on every bus\n"
@@ -2336,7 +2335,7 @@ done:
        if (paused)
                ahc_unpause(ahc);
        if (wait) {
-               DECLARE_COMPLETION(done);
+               DECLARE_COMPLETION_ONSTACK(done);
 
                ahc->platform_data->eh_done = &done;
                ahc_unlock(ahc, &flags);
@@ -2537,6 +2536,35 @@ static void ahc_linux_set_iu(struct scsi_target *starget, int iu)
 }
 #endif
 
+static void ahc_linux_get_signalling(struct Scsi_Host *shost)
+{
+       struct ahc_softc *ahc = *(struct ahc_softc **)shost->hostdata;
+       unsigned long flags;
+       u8 mode;
+
+       if (!(ahc->features & AHC_ULTRA2)) {
+               /* non-LVD chipset, may not have SBLKCTL reg */
+               spi_signalling(shost) = 
+                       ahc->features & AHC_HVD ?
+                       SPI_SIGNAL_HVD :
+                       SPI_SIGNAL_SE;
+               return;
+       }
+
+       ahc_lock(ahc, &flags);
+       ahc_pause(ahc);
+       mode = ahc_inb(ahc, SBLKCTL);
+       ahc_unpause(ahc);
+       ahc_unlock(ahc, &flags);
+
+       if (mode & ENAB40)
+               spi_signalling(shost) = SPI_SIGNAL_LVD;
+       else if (mode & ENAB20)
+               spi_signalling(shost) = SPI_SIGNAL_SE;
+       else
+               spi_signalling(shost) = SPI_SIGNAL_UNKNOWN;
+}
+
 static struct spi_function_template ahc_linux_transport_functions = {
        .set_offset     = ahc_linux_set_offset,
        .show_offset    = 1,
@@ -2552,6 +2580,7 @@ static struct spi_function_template ahc_linux_transport_functions = {
        .set_qas        = ahc_linux_set_qas,
        .show_qas       = 1,
 #endif
+       .get_signalling = ahc_linux_get_signalling,
 };