glue.c revision d39a76e7b087a3d0927cbe6898dc0a6770fa6c68
2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A * This file is part of the Chelsio T1 Ethernet driver. 2N/A * Copyright (C) 2003-2005 Chelsio Communications. All rights reserved. 2N/A * Solaris support routines for common code part of 2N/A * Chelsio PCI Ethernet Driver. #
pragma ident "%Z%%M% %I% %E% SMI"#
include "ch.h" /* Chelsio Driver specific parameters */ /* don't support TRASPARENT ioctls */ * sanity checks. There should be a M_DATA mblk following * the initial M_IOCTL mblk /* now process the ioctl */ /* protect against bad addr values */ /* protect against bad addr values */ /* protect against bad addr values */ /* protect against bad addr values */ * Can't wait for memory here, since we have to use the Solaris dma * mechanisms to determine the physical address. * flg is either 0 (read) or DMA_OUT (write). * byte swap, consistant mapping & 4k aligned CH_ALERT(
"%s: encountered fatal error, operation suspended\n",
/* format buf using fmt and arguments contained in ap */ /* pass formatted string to cmn_err(9F) */ /* format buf using fmt and arguments contained in ap */ /* pass formatted string to cmn_err(9F) */ /* format buf using fmt and arguments contained in ap */ /* pass formatted string to cmn_err(9F) */ * This function initializes a polling routine, Poll_func * which will be polled ever N Microsecond, where N is * provided in the cyclic start routine. * Cyclic function which provides a periodic polling * capability to Solaris. The poll function provided by * the 'ch_init_cyclic' function is called from this * here, and this routine launches a new one-shot * timer to bring it back in some period later. * The 'ch_start_cyclic' starts the polling. * The 'ch_stop_cyclic' stops the polling.