diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-15 19:51:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-15 19:51:54 -0400 |
commit | bc06cffdec85d487c77109dffcd2f285bdc502d3 (patch) | |
tree | adc6e6398243da87e66c56102840597a329183a0 /drivers/scsi/scsi_sysfs.c | |
parent | d3502d7f25b22cfc9762bf1781faa9db1bb3be2e (diff) | |
parent | 9413d7b8aa777dd1fc7db9563ce5e80d769fe7b5 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (166 commits)
[SCSI] ibmvscsi: convert to use the data buffer accessors
[SCSI] dc395x: convert to use the data buffer accessors
[SCSI] ncr53c8xx: convert to use the data buffer accessors
[SCSI] sym53c8xx: convert to use the data buffer accessors
[SCSI] ppa: coding police and printk levels
[SCSI] aic7xxx_old: remove redundant GFP_ATOMIC from kmalloc
[SCSI] i2o: remove redundant GFP_ATOMIC from kmalloc from device.c
[SCSI] remove the dead CYBERSTORMIII_SCSI option
[SCSI] don't build scsi_dma_{map,unmap} for !HAS_DMA
[SCSI] Clean up scsi_add_lun a bit
[SCSI] 53c700: Remove printk, which triggers because of low scsi clock on SNI RMs
[SCSI] sni_53c710: Cleanup
[SCSI] qla4xxx: Fix underrun/overrun conditions
[SCSI] megaraid_mbox: use mutex instead of semaphore
[SCSI] aacraid: add 51245, 51645 and 52245 adapters to documentation.
[SCSI] qla2xxx: update version to 8.02.00-k1.
[SCSI] qla2xxx: add support for NPIV
[SCSI] stex: use resid for xfer len information
[SCSI] Add Brownie 1200U3P to blacklist
[SCSI] scsi.c: convert to use the data buffer accessors
...
Diffstat (limited to 'drivers/scsi/scsi_sysfs.c')
-rw-r--r-- | drivers/scsi/scsi_sysfs.c | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 67a38a1409ba..ed720863ab97 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c | |||
@@ -293,30 +293,18 @@ static int scsi_bus_suspend(struct device * dev, pm_message_t state) | |||
293 | { | 293 | { |
294 | struct device_driver *drv = dev->driver; | 294 | struct device_driver *drv = dev->driver; |
295 | struct scsi_device *sdev = to_scsi_device(dev); | 295 | struct scsi_device *sdev = to_scsi_device(dev); |
296 | struct scsi_host_template *sht = sdev->host->hostt; | ||
297 | int err; | 296 | int err; |
298 | 297 | ||
299 | err = scsi_device_quiesce(sdev); | 298 | err = scsi_device_quiesce(sdev); |
300 | if (err) | 299 | if (err) |
301 | return err; | 300 | return err; |
302 | 301 | ||
303 | /* call HLD suspend first */ | ||
304 | if (drv && drv->suspend) { | 302 | if (drv && drv->suspend) { |
305 | err = drv->suspend(dev, state); | 303 | err = drv->suspend(dev, state); |
306 | if (err) | 304 | if (err) |
307 | return err; | 305 | return err; |
308 | } | 306 | } |
309 | 307 | ||
310 | /* then, call host suspend */ | ||
311 | if (sht->suspend) { | ||
312 | err = sht->suspend(sdev, state); | ||
313 | if (err) { | ||
314 | if (drv && drv->resume) | ||
315 | drv->resume(dev); | ||
316 | return err; | ||
317 | } | ||
318 | } | ||
319 | |||
320 | return 0; | 308 | return 0; |
321 | } | 309 | } |
322 | 310 | ||
@@ -324,21 +312,14 @@ static int scsi_bus_resume(struct device * dev) | |||
324 | { | 312 | { |
325 | struct device_driver *drv = dev->driver; | 313 | struct device_driver *drv = dev->driver; |
326 | struct scsi_device *sdev = to_scsi_device(dev); | 314 | struct scsi_device *sdev = to_scsi_device(dev); |
327 | struct scsi_host_template *sht = sdev->host->hostt; | 315 | int err = 0; |
328 | int err = 0, err2 = 0; | ||
329 | |||
330 | /* call host resume first */ | ||
331 | if (sht->resume) | ||
332 | err = sht->resume(sdev); | ||
333 | 316 | ||
334 | /* then, call HLD resume */ | ||
335 | if (drv && drv->resume) | 317 | if (drv && drv->resume) |
336 | err2 = drv->resume(dev); | 318 | err = drv->resume(dev); |
337 | 319 | ||
338 | scsi_device_resume(sdev); | 320 | scsi_device_resume(sdev); |
339 | 321 | ||
340 | /* favor LLD failure */ | 322 | return err; |
341 | return err ? err : err2;; | ||
342 | } | 323 | } |
343 | 324 | ||
344 | struct bus_type scsi_bus_type = { | 325 | struct bus_type scsi_bus_type = { |