/* stop_nic - To stop the nic @nic ; device private variable. Description: This function does exactly the opposite of what the start_nic() function does. This function is called to stop the device. Return Value: void.  */
static void stop_nic(struct s2io_nic *nic)
/* stop_nic - To stop the nic @nic ; device private variable. Description: This function does exactly the opposite of what the start_nic() function does. This function is called to stop the device. Return Value: void.  */
static void stop_nic(struct s2io_nic *nic)
{
	struct XENA_dev_config __iomem *bar0 = nic->bar0;
	register u64 val64 = 0;
	u16 interruptible;
	en_dis_err_alarms(nic, ENA_ALL_INTRS, DISABLE_INTRS);
	interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR;
	interruptible |= TX_PIC_INTR;
	en_dis_able_nic_intrs(nic, interruptible, DISABLE_INTRS);
	val64 = readq(&bar0->adapter_control);
	val64 &= ~(ADAPTER_CNTL_EN);
	writeq(val64, &bar0->adapter_control);
}