• Home
  • Raw
  • Download

Lines Matching refs:ionic

271 	err = ionic_heartbeat_check(lif->ionic);  in ionic_adminq_post()
312 static void ionic_dev_cmd_clean(struct ionic *ionic) in ionic_dev_cmd_clean() argument
314 struct ionic_dev *idev = &ionic->idev; in ionic_dev_cmd_clean()
320 int ionic_dev_cmd_wait(struct ionic *ionic, unsigned long max_seconds) in ionic_dev_cmd_wait() argument
322 struct ionic_dev *idev = &ionic->idev; in ionic_dev_cmd_wait()
348 hb = ionic_heartbeat_check(ionic); in ionic_dev_cmd_wait()
352 dev_dbg(ionic->dev, "DEVCMD %s (%d) done=%d took %ld secs (%ld jiffies)\n", in ionic_dev_cmd_wait()
361 dev_warn(ionic->dev, "DEVCMD %s (%d) failed - FW halted\n", in ionic_dev_cmd_wait()
367 ionic_dev_cmd_clean(ionic); in ionic_dev_cmd_wait()
368 dev_warn(ionic->dev, "DEVCMD %s (%d) timeout after %ld secs\n", in ionic_dev_cmd_wait()
373 err = ionic_dev_cmd_status(&ionic->idev); in ionic_dev_cmd_wait()
377 dev_dbg(ionic->dev, "DEV_CMD %s (%d), %s (%d) retrying...\n", in ionic_dev_cmd_wait()
388 dev_err(ionic->dev, "DEV_CMD %s (%d) error, %s (%d) failed\n", in ionic_dev_cmd_wait()
395 ionic_dev_cmd_clean(ionic); in ionic_dev_cmd_wait()
400 int ionic_setup(struct ionic *ionic) in ionic_setup() argument
404 err = ionic_dev_setup(ionic); in ionic_setup()
407 ionic_reset(ionic); in ionic_setup()
412 int ionic_identify(struct ionic *ionic) in ionic_identify() argument
414 struct ionic_identity *ident = &ionic->ident; in ionic_identify()
415 struct ionic_dev *idev = &ionic->idev; in ionic_identify()
425 mutex_lock(&ionic->dev_cmd_lock); in ionic_identify()
431 err = ionic_dev_cmd_wait(ionic, DEVCMD_TIMEOUT); in ionic_identify()
436 mutex_unlock(&ionic->dev_cmd_lock); in ionic_identify()
439 dev_err(ionic->dev, "Cannot identify ionic: %dn", err); in ionic_identify()
443 err = ionic_lif_identify(ionic, IONIC_LIF_TYPE_CLASSIC, in ionic_identify()
444 &ionic->ident.lif); in ionic_identify()
446 dev_err(ionic->dev, "Cannot identify LIFs: %d\n", err); in ionic_identify()
456 int ionic_init(struct ionic *ionic) in ionic_init() argument
458 struct ionic_dev *idev = &ionic->idev; in ionic_init()
461 mutex_lock(&ionic->dev_cmd_lock); in ionic_init()
463 err = ionic_dev_cmd_wait(ionic, DEVCMD_TIMEOUT); in ionic_init()
464 mutex_unlock(&ionic->dev_cmd_lock); in ionic_init()
469 int ionic_reset(struct ionic *ionic) in ionic_reset() argument
471 struct ionic_dev *idev = &ionic->idev; in ionic_reset()
474 mutex_lock(&ionic->dev_cmd_lock); in ionic_reset()
476 err = ionic_dev_cmd_wait(ionic, DEVCMD_TIMEOUT); in ionic_reset()
477 mutex_unlock(&ionic->dev_cmd_lock); in ionic_reset()
482 int ionic_port_identify(struct ionic *ionic) in ionic_port_identify() argument
484 struct ionic_identity *ident = &ionic->ident; in ionic_port_identify()
485 struct ionic_dev *idev = &ionic->idev; in ionic_port_identify()
489 mutex_lock(&ionic->dev_cmd_lock); in ionic_port_identify()
492 err = ionic_dev_cmd_wait(ionic, DEVCMD_TIMEOUT); in ionic_port_identify()
498 mutex_unlock(&ionic->dev_cmd_lock); in ionic_port_identify()
503 int ionic_port_init(struct ionic *ionic) in ionic_port_init() argument
505 struct ionic_identity *ident = &ionic->ident; in ionic_port_init()
506 struct ionic_dev *idev = &ionic->idev; in ionic_port_init()
512 idev->port_info = dma_alloc_coherent(ionic->dev, in ionic_port_init()
517 dev_err(ionic->dev, "Failed to allocate port info\n"); in ionic_port_init()
524 mutex_lock(&ionic->dev_cmd_lock); in ionic_port_init()
528 err = ionic_dev_cmd_wait(ionic, DEVCMD_TIMEOUT); in ionic_port_init()
530 ionic_dev_cmd_port_state(&ionic->idev, IONIC_PORT_ADMIN_STATE_UP); in ionic_port_init()
531 (void)ionic_dev_cmd_wait(ionic, DEVCMD_TIMEOUT); in ionic_port_init()
533 mutex_unlock(&ionic->dev_cmd_lock); in ionic_port_init()
535 dev_err(ionic->dev, "Failed to init port\n"); in ionic_port_init()
536 dma_free_coherent(ionic->dev, idev->port_info_sz, in ionic_port_init()
545 int ionic_port_reset(struct ionic *ionic) in ionic_port_reset() argument
547 struct ionic_dev *idev = &ionic->idev; in ionic_port_reset()
553 mutex_lock(&ionic->dev_cmd_lock); in ionic_port_reset()
555 err = ionic_dev_cmd_wait(ionic, DEVCMD_TIMEOUT); in ionic_port_reset()
556 mutex_unlock(&ionic->dev_cmd_lock); in ionic_port_reset()
558 dma_free_coherent(ionic->dev, idev->port_info_sz, in ionic_port_reset()
565 dev_err(ionic->dev, "Failed to reset port\n"); in ionic_port_reset()