/* LCS detect function setup channels and make them I/O ready  */
static int lcs_detect(struct lcs_card *card)
/* LCS detect function setup channels and make them I/O ready  */
static int lcs_detect(struct lcs_card *card)
{
	int rc = 0;
	LCS_DBF_TEXT(2, setup, "lcsdetct");
	if (card->dev)
		netif_stop_queue(card->dev);
	rc = lcs_stop_channels(card);
	if (rc == 0) {
		rc = lcs_start_channels(card);
		if (rc == 0) {
			rc = lcs_send_startup(card, LCS_INITIATOR_TCPIP);
			if (rc == 0)
				rc = lcs_startlan(card);
		}
	}
	if (rc == 0) {
		card->state = DEV_STATE_UP;
	} else {
		card->state = DEV_STATE_DOWN;
		card->write.state = LCS_CH_STATE_INIT;
		card->read.state =  LCS_CH_STATE_INIT;
	}
	return rc;
}