diff options
Diffstat (limited to 'drivers/scsi/aic7xxx')
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_osm.c | 13 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_osm.c | 20 |
2 files changed, 24 insertions, 9 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c index 31e9f40e79a2..1c8f872e2dd4 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c | |||
@@ -1064,6 +1064,7 @@ ahd_linux_register_host(struct ahd_softc *ahd, struct scsi_host_template *templa | |||
1064 | struct Scsi_Host *host; | 1064 | struct Scsi_Host *host; |
1065 | char *new_name; | 1065 | char *new_name; |
1066 | u_long s; | 1066 | u_long s; |
1067 | int retval; | ||
1067 | 1068 | ||
1068 | template->name = ahd->description; | 1069 | template->name = ahd->description; |
1069 | host = scsi_host_alloc(template, sizeof(struct ahd_softc *)); | 1070 | host = scsi_host_alloc(template, sizeof(struct ahd_softc *)); |
@@ -1096,9 +1097,15 @@ ahd_linux_register_host(struct ahd_softc *ahd, struct scsi_host_template *templa | |||
1096 | 1097 | ||
1097 | host->transportt = ahd_linux_transport_template; | 1098 | host->transportt = ahd_linux_transport_template; |
1098 | 1099 | ||
1099 | scsi_add_host(host, &ahd->dev_softc->dev); /* XXX handle failure */ | 1100 | retval = scsi_add_host(host, &ahd->dev_softc->dev); |
1101 | if (retval) { | ||
1102 | printk(KERN_WARNING "aic79xx: scsi_add_host failed\n"); | ||
1103 | scsi_host_put(host); | ||
1104 | return retval; | ||
1105 | } | ||
1106 | |||
1100 | scsi_scan_host(host); | 1107 | scsi_scan_host(host); |
1101 | return (0); | 1108 | return 0; |
1102 | } | 1109 | } |
1103 | 1110 | ||
1104 | uint64_t | 1111 | uint64_t |
@@ -2105,7 +2112,7 @@ ahd_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag) | |||
2105 | scmd_id(cmd), | 2112 | scmd_id(cmd), |
2106 | scmd_channel(cmd) + 'A', | 2113 | scmd_channel(cmd) + 'A', |
2107 | CAM_LUN_WILDCARD, | 2114 | CAM_LUN_WILDCARD, |
2108 | SCB_LIST_NULL, ROLE_INITIATOR) == 0) | 2115 | SCB_LIST_NULL, ROLE_INITIATOR)) |
2109 | break; | 2116 | break; |
2110 | } | 2117 | } |
2111 | } | 2118 | } |
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c index 7fc6454068e4..fd389e9f9460 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c | |||
@@ -1061,10 +1061,11 @@ uint32_t aic7xxx_verbose; | |||
1061 | int | 1061 | int |
1062 | ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *template) | 1062 | ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *template) |
1063 | { | 1063 | { |
1064 | char buf[80]; | 1064 | char buf[80]; |
1065 | struct Scsi_Host *host; | 1065 | struct Scsi_Host *host; |
1066 | char *new_name; | 1066 | char *new_name; |
1067 | u_long s; | 1067 | u_long s; |
1068 | int retval; | ||
1068 | 1069 | ||
1069 | template->name = ahc->description; | 1070 | template->name = ahc->description; |
1070 | host = scsi_host_alloc(template, sizeof(struct ahc_softc *)); | 1071 | host = scsi_host_alloc(template, sizeof(struct ahc_softc *)); |
@@ -1097,9 +1098,16 @@ ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *templa | |||
1097 | 1098 | ||
1098 | host->transportt = ahc_linux_transport_template; | 1099 | host->transportt = ahc_linux_transport_template; |
1099 | 1100 | ||
1100 | scsi_add_host(host, (ahc->dev_softc ? &ahc->dev_softc->dev : NULL)); /* XXX handle failure */ | 1101 | retval = scsi_add_host(host, |
1102 | (ahc->dev_softc ? &ahc->dev_softc->dev : NULL)); | ||
1103 | if (retval) { | ||
1104 | printk(KERN_WARNING "aic7xxx: scsi_add_host failed\n"); | ||
1105 | scsi_host_put(host); | ||
1106 | return retval; | ||
1107 | } | ||
1108 | |||
1101 | scsi_scan_host(host); | 1109 | scsi_scan_host(host); |
1102 | return (0); | 1110 | return 0; |
1103 | } | 1111 | } |
1104 | 1112 | ||
1105 | /* | 1113 | /* |
@@ -2169,7 +2177,7 @@ ahc_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag) | |||
2169 | if (ahc_match_scb(ahc, pending_scb, scmd_id(cmd), | 2177 | if (ahc_match_scb(ahc, pending_scb, scmd_id(cmd), |
2170 | scmd_channel(cmd) + 'A', | 2178 | scmd_channel(cmd) + 'A', |
2171 | CAM_LUN_WILDCARD, | 2179 | CAM_LUN_WILDCARD, |
2172 | SCB_LIST_NULL, ROLE_INITIATOR) == 0) | 2180 | SCB_LIST_NULL, ROLE_INITIATOR)) |
2173 | break; | 2181 | break; |
2174 | } | 2182 | } |
2175 | } | 2183 | } |