diff options
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_request.c | 1 | ||||
-rw-r--r-- | drivers/scsi/isci/init.c | 4 | ||||
-rw-r--r-- | drivers/scsi/isci/port.c | 1 | ||||
-rw-r--r-- | drivers/scsi/isci/remote_device.c | 10 | ||||
-rw-r--r-- | drivers/scsi/isci/request.c | 1 | ||||
-rw-r--r-- | drivers/scsi/isci/request.h | 5 | ||||
-rw-r--r-- | drivers/scsi/isci/task.c | 11 |
7 files changed, 15 insertions, 18 deletions
diff --git a/drivers/scsi/isci/core/scic_sds_request.c b/drivers/scsi/isci/core/scic_sds_request.c index 64aa9c60836f..a6ee155c6825 100644 --- a/drivers/scsi/isci/core/scic_sds_request.c +++ b/drivers/scsi/isci/core/scic_sds_request.c | |||
@@ -1635,7 +1635,6 @@ static void scic_sds_request_completed_state_enter( | |||
1635 | struct isci_host *ihost = sci_object_get_association(scic); | 1635 | struct isci_host *ihost = sci_object_get_association(scic); |
1636 | struct isci_request *ireq = sci_object_get_association(sci_req); | 1636 | struct isci_request *ireq = sci_object_get_association(sci_req); |
1637 | 1637 | ||
1638 | |||
1639 | SET_STATE_HANDLER(sci_req, | 1638 | SET_STATE_HANDLER(sci_req, |
1640 | scic_sds_request_state_handler_table, | 1639 | scic_sds_request_state_handler_table, |
1641 | SCI_BASE_REQUEST_STATE_COMPLETED); | 1640 | SCI_BASE_REQUEST_STATE_COMPLETED); |
diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c index 5e63ae6a75d1..5da9a6925cd7 100644 --- a/drivers/scsi/isci/init.c +++ b/drivers/scsi/isci/init.c | |||
@@ -362,8 +362,6 @@ static int isci_setup_interrupts(struct pci_dev *pdev) | |||
362 | else | 362 | else |
363 | isr = isci_msix_isr; | 363 | isr = isci_msix_isr; |
364 | 364 | ||
365 | BUG_ON(!isci_host); | ||
366 | |||
367 | err = devm_request_irq(&pdev->dev, msix->vector, isr, 0, | 365 | err = devm_request_irq(&pdev->dev, msix->vector, isr, 0, |
368 | DRV_NAME"-msix", isci_host); | 366 | DRV_NAME"-msix", isci_host); |
369 | if (!err) | 367 | if (!err) |
@@ -379,13 +377,11 @@ static int isci_setup_interrupts(struct pci_dev *pdev) | |||
379 | pci_disable_msix(pdev); | 377 | pci_disable_msix(pdev); |
380 | goto intx; | 378 | goto intx; |
381 | } | 379 | } |
382 | |||
383 | return 0; | 380 | return 0; |
384 | 381 | ||
385 | intx: | 382 | intx: |
386 | err = devm_request_irq(&pdev->dev, pdev->irq, isci_intx_isr, | 383 | err = devm_request_irq(&pdev->dev, pdev->irq, isci_intx_isr, |
387 | IRQF_SHARED, DRV_NAME"-intx", pdev); | 384 | IRQF_SHARED, DRV_NAME"-intx", pdev); |
388 | |||
389 | return err; | 385 | return err; |
390 | } | 386 | } |
391 | 387 | ||
diff --git a/drivers/scsi/isci/port.c b/drivers/scsi/isci/port.c index b675a94f4a73..cf78cf0a6749 100644 --- a/drivers/scsi/isci/port.c +++ b/drivers/scsi/isci/port.c | |||
@@ -178,6 +178,7 @@ void isci_port_link_up( | |||
178 | unsigned long success = true; | 178 | unsigned long success = true; |
179 | 179 | ||
180 | BUG_ON(isci_phy->isci_port != NULL); | 180 | BUG_ON(isci_phy->isci_port != NULL); |
181 | |||
181 | isci_phy->isci_port = isci_port; | 182 | isci_phy->isci_port = isci_port; |
182 | 183 | ||
183 | dev_dbg(&isci_host->pdev->dev, | 184 | dev_dbg(&isci_host->pdev->dev, |
diff --git a/drivers/scsi/isci/remote_device.c b/drivers/scsi/isci/remote_device.c index 320850cf46f2..9301e25dff31 100644 --- a/drivers/scsi/isci/remote_device.c +++ b/drivers/scsi/isci/remote_device.c | |||
@@ -202,8 +202,6 @@ static enum sci_status isci_remote_device_construct( | |||
202 | 202 | ||
203 | sci_object_set_association(to_sci_dev(isci_device), isci_device); | 203 | sci_object_set_association(to_sci_dev(isci_device), isci_device); |
204 | 204 | ||
205 | BUG_ON(port->isci_host == NULL); | ||
206 | |||
207 | /* start the device. */ | 205 | /* start the device. */ |
208 | status = scic_remote_device_start(to_sci_dev(isci_device), | 206 | status = scic_remote_device_start(to_sci_dev(isci_device), |
209 | ISCI_REMOTE_DEVICE_START_TIMEOUT); | 207 | ISCI_REMOTE_DEVICE_START_TIMEOUT); |
@@ -257,8 +255,12 @@ isci_remote_device_alloc(struct isci_host *ihost, struct isci_port *iport) | |||
257 | return NULL; | 255 | return NULL; |
258 | } | 256 | } |
259 | 257 | ||
260 | BUG_ON(!list_empty(&idev->reqs_in_process)); | 258 | if (WARN_ONCE(!list_empty(&idev->reqs_in_process), "found requests in process\n")) |
261 | BUG_ON(!list_empty(&idev->node)); | 259 | return NULL; |
260 | |||
261 | if (WARN_ONCE(!list_empty(&idev->node), "found non-idle remote device\n")) | ||
262 | return NULL; | ||
263 | |||
262 | isci_remote_device_change_state(idev, isci_freed); | 264 | isci_remote_device_change_state(idev, isci_freed); |
263 | 265 | ||
264 | return idev; | 266 | return idev; |
diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c index 37ffedc94ac0..a90c299b723a 100644 --- a/drivers/scsi/isci/request.c +++ b/drivers/scsi/isci/request.c | |||
@@ -472,7 +472,6 @@ int isci_request_execute( | |||
472 | 472 | ||
473 | out: | 473 | out: |
474 | if (status != SCI_SUCCESS) { | 474 | if (status != SCI_SUCCESS) { |
475 | |||
476 | /* release dma memory on failure. */ | 475 | /* release dma memory on failure. */ |
477 | isci_request_free(isci_host, request); | 476 | isci_request_free(isci_host, request); |
478 | request = NULL; | 477 | request = NULL; |
diff --git a/drivers/scsi/isci/request.h b/drivers/scsi/isci/request.h index 0c08da6bcd8a..642b21166fc6 100644 --- a/drivers/scsi/isci/request.h +++ b/drivers/scsi/isci/request.h | |||
@@ -193,8 +193,6 @@ static inline enum isci_request_status isci_request_change_started_to_newstate( | |||
193 | enum isci_request_status old_state; | 193 | enum isci_request_status old_state; |
194 | unsigned long flags; | 194 | unsigned long flags; |
195 | 195 | ||
196 | BUG_ON(isci_request == NULL); | ||
197 | |||
198 | spin_lock_irqsave(&isci_request->state_lock, flags); | 196 | spin_lock_irqsave(&isci_request->state_lock, flags); |
199 | 197 | ||
200 | old_state = isci_request->status; | 198 | old_state = isci_request->status; |
@@ -243,7 +241,8 @@ static inline void isci_request_free( | |||
243 | struct isci_host *isci_host, | 241 | struct isci_host *isci_host, |
244 | struct isci_request *isci_request) | 242 | struct isci_request *isci_request) |
245 | { | 243 | { |
246 | BUG_ON(isci_request == NULL); | 244 | if (!isci_request) |
245 | return; | ||
247 | 246 | ||
248 | /* release the dma memory if we fail. */ | 247 | /* release the dma memory if we fail. */ |
249 | dma_pool_free(isci_host->dma_pool, isci_request, | 248 | dma_pool_free(isci_host->dma_pool, isci_request, |
diff --git a/drivers/scsi/isci/task.c b/drivers/scsi/isci/task.c index b88101e195d1..c79968db871c 100644 --- a/drivers/scsi/isci/task.c +++ b/drivers/scsi/isci/task.c | |||
@@ -272,7 +272,7 @@ static enum sci_status isci_task_request_build( | |||
272 | { | 272 | { |
273 | struct scic_sds_remote_device *sci_device; | 273 | struct scic_sds_remote_device *sci_device; |
274 | enum sci_status status = SCI_FAILURE; | 274 | enum sci_status status = SCI_FAILURE; |
275 | struct isci_request *request; | 275 | struct isci_request *request = NULL; |
276 | struct isci_remote_device *isci_device; | 276 | struct isci_remote_device *isci_device; |
277 | /* struct sci_sas_identify_address_frame_protocols dev_protocols; */ | 277 | /* struct sci_sas_identify_address_frame_protocols dev_protocols; */ |
278 | struct smp_discover_response_protocols dev_protocols; | 278 | struct smp_discover_response_protocols dev_protocols; |
@@ -372,8 +372,6 @@ static void isci_tmf_timeout_cb(void *tmf_request_arg) | |||
372 | struct isci_tmf *tmf = isci_request_access_tmf(request); | 372 | struct isci_tmf *tmf = isci_request_access_tmf(request); |
373 | enum sci_status status; | 373 | enum sci_status status; |
374 | 374 | ||
375 | BUG_ON(request->ttype != tmf_task); | ||
376 | |||
377 | /* This task management request has timed-out. Terminate the request | 375 | /* This task management request has timed-out. Terminate the request |
378 | * so that the request eventually completes to the requestor in the | 376 | * so that the request eventually completes to the requestor in the |
379 | * request completion callback path. | 377 | * request completion callback path. |
@@ -1121,8 +1119,11 @@ static void isci_abort_task_process_cb( | |||
1121 | * request state was already set to "aborted" by the abort | 1119 | * request state was already set to "aborted" by the abort |
1122 | * task function. | 1120 | * task function. |
1123 | */ | 1121 | */ |
1124 | BUG_ON((old_request->status != aborted) | 1122 | if ((old_request->status != aborted) |
1125 | && (old_request->status != completed)); | 1123 | && (old_request->status != completed)) |
1124 | dev_err(&old_request->isci_host->pdev->dev, | ||
1125 | "%s: Bad request status (%d): tmf=%p, old_request=%p\n", | ||
1126 | __func__, old_request->status, tmf, old_request); | ||
1126 | break; | 1127 | break; |
1127 | 1128 | ||
1128 | case isci_tmf_timed_out: | 1129 | case isci_tmf_timed_out: |