diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-09 22:42:25 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-09 22:42:25 -0500 |
commit | 382f51fe2f2276344d8a21447656778cdf6583b6 (patch) | |
tree | c2836a2cca4126c9c026ce5aa2fdf9f1c8ccded6 /drivers/scsi/hosts.c | |
parent | 701791cc3c8fc6dd83f6ec8af7e2541b4a316606 (diff) | |
parent | 54987386ee3790f3900de4df2ed4deb0e18dfc9f (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (222 commits)
[SCSI] zfcp: Remove flag ZFCP_STATUS_FSFREQ_TMFUNCNOTSUPP
[SCSI] zfcp: Activate fc4s attributes for zfcp in FC transport class
[SCSI] zfcp: Block scsi_eh thread for rport state BLOCKED
[SCSI] zfcp: Update FSF error reporting
[SCSI] zfcp: Improve ELS ADISC handling
[SCSI] zfcp: Simplify handling of ct and els requests
[SCSI] zfcp: Remove ZFCP_DID_MASK
[SCSI] zfcp: Move WKA port to zfcp FC code
[SCSI] zfcp: Use common code definitions for FC CT structs
[SCSI] zfcp: Use common code definitions for FC ELS structs
[SCSI] zfcp: Update FCP protocol related code
[SCSI] zfcp: Dont fail SCSI commands when transitioning to blocked fc_rport
[SCSI] zfcp: Assign scheduled work to driver queue
[SCSI] zfcp: Remove STATUS_COMMON_REMOVE flag as it is not required anymore
[SCSI] zfcp: Implement module unloading
[SCSI] zfcp: Merge trace code for fsf requests in one function
[SCSI] zfcp: Access ports and units with container_of in sysfs code
[SCSI] zfcp: Remove suspend callback
[SCSI] zfcp: Remove global config_mutex
[SCSI] zfcp: Replace local reference counting with common kref
...
Diffstat (limited to 'drivers/scsi/hosts.c')
-rw-r--r-- | drivers/scsi/hosts.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index c968cc31cd86..554626e18062 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c | |||
@@ -180,14 +180,20 @@ void scsi_remove_host(struct Scsi_Host *shost) | |||
180 | EXPORT_SYMBOL(scsi_remove_host); | 180 | EXPORT_SYMBOL(scsi_remove_host); |
181 | 181 | ||
182 | /** | 182 | /** |
183 | * scsi_add_host - add a scsi host | 183 | * scsi_add_host_with_dma - add a scsi host with dma device |
184 | * @shost: scsi host pointer to add | 184 | * @shost: scsi host pointer to add |
185 | * @dev: a struct device of type scsi class | 185 | * @dev: a struct device of type scsi class |
186 | * @dma_dev: dma device for the host | ||
187 | * | ||
188 | * Note: You rarely need to worry about this unless you're in a | ||
189 | * virtualised host environments, so use the simpler scsi_add_host() | ||
190 | * function instead. | ||
186 | * | 191 | * |
187 | * Return value: | 192 | * Return value: |
188 | * 0 on success / != 0 for error | 193 | * 0 on success / != 0 for error |
189 | **/ | 194 | **/ |
190 | int scsi_add_host(struct Scsi_Host *shost, struct device *dev) | 195 | int scsi_add_host_with_dma(struct Scsi_Host *shost, struct device *dev, |
196 | struct device *dma_dev) | ||
191 | { | 197 | { |
192 | struct scsi_host_template *sht = shost->hostt; | 198 | struct scsi_host_template *sht = shost->hostt; |
193 | int error = -EINVAL; | 199 | int error = -EINVAL; |
@@ -207,6 +213,7 @@ int scsi_add_host(struct Scsi_Host *shost, struct device *dev) | |||
207 | 213 | ||
208 | if (!shost->shost_gendev.parent) | 214 | if (!shost->shost_gendev.parent) |
209 | shost->shost_gendev.parent = dev ? dev : &platform_bus; | 215 | shost->shost_gendev.parent = dev ? dev : &platform_bus; |
216 | shost->dma_dev = dma_dev; | ||
210 | 217 | ||
211 | error = device_add(&shost->shost_gendev); | 218 | error = device_add(&shost->shost_gendev); |
212 | if (error) | 219 | if (error) |
@@ -262,7 +269,7 @@ int scsi_add_host(struct Scsi_Host *shost, struct device *dev) | |||
262 | fail: | 269 | fail: |
263 | return error; | 270 | return error; |
264 | } | 271 | } |
265 | EXPORT_SYMBOL(scsi_add_host); | 272 | EXPORT_SYMBOL(scsi_add_host_with_dma); |
266 | 273 | ||
267 | static void scsi_host_dev_release(struct device *dev) | 274 | static void scsi_host_dev_release(struct device *dev) |
268 | { | 275 | { |