These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / scsi / aic94xx / aic94xx_init.c
index 02a2512..662b232 100644 (file)
@@ -65,7 +65,6 @@ static struct scsi_host_template aic94xx_sht = {
        .change_queue_depth     = sas_change_queue_depth,
        .bios_param             = sas_bios_param,
        .can_queue              = 1,
-       .cmd_per_lun            = 1,
        .this_id                = -1,
        .sg_tablesize           = SG_ALL,
        .max_sectors            = SCSI_DEFAULT_MAX_SECTORS,
@@ -74,7 +73,6 @@ static struct scsi_host_template aic94xx_sht = {
        .eh_bus_reset_handler   = sas_eh_bus_reset_handler,
        .target_destroy         = sas_target_destroy,
        .ioctl                  = sas_ioctl,
-       .use_blk_tags           = 1,
        .track_queue_depth      = 1,
 };
 
@@ -101,15 +99,11 @@ static int asd_map_memio(struct asd_ha_struct *asd_ha)
                                   pci_name(asd_ha->pcidev));
                        goto Err;
                }
-               if (io_handle->flags & IORESOURCE_CACHEABLE)
-                       io_handle->addr = ioremap(io_handle->start,
-                                                 io_handle->len);
-               else
-                       io_handle->addr = ioremap_nocache(io_handle->start,
-                                                         io_handle->len);
+               io_handle->addr = ioremap(io_handle->start, io_handle->len);
                if (!io_handle->addr) {
                        asd_printk("couldn't map MBAR%d of %s\n", i==0?0:1,
                                   pci_name(asd_ha->pcidev));
+                       err = -ENOMEM;
                        goto Err_unreq;
                }
        }
@@ -709,10 +703,10 @@ static int asd_unregister_sas_ha(struct asd_ha_struct *asd_ha)
 {
        int err;
 
+       scsi_remove_host(asd_ha->sas_ha.core.shost);
        err = sas_unregister_ha(&asd_ha->sas_ha);
 
        sas_remove_host(asd_ha->sas_ha.core.shost);
-       scsi_remove_host(asd_ha->sas_ha.core.shost);
        scsi_host_put(asd_ha->sas_ha.core.shost);
 
        kfree(asd_ha->sas_ha.sas_phy);