ips.h (122999) | ips.h (126364) |
---|---|
1/*- 2 * Copyright (c) 2002 Adaptec Inc. 3 * All rights reserved. 4 * 5 * Written by: David Jeffery 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 11 unchanged lines hidden (view full) --- 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * | 1/*- 2 * Copyright (c) 2002 Adaptec Inc. 3 * All rights reserved. 4 * 5 * Written by: David Jeffery 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 11 unchanged lines hidden (view full) --- 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * |
28 * $FreeBSD: head/sys/dev/ips/ips.h 122999 2003-11-27 08:37:36Z mbr $ | 28 * $FreeBSD: head/sys/dev/ips/ips.h 126364 2004-02-28 19:14:41Z scottl $ |
29 */ 30 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/kernel.h> 35#include <sys/bus.h> 36#include <sys/conf.h> 37#include <sys/types.h> 38#include <sys/queue.h> 39#include <sys/bio.h> 40#include <sys/malloc.h> 41#include <sys/mutex.h> | 29 */ 30 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/kernel.h> 35#include <sys/bus.h> 36#include <sys/conf.h> 37#include <sys/types.h> 38#include <sys/queue.h> 39#include <sys/bio.h> 40#include <sys/malloc.h> 41#include <sys/mutex.h> |
42#include <sys/sema.h> |
|
42#include <sys/time.h> 43 44#include <machine/bus_memio.h> 45#include <machine/bus.h> 46#include <sys/rman.h> 47#include <machine/resource.h> 48 49#include <dev/pci/pcireg.h> --- 321 unchanged lines hidden (view full) --- 371typedef struct ips_command{ 372 u_int8_t command_number; 373 u_int8_t id; 374 u_int8_t timeout; 375 struct ips_softc * sc; 376 bus_dmamap_t command_dmamap; 377 void * command_buffer; 378 u_int32_t command_phys_addr;/*WARNING! must be changed if 64bit addressing ever used*/ | 43#include <sys/time.h> 44 45#include <machine/bus_memio.h> 46#include <machine/bus.h> 47#include <sys/rman.h> 48#include <machine/resource.h> 49 50#include <dev/pci/pcireg.h> --- 321 unchanged lines hidden (view full) --- 372typedef struct ips_command{ 373 u_int8_t command_number; 374 u_int8_t id; 375 u_int8_t timeout; 376 struct ips_softc * sc; 377 bus_dmamap_t command_dmamap; 378 void * command_buffer; 379 u_int32_t command_phys_addr;/*WARNING! must be changed if 64bit addressing ever used*/ |
380 struct sema cmd_sema; |
|
379 ips_cmd_status_t status; 380 SLIST_ENTRY(ips_command) next; 381 bus_dma_tag_t data_dmatag; 382 bus_dmamap_t data_dmamap; 383 void * data_buffer; 384 void * arg; 385 void (* callback)(struct ips_command *command); 386}ips_command_t; --- 35 unchanged lines hidden (view full) --- 422 ips_command_t commandarray[IPS_MAX_CMD_NUM]; 423 SLIST_HEAD(command_list, ips_command) free_cmd_list; 424 STAILQ_HEAD(command_wait_list,ips_wait_list) cmd_wait_list; 425 int (* ips_adapter_reinit)(struct ips_softc *sc, 426 int force); 427 void (* ips_adapter_intr)(void *sc); 428 void (* ips_issue_cmd)(ips_command_t *command); 429 ips_copper_queue_t * copper_queue; | 381 ips_cmd_status_t status; 382 SLIST_ENTRY(ips_command) next; 383 bus_dma_tag_t data_dmatag; 384 bus_dmamap_t data_dmamap; 385 void * data_buffer; 386 void * arg; 387 void (* callback)(struct ips_command *command); 388}ips_command_t; --- 35 unchanged lines hidden (view full) --- 424 ips_command_t commandarray[IPS_MAX_CMD_NUM]; 425 SLIST_HEAD(command_list, ips_command) free_cmd_list; 426 STAILQ_HEAD(command_wait_list,ips_wait_list) cmd_wait_list; 427 int (* ips_adapter_reinit)(struct ips_softc *sc, 428 int force); 429 void (* ips_adapter_intr)(void *sc); 430 void (* ips_issue_cmd)(ips_command_t *command); 431 ips_copper_queue_t * copper_queue; |
430 struct mtx cmd_mtx; | 432 struct mtx queue_mtx; 433 struct bio_queue_head queue; 434 |
431}ips_softc_t; 432 433/* function defines from ips_ioctl.c */ 434extern int ips_ioctl_request(ips_softc_t *sc, u_long ioctl_cmd, caddr_t addr, 435 int32_t flags); 436/* function defines from ips_disk.c */ 437extern void ipsd_finish(struct bio *iobuf); 438 439/* function defines from ips_commands.c */ 440extern int ips_flush_cache(ips_softc_t *sc); | 435}ips_softc_t; 436 437/* function defines from ips_ioctl.c */ 438extern int ips_ioctl_request(ips_softc_t *sc, u_long ioctl_cmd, caddr_t addr, 439 int32_t flags); 440/* function defines from ips_disk.c */ 441extern void ipsd_finish(struct bio *iobuf); 442 443/* function defines from ips_commands.c */ 444extern int ips_flush_cache(ips_softc_t *sc); |
441extern void ips_start_io_request(ips_softc_t *sc, struct bio *iobuf); | 445extern void ips_start_io_request(ips_softc_t *sc); |
442extern int ips_get_drive_info(ips_softc_t *sc); 443extern int ips_get_adapter_info(ips_softc_t *sc); 444extern int ips_ffdc_reset(ips_softc_t *sc); 445extern int ips_update_nvram(ips_softc_t *sc); 446extern int ips_clear_adapter(ips_softc_t *sc); 447 448/* function defines from ips.c */ 449extern int ips_get_free_cmd(ips_softc_t *sc, int (*callback)(ips_command_t *), 450 void *data, unsigned long flags); 451extern void ips_insert_free_cmd(ips_softc_t *sc, ips_command_t *command); 452extern int ips_adapter_init(ips_softc_t *sc); 453extern int ips_morpheus_reinit(ips_softc_t *sc, int force); 454extern int ips_adapter_free(ips_softc_t *sc); 455extern void ips_morpheus_intr(void *sc); 456extern void ips_issue_morpheus_cmd(ips_command_t *command); 457extern int ips_copperhead_reinit(ips_softc_t *sc, int force); 458extern void ips_copperhead_intr(void *sc); 459extern void ips_issue_copperhead_cmd(ips_command_t *command); 460 | 446extern int ips_get_drive_info(ips_softc_t *sc); 447extern int ips_get_adapter_info(ips_softc_t *sc); 448extern int ips_ffdc_reset(ips_softc_t *sc); 449extern int ips_update_nvram(ips_softc_t *sc); 450extern int ips_clear_adapter(ips_softc_t *sc); 451 452/* function defines from ips.c */ 453extern int ips_get_free_cmd(ips_softc_t *sc, int (*callback)(ips_command_t *), 454 void *data, unsigned long flags); 455extern void ips_insert_free_cmd(ips_softc_t *sc, ips_command_t *command); 456extern int ips_adapter_init(ips_softc_t *sc); 457extern int ips_morpheus_reinit(ips_softc_t *sc, int force); 458extern int ips_adapter_free(ips_softc_t *sc); 459extern void ips_morpheus_intr(void *sc); 460extern void ips_issue_morpheus_cmd(ips_command_t *command); 461extern int ips_copperhead_reinit(ips_softc_t *sc, int force); 462extern void ips_copperhead_intr(void *sc); 463extern void ips_issue_copperhead_cmd(ips_command_t *command); 464 |