diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-02-18 12:25:15 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 06:55:27 -0400 |
commit | 83f5eeef59581faed6f002432bafe24da8cbf401 (patch) | |
tree | 808ffa79326870d33782b4d24e0120ba2508e785 /drivers/scsi | |
parent | 83e514301ec73b16fb258618c9f9b443cca3744a (diff) |
isci: debug fixes
Some of the chain walks to get back to our dev are invalid.
isci_remote_device_change_state: delete rather than adding conditional deref
chain walking
isci_request_change_state: fix, it was being called too early
isci_request_ssp_io_request_get_lun: fix compile breakage hidden by ifdef DEBUG
Signed-off-by: Maciej Trela <maciej.trela@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/isci/remote_device.c | 6 | ||||
-rw-r--r-- | drivers/scsi/isci/request.c | 6 |
2 files changed, 3 insertions, 9 deletions
diff --git a/drivers/scsi/isci/remote_device.c b/drivers/scsi/isci/remote_device.c index 936f22957e5b..dec9033d674d 100644 --- a/drivers/scsi/isci/remote_device.c +++ b/drivers/scsi/isci/remote_device.c | |||
@@ -686,12 +686,6 @@ void isci_remote_device_change_state( | |||
686 | { | 686 | { |
687 | unsigned long flags; | 687 | unsigned long flags; |
688 | 688 | ||
689 | dev_dbg(&isci_device->isci_port->isci_host->pdev->dev, | ||
690 | "%s: isci_device = %p, state = 0x%x", | ||
691 | __func__, | ||
692 | isci_device, | ||
693 | status); | ||
694 | |||
695 | spin_lock_irqsave(&isci_device->state_lock, flags); | 689 | spin_lock_irqsave(&isci_device->state_lock, flags); |
696 | isci_device->status = status; | 690 | isci_device->status = status; |
697 | spin_unlock_irqrestore(&isci_device->state_lock, flags); | 691 | spin_unlock_irqrestore(&isci_device->state_lock, flags); |
diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c index f7ba047d64ce..81a77335fdb3 100644 --- a/drivers/scsi/isci/request.c +++ b/drivers/scsi/isci/request.c | |||
@@ -285,7 +285,6 @@ static int isci_request_alloc_core( | |||
285 | 285 | ||
286 | /* initialize the request object. */ | 286 | /* initialize the request object. */ |
287 | spin_lock_init(&request->state_lock); | 287 | spin_lock_init(&request->state_lock); |
288 | isci_request_change_state(request, allocated); | ||
289 | request->sci_request_mem_ptr = ((u8 *)request) + | 288 | request->sci_request_mem_ptr = ((u8 *)request) + |
290 | sizeof(struct isci_request); | 289 | sizeof(struct isci_request); |
291 | request->request_daddr = handle; | 290 | request->request_daddr = handle; |
@@ -302,6 +301,7 @@ static int isci_request_alloc_core( | |||
302 | INIT_LIST_HEAD(&request->dev_node); | 301 | INIT_LIST_HEAD(&request->dev_node); |
303 | 302 | ||
304 | *isci_request = request; | 303 | *isci_request = request; |
304 | isci_request_change_state(request, allocated); | ||
305 | 305 | ||
306 | return ret; | 306 | return ret; |
307 | } | 307 | } |
@@ -1389,8 +1389,8 @@ u32 isci_request_ssp_io_request_get_lun( | |||
1389 | 1389 | ||
1390 | for (i = 0; i < 8; i++) | 1390 | for (i = 0; i < 8; i++) |
1391 | dev_dbg(&request->isci_host->pdev->dev, | 1391 | dev_dbg(&request->isci_host->pdev->dev, |
1392 | "%s: request->task->ssp_task.LUN[%d] = %x\n", | 1392 | "%s: task->ssp_task.LUN[%d] = %x\n", |
1393 | __func__, i, request->task->ssp_task.LUN[i]); | 1393 | __func__, i, task->ssp_task.LUN[i]); |
1394 | 1394 | ||
1395 | #endif | 1395 | #endif |
1396 | 1396 | ||