diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-12 12:50:42 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-12 12:50:42 -0400 |
| commit | c9b8af00ff71f86ff3d092cc60ca673e1d0eae5b (patch) | |
| tree | 25cc016481cc693552bebb4040041817280c2ccf /drivers/scsi/scsi_error.c | |
| parent | c59a264c9e932c828d533497e286b89e43c8d1be (diff) | |
| parent | 82681a318f9f028ea64e61f24bbd9ac535531921 (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: (154 commits)
[SCSI] osd: Remove out-of-tree left overs
[SCSI] libosd: Use REQ_QUIET requests.
[SCSI] osduld: use filp_open() when looking up an osd-device
[SCSI] libosd: Define an osd_dev wrapper to retrieve the request_queue
[SCSI] libosd: osd_req_{read,write} takes a length parameter
[SCSI] libosd: Let _osd_req_finalize_data_integrity receive number of out_bytes
[SCSI] libosd: osd_req_{read,write}_kern new API
[SCSI] libosd: Better printout of OSD target system information
[SCSI] libosd: OSD2r05: Attribute definitions
[SCSI] libosd: OSD2r05: Additional command enums
[SCSI] mpt fusion: fix up doc book comments
[SCSI] mpt fusion: Added support for Broadcast primitives Event handling
[SCSI] mpt fusion: Queue full event handling
[SCSI] mpt fusion: RAID device handling and Dual port Raid support is added
[SCSI] mpt fusion: Put IOC into ready state if it not already in ready state
[SCSI] mpt fusion: Code Cleanup patch
[SCSI] mpt fusion: Rescan SAS topology added
[SCSI] mpt fusion: SAS topology scan changes, expander events
[SCSI] mpt fusion: Firmware event implementation using seperate WorkQueue
[SCSI] mpt fusion: rewrite of ioctl_cmds internal generated function
...
Diffstat (limited to 'drivers/scsi/scsi_error.c')
| -rw-r--r-- | drivers/scsi/scsi_error.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 0c2c73be1974..a1689353d7fd 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
| @@ -641,9 +641,9 @@ EXPORT_SYMBOL(scsi_eh_prep_cmnd); | |||
| 641 | /** | 641 | /** |
| 642 | * scsi_eh_restore_cmnd - Restore a scsi command info as part of error recory | 642 | * scsi_eh_restore_cmnd - Restore a scsi command info as part of error recory |
| 643 | * @scmd: SCSI command structure to restore | 643 | * @scmd: SCSI command structure to restore |
| 644 | * @ses: saved information from a coresponding call to scsi_prep_eh_cmnd | 644 | * @ses: saved information from a coresponding call to scsi_eh_prep_cmnd |
| 645 | * | 645 | * |
| 646 | * Undo any damage done by above scsi_prep_eh_cmnd(). | 646 | * Undo any damage done by above scsi_eh_prep_cmnd(). |
| 647 | */ | 647 | */ |
| 648 | void scsi_eh_restore_cmnd(struct scsi_cmnd* scmd, struct scsi_eh_save *ses) | 648 | void scsi_eh_restore_cmnd(struct scsi_cmnd* scmd, struct scsi_eh_save *ses) |
| 649 | { | 649 | { |
| @@ -1451,28 +1451,21 @@ static void eh_lock_door_done(struct request *req, int uptodate) | |||
| 1451 | * @sdev: SCSI device to prevent medium removal | 1451 | * @sdev: SCSI device to prevent medium removal |
| 1452 | * | 1452 | * |
| 1453 | * Locking: | 1453 | * Locking: |
| 1454 | * We must be called from process context; scsi_allocate_request() | 1454 | * We must be called from process context. |
| 1455 | * may sleep. | ||
| 1456 | * | 1455 | * |
| 1457 | * Notes: | 1456 | * Notes: |
| 1458 | * We queue up an asynchronous "ALLOW MEDIUM REMOVAL" request on the | 1457 | * We queue up an asynchronous "ALLOW MEDIUM REMOVAL" request on the |
| 1459 | * head of the devices request queue, and continue. | 1458 | * head of the devices request queue, and continue. |
| 1460 | * | ||
| 1461 | * Bugs: | ||
| 1462 | * scsi_allocate_request() may sleep waiting for existing requests to | ||
| 1463 | * be processed. However, since we haven't kicked off any request | ||
| 1464 | * processing for this host, this may deadlock. | ||
| 1465 | * | ||
| 1466 | * If scsi_allocate_request() fails for what ever reason, we | ||
| 1467 | * completely forget to lock the door. | ||
| 1468 | */ | 1459 | */ |
| 1469 | static void scsi_eh_lock_door(struct scsi_device *sdev) | 1460 | static void scsi_eh_lock_door(struct scsi_device *sdev) |
| 1470 | { | 1461 | { |
| 1471 | struct request *req; | 1462 | struct request *req; |
| 1472 | 1463 | ||
| 1464 | /* | ||
| 1465 | * blk_get_request with GFP_KERNEL (__GFP_WAIT) sleeps until a | ||
| 1466 | * request becomes available | ||
| 1467 | */ | ||
| 1473 | req = blk_get_request(sdev->request_queue, READ, GFP_KERNEL); | 1468 | req = blk_get_request(sdev->request_queue, READ, GFP_KERNEL); |
| 1474 | if (!req) | ||
| 1475 | return; | ||
| 1476 | 1469 | ||
| 1477 | req->cmd[0] = ALLOW_MEDIUM_REMOVAL; | 1470 | req->cmd[0] = ALLOW_MEDIUM_REMOVAL; |
| 1478 | req->cmd[1] = 0; | 1471 | req->cmd[1] = 0; |
