Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
"Three minor fixes: two obvious ones in drivers and a fix to the SG_IO
path to correctly return status on error"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: aic7xxx: fix EISA support
Revert "scsi: fcoe: clear FC_RP_STARTED flags when receiving a LOGO"
scsi: core: set result when the command cannot be dispatched

Changed files
+12 -8
drivers
+1
drivers/scsi/aic7xxx/aic7770_osm.c
··· 91 91 ahc = ahc_alloc(&aic7xxx_driver_template, name); 92 92 if (ahc == NULL) 93 93 return (ENOMEM); 94 + ahc->dev = dev; 94 95 error = aic7770_config(ahc, aic7770_ident_table + edev->id.driver_data, 95 96 eisaBase); 96 97 if (error != 0) {
+1
drivers/scsi/aic7xxx/aic7xxx.h
··· 943 943 * Platform specific device information. 944 944 */ 945 945 ahc_dev_softc_t dev_softc; 946 + struct device *dev; 946 947 947 948 /* 948 949 * Bus specific device information.
+4 -6
drivers/scsi/aic7xxx/aic7xxx_osm.c
··· 860 860 ahc_dmamem_alloc(struct ahc_softc *ahc, bus_dma_tag_t dmat, void** vaddr, 861 861 int flags, bus_dmamap_t *mapp) 862 862 { 863 - *vaddr = pci_alloc_consistent(ahc->dev_softc, 864 - dmat->maxsize, mapp); 863 + /* XXX: check if we really need the GFP_ATOMIC and unwind this mess! */ 864 + *vaddr = dma_alloc_coherent(ahc->dev, dmat->maxsize, mapp, GFP_ATOMIC); 865 865 if (*vaddr == NULL) 866 866 return ENOMEM; 867 867 return 0; ··· 871 871 ahc_dmamem_free(struct ahc_softc *ahc, bus_dma_tag_t dmat, 872 872 void* vaddr, bus_dmamap_t map) 873 873 { 874 - pci_free_consistent(ahc->dev_softc, dmat->maxsize, 875 - vaddr, map); 874 + dma_free_coherent(ahc->dev, dmat->maxsize, vaddr, map); 876 875 } 877 876 878 877 int ··· 1122 1123 1123 1124 host->transportt = ahc_linux_transport_template; 1124 1125 1125 - retval = scsi_add_host(host, 1126 - (ahc->dev_softc ? &ahc->dev_softc->dev : NULL)); 1126 + retval = scsi_add_host(host, ahc->dev); 1127 1127 if (retval) { 1128 1128 printk(KERN_WARNING "aic7xxx: scsi_add_host failed\n"); 1129 1129 scsi_host_put(host);
+1
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
··· 250 250 } 251 251 } 252 252 ahc->dev_softc = pci; 253 + ahc->dev = &pci->dev; 253 254 error = ahc_pci_config(ahc, entry); 254 255 if (error != 0) { 255 256 ahc_free(ahc);
-1
drivers/scsi/libfc/fc_rport.c
··· 2162 2162 FC_RPORT_DBG(rdata, "Received LOGO request while in state %s\n", 2163 2163 fc_rport_state(rdata)); 2164 2164 2165 - rdata->flags &= ~FC_RP_STARTED; 2166 2165 fc_rport_enter_delete(rdata, RPORT_EV_STOP); 2167 2166 mutex_unlock(&rdata->rp_mutex); 2168 2167 kref_put(&rdata->kref, fc_rport_destroy);
+5 -1
drivers/scsi/scsi_lib.c
··· 1706 1706 ret = BLK_STS_DEV_RESOURCE; 1707 1707 break; 1708 1708 default: 1709 + if (unlikely(!scsi_device_online(sdev))) 1710 + scsi_req(req)->result = DID_NO_CONNECT << 16; 1711 + else 1712 + scsi_req(req)->result = DID_ERROR << 16; 1709 1713 /* 1710 - * Make sure to release all allocated ressources when 1714 + * Make sure to release all allocated resources when 1711 1715 * we hit an error, as we will never see this command 1712 1716 * again. 1713 1717 */