if_sisreg.h (72813) | if_sisreg.h (81713) |
---|---|
1/* 2 * Copyright (c) 1997, 1998, 1999 3 * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 * | 1/* 2 * Copyright (c) 1997, 1998, 1999 3 * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 * |
32 * $FreeBSD: head/sys/pci/if_sisreg.h 72813 2001-02-21 20:54:22Z wpaul $ | 32 * $FreeBSD: head/sys/pci/if_sisreg.h 81713 2001-08-15 17:38:43Z wpaul $ |
33 */ 34 35/* 36 * Register definitions for the SiS 900 and SiS 7016 chipsets. The 37 * 7016 is actually an older chip and some of its registers differ 38 * from the 900, however the core operational registers are the same: 39 * the differences lie in the OnNow/Wake on LAN stuff which we don't 40 * use anyway. The 7016 needs an external MII compliant PHY while the --- 248 unchanged lines hidden (view full) --- 289 u_int32_t sis_cmdsts; 290#define sis_rxstat sis_cmdsts 291#define sis_txstat sis_cmdsts 292#define sis_ctl sis_cmdsts 293 u_int32_t sis_ptr; 294 /* Driver software section */ 295 struct mbuf *sis_mbuf; 296 struct sis_desc *sis_nextdesc; | 33 */ 34 35/* 36 * Register definitions for the SiS 900 and SiS 7016 chipsets. The 37 * 7016 is actually an older chip and some of its registers differ 38 * from the 900, however the core operational registers are the same: 39 * the differences lie in the OnNow/Wake on LAN stuff which we don't 40 * use anyway. The 7016 needs an external MII compliant PHY while the --- 248 unchanged lines hidden (view full) --- 289 u_int32_t sis_cmdsts; 290#define sis_rxstat sis_cmdsts 291#define sis_txstat sis_cmdsts 292#define sis_ctl sis_cmdsts 293 u_int32_t sis_ptr; 294 /* Driver software section */ 295 struct mbuf *sis_mbuf; 296 struct sis_desc *sis_nextdesc; |
297 bus_dmamap_t sis_map; |
|
297}; 298 299#define SIS_CMDSTS_BUFLEN 0x00000FFF 300#define SIS_CMDSTS_PKT_OK 0x08000000 301#define SIS_CMDSTS_CRC 0x10000000 302#define SIS_CMDSTS_INTR 0x20000000 303#define SIS_CMDSTS_MORE 0x40000000 304#define SIS_CMDSTS_OWN 0x80000000 --- 26 unchanged lines hidden (view full) --- 331#define SIS_TXSTAT_DEFERED 0x00800000 332#define SIS_TXSTAT_CARR_LOST 0x01000000 333#define SIS_TXSTAT_UNDERRUN 0x02000000 334#define SIS_TXSTAT_TX_ABORT 0x04000000 335 336#define SIS_RX_LIST_CNT 64 337#define SIS_TX_LIST_CNT 128 338 | 298}; 299 300#define SIS_CMDSTS_BUFLEN 0x00000FFF 301#define SIS_CMDSTS_PKT_OK 0x08000000 302#define SIS_CMDSTS_CRC 0x10000000 303#define SIS_CMDSTS_INTR 0x20000000 304#define SIS_CMDSTS_MORE 0x40000000 305#define SIS_CMDSTS_OWN 0x80000000 --- 26 unchanged lines hidden (view full) --- 332#define SIS_TXSTAT_DEFERED 0x00800000 333#define SIS_TXSTAT_CARR_LOST 0x01000000 334#define SIS_TXSTAT_UNDERRUN 0x02000000 335#define SIS_TXSTAT_TX_ABORT 0x04000000 336 337#define SIS_RX_LIST_CNT 64 338#define SIS_TX_LIST_CNT 128 339 |
340#define SIS_RX_LIST_SZ SIS_RX_LIST_CNT * sizeof(struct sis_desc) 341#define SIS_TX_LIST_SZ SIS_TX_LIST_CNT * sizeof(struct sis_desc) 342 |
|
339struct sis_list_data { | 343struct sis_list_data { |
344#ifdef foo |
|
340 struct sis_desc sis_rx_list[SIS_RX_LIST_CNT]; 341 struct sis_desc sis_tx_list[SIS_TX_LIST_CNT]; | 345 struct sis_desc sis_rx_list[SIS_RX_LIST_CNT]; 346 struct sis_desc sis_tx_list[SIS_TX_LIST_CNT]; |
347#endif 348 struct sis_desc *sis_rx_list; 349 struct sis_desc *sis_tx_list; 350 bus_dma_tag_t sis_rx_tag; 351 bus_dmamap_t sis_rx_dmamap; 352 bus_dma_tag_t sis_tx_tag; 353 bus_dmamap_t sis_tx_dmamap; |
|
342}; 343 344struct sis_ring_data { 345 int sis_rx_prod; 346 int sis_tx_prod; 347 int sis_tx_cons; 348 int sis_tx_cnt; | 354}; 355 356struct sis_ring_data { 357 int sis_rx_prod; 358 int sis_tx_prod; 359 int sis_tx_cons; 360 int sis_tx_cnt; |
361 u_int32_t sis_rx_paddr; 362 u_int32_t sis_tx_paddr; |
|
349}; 350 351 352/* 353 * SiS PCI vendor ID. 354 */ 355#define SIS_VENDORID 0x1039 356 --- 36 unchanged lines hidden (view full) --- 393 bus_space_tag_t sis_btag; 394 struct resource *sis_res; 395 struct resource *sis_irq; 396 void *sis_intrhand; 397 device_t sis_miibus; 398 u_int8_t sis_unit; 399 u_int8_t sis_type; 400 u_int8_t sis_link; | 363}; 364 365 366/* 367 * SiS PCI vendor ID. 368 */ 369#define SIS_VENDORID 0x1039 370 --- 36 unchanged lines hidden (view full) --- 407 bus_space_tag_t sis_btag; 408 struct resource *sis_res; 409 struct resource *sis_irq; 410 void *sis_intrhand; 411 device_t sis_miibus; 412 u_int8_t sis_unit; 413 u_int8_t sis_type; 414 u_int8_t sis_link; |
401 struct sis_list_data *sis_ldata; | 415 struct sis_list_data sis_ldata; 416 bus_dma_tag_t sis_parent_tag; 417 bus_dma_tag_t sis_tag; |
402 struct sis_ring_data sis_cdata; 403 struct callout_handle sis_stat_ch; 404 struct mtx sis_mtx; 405}; 406 407#define SIS_LOCK(_sc) mtx_lock(&(_sc)->sis_mtx) 408#define SIS_UNLOCK(_sc) mtx_unlock(&(_sc)->sis_mtx) 409 --- 43 unchanged lines hidden (view full) --- 453 454#define SIS_PSTATE_MASK 0x0003 455#define SIS_PSTATE_D0 0x0000 456#define SIS_PSTATE_D1 0x0001 457#define SIS_PSTATE_D2 0x0002 458#define SIS_PSTATE_D3 0x0003 459#define SIS_PME_EN 0x0010 460#define SIS_PME_STATUS 0x8000 | 418 struct sis_ring_data sis_cdata; 419 struct callout_handle sis_stat_ch; 420 struct mtx sis_mtx; 421}; 422 423#define SIS_LOCK(_sc) mtx_lock(&(_sc)->sis_mtx) 424#define SIS_UNLOCK(_sc) mtx_unlock(&(_sc)->sis_mtx) 425 --- 43 unchanged lines hidden (view full) --- 469 470#define SIS_PSTATE_MASK 0x0003 471#define SIS_PSTATE_D0 0x0000 472#define SIS_PSTATE_D1 0x0001 473#define SIS_PSTATE_D2 0x0002 474#define SIS_PSTATE_D3 0x0003 475#define SIS_PME_EN 0x0010 476#define SIS_PME_STATUS 0x8000 |
461 462#ifdef __alpha__ 463#undef vtophys 464#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va) 465#endif | |