aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/aic7xxx/aic7770_osm.c1
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx.h1
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_osm.c10
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_osm_pci.c1
-rw-r--r--drivers/scsi/libfc/fc_rport.c1
-rw-r--r--drivers/scsi/scsi_lib.c6
6 files changed, 12 insertions, 8 deletions
diff --git a/drivers/scsi/aic7xxx/aic7770_osm.c b/drivers/scsi/aic7xxx/aic7770_osm.c
index 3d401d02c019..bdd177e3d762 100644
--- a/drivers/scsi/aic7xxx/aic7770_osm.c
+++ b/drivers/scsi/aic7xxx/aic7770_osm.c
@@ -91,6 +91,7 @@ aic7770_probe(struct device *dev)
91 ahc = ahc_alloc(&aic7xxx_driver_template, name); 91 ahc = ahc_alloc(&aic7xxx_driver_template, name);
92 if (ahc == NULL) 92 if (ahc == NULL)
93 return (ENOMEM); 93 return (ENOMEM);
94 ahc->dev = dev;
94 error = aic7770_config(ahc, aic7770_ident_table + edev->id.driver_data, 95 error = aic7770_config(ahc, aic7770_ident_table + edev->id.driver_data,
95 eisaBase); 96 eisaBase);
96 if (error != 0) { 97 if (error != 0) {
diff --git a/drivers/scsi/aic7xxx/aic7xxx.h b/drivers/scsi/aic7xxx/aic7xxx.h
index 5614921b4041..88b90f9806c9 100644
--- a/drivers/scsi/aic7xxx/aic7xxx.h
+++ b/drivers/scsi/aic7xxx/aic7xxx.h
@@ -943,6 +943,7 @@ struct ahc_softc {
943 * Platform specific device information. 943 * Platform specific device information.
944 */ 944 */
945 ahc_dev_softc_t dev_softc; 945 ahc_dev_softc_t dev_softc;
946 struct device *dev;
946 947
947 /* 948 /*
948 * Bus specific device information. 949 * Bus specific device information.
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index 3c9c17450bb3..d5c4a0d23706 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -860,8 +860,8 @@ int
860ahc_dmamem_alloc(struct ahc_softc *ahc, bus_dma_tag_t dmat, void** vaddr, 860ahc_dmamem_alloc(struct ahc_softc *ahc, bus_dma_tag_t dmat, void** vaddr,
861 int flags, bus_dmamap_t *mapp) 861 int flags, bus_dmamap_t *mapp)
862{ 862{
863 *vaddr = pci_alloc_consistent(ahc->dev_softc, 863 /* XXX: check if we really need the GFP_ATOMIC and unwind this mess! */
864 dmat->maxsize, mapp); 864 *vaddr = dma_alloc_coherent(ahc->dev, dmat->maxsize, mapp, GFP_ATOMIC);
865 if (*vaddr == NULL) 865 if (*vaddr == NULL)
866 return ENOMEM; 866 return ENOMEM;
867 return 0; 867 return 0;
@@ -871,8 +871,7 @@ void
871ahc_dmamem_free(struct ahc_softc *ahc, bus_dma_tag_t dmat, 871ahc_dmamem_free(struct ahc_softc *ahc, bus_dma_tag_t dmat,
872 void* vaddr, bus_dmamap_t map) 872 void* vaddr, bus_dmamap_t map)
873{ 873{
874 pci_free_consistent(ahc->dev_softc, dmat->maxsize, 874 dma_free_coherent(ahc->dev, dmat->maxsize, vaddr, map);
875 vaddr, map);
876} 875}
877 876
878int 877int
@@ -1123,8 +1122,7 @@ ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *templa
1123 1122
1124 host->transportt = ahc_linux_transport_template; 1123 host->transportt = ahc_linux_transport_template;
1125 1124
1126 retval = scsi_add_host(host, 1125 retval = scsi_add_host(host, ahc->dev);
1127 (ahc->dev_softc ? &ahc->dev_softc->dev : NULL));
1128 if (retval) { 1126 if (retval) {
1129 printk(KERN_WARNING "aic7xxx: scsi_add_host failed\n"); 1127 printk(KERN_WARNING "aic7xxx: scsi_add_host failed\n");
1130 scsi_host_put(host); 1128 scsi_host_put(host);
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
index 0fc14dac7070..717d8d1082ce 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
@@ -250,6 +250,7 @@ ahc_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
250 } 250 }
251 } 251 }
252 ahc->dev_softc = pci; 252 ahc->dev_softc = pci;
253 ahc->dev = &pci->dev;
253 error = ahc_pci_config(ahc, entry); 254 error = ahc_pci_config(ahc, entry);
254 if (error != 0) { 255 if (error != 0) {
255 ahc_free(ahc); 256 ahc_free(ahc);
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index dfba4921b265..5bf61431434b 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -2162,7 +2162,6 @@ static void fc_rport_recv_logo_req(struct fc_lport *lport, struct fc_frame *fp)
2162 FC_RPORT_DBG(rdata, "Received LOGO request while in state %s\n", 2162 FC_RPORT_DBG(rdata, "Received LOGO request while in state %s\n",
2163 fc_rport_state(rdata)); 2163 fc_rport_state(rdata));
2164 2164
2165 rdata->flags &= ~FC_RP_STARTED;
2166 fc_rport_enter_delete(rdata, RPORT_EV_STOP); 2165 fc_rport_enter_delete(rdata, RPORT_EV_STOP);
2167 mutex_unlock(&rdata->rp_mutex); 2166 mutex_unlock(&rdata->rp_mutex);
2168 kref_put(&rdata->kref, fc_rport_destroy); 2167 kref_put(&rdata->kref, fc_rport_destroy);
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 601b9f1de267..07dfc17d4824 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1706,8 +1706,12 @@ out_put_budget:
1706 ret = BLK_STS_DEV_RESOURCE; 1706 ret = BLK_STS_DEV_RESOURCE;
1707 break; 1707 break;
1708 default: 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 * we hit an error, as we will never see this command 1715 * we hit an error, as we will never see this command
1712 * again. 1716 * again.
1713 */ 1717 */