Commit c21e294
common/nvme: add '--no-wait-ns' argument to _nvme_connect_subsys()
The default behavior of _nvme_connect_subsys is just wait for the
controller ready. But sometimes the namespace is not ready after
_nvme_connect_subsys especially on RT kernel. This triggers failures as
reported in the Link. To avoid the failures, make namespace ready in
_nvme_connect_subsys. For that purpose,
1) re-use the the function _nvme_ns_ready to check namespace ready
2) add one new argument `--no-wait-ns` to skip for the cases that
don't need wait for namespace ready
3) update to use "return 1" for controller failure check and "return 2"
for namespace failure check
Link: #193
Signed-off-by: Yi Zhang <[email protected]>
Reviewed-by: Daniel Wagner <[email protected]>
Reviewed-by: Chaitanya Kulkarni <[email protected]>
[Shin'ichiro: simplified the commit message]
Signed-off-by: Shin'ichiro Kawasaki <[email protected]>1 parent f939e6e commit c21e294
1 file changed
Lines changed: 35 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| 287 | + | |
287 | 288 | | |
288 | 289 | | |
289 | 290 | | |
290 | 291 | | |
291 | 292 | | |
292 | 293 | | |
293 | 294 | | |
| 295 | + | |
294 | 296 | | |
295 | 297 | | |
296 | 298 | | |
| |||
346 | 348 | | |
347 | 349 | | |
348 | 350 | | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
349 | 355 | | |
350 | 356 | | |
351 | 357 | | |
| |||
432 | 438 | | |
433 | 439 | | |
434 | 440 | | |
435 | | - | |
| 441 | + | |
436 | 442 | | |
437 | 443 | | |
438 | | - | |
| 444 | + | |
439 | 445 | | |
440 | 446 | | |
441 | | - | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
442 | 456 | | |
| 457 | + | |
443 | 458 | | |
444 | 459 | | |
445 | 460 | | |
| |||
462 | 477 | | |
463 | 478 | | |
464 | 479 | | |
465 | | - | |
466 | 480 | | |
467 | 481 | | |
468 | 482 | | |
| |||
476 | 490 | | |
477 | 491 | | |
478 | 492 | | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
479 | 510 | | |
480 | 511 | | |
481 | 512 | | |
| |||
0 commit comments