Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mpr/mprvar.h
/*- | /*- | ||||
* Copyright (c) 2009 Yahoo! Inc. | * Copyright (c) 2009 Yahoo! Inc. | ||||
* Copyright (c) 2011-2015 LSI Corp. | * Copyright (c) 2011-2015 LSI Corp. | ||||
* Copyright (c) 2013-2015 Avago Technologies | * Copyright (c) 2013-2016 Avago Technologies | ||||
* All rights reserved. | * All rights reserved. | ||||
* | * | ||||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
* modification, are permitted provided that the following conditions | * modification, are permitted provided that the following conditions | ||||
* are met: | * are met: | ||||
* 1. Redistributions of source code must retain the above copyright | * 1. Redistributions of source code must retain the above copyright | ||||
* notice, this list of conditions and the following disclaimer. | * notice, this list of conditions and the following disclaimer. | ||||
* 2. Redistributions in binary form must reproduce the above copyright | * 2. Redistributions in binary form must reproduce the above copyright | ||||
▲ Show 20 Lines • Show All 567 Lines • ▼ Show 20 Lines | |||||
#define mpr_vprintf(sc, args...) \ | #define mpr_vprintf(sc, args...) \ | ||||
do { \ | do { \ | ||||
if (bootverbose) \ | if (bootverbose) \ | ||||
mpr_printf(sc, ##args); \ | mpr_printf(sc, ##args); \ | ||||
} while (0) | } while (0) | ||||
#define mpr_dprint(sc, level, msg, args...) \ | #define mpr_dprint(sc, level, msg, args...) \ | ||||
do { \ | do { \ | ||||
if ((sc)->mpr_debug & level) \ | if ((sc)->mpr_debug & (level)) \ | ||||
device_printf((sc)->mpr_dev, msg, ##args); \ | device_printf((sc)->mpr_dev, msg, ##args); \ | ||||
} while (0) | } while (0) | ||||
#define mpr_dprint_field(sc, level, msg, args...) \ | #define mpr_dprint_field(sc, level, msg, args...) \ | ||||
do { \ | do { \ | ||||
if ((sc)->mpr_debug & level) \ | if ((sc)->mpr_debug & (level)) \ | ||||
printf("\t" msg, ##args); \ | printf("\t" msg, ##args); \ | ||||
} while (0) | } while (0) | ||||
#define MPR_PRINTFIELD_START(sc, tag...) \ | #define MPR_PRINTFIELD_START(sc, tag...) \ | ||||
mpr_dprint((sc), MPR_INFO, ##tag); \ | mpr_dprint((sc), MPR_INFO, ##tag); \ | ||||
mpr_dprint_field((sc), MPR_INFO, ":\n") | mpr_dprint_field((sc), MPR_INFO, ":\n") | ||||
#define MPR_PRINTFIELD_END(sc, tag) \ | #define MPR_PRINTFIELD_END(sc, tag) \ | ||||
mpr_dprint((sc), MPR_INFO, tag "\n") | mpr_dprint((sc), MPR_INFO, tag "\n") | ||||
▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
int mpr_attach(struct mpr_softc *sc); | int mpr_attach(struct mpr_softc *sc); | ||||
int mpr_free(struct mpr_softc *sc); | int mpr_free(struct mpr_softc *sc); | ||||
void mpr_intr(void *); | void mpr_intr(void *); | ||||
void mpr_intr_msi(void *); | void mpr_intr_msi(void *); | ||||
void mpr_intr_locked(void *); | void mpr_intr_locked(void *); | ||||
int mpr_register_events(struct mpr_softc *, uint8_t *, mpr_evt_callback_t *, | int mpr_register_events(struct mpr_softc *, uint8_t *, mpr_evt_callback_t *, | ||||
void *, struct mpr_event_handle **); | void *, struct mpr_event_handle **); | ||||
int mpr_restart(struct mpr_softc *); | int mpr_restart(struct mpr_softc *); | ||||
int mpr_update_events(struct mpr_softc *, struct mpr_event_handle *, | int mpr_update_events(struct mpr_softc *, struct mpr_event_handle *, uint8_t *); | ||||
uint8_t *); | |||||
int mpr_deregister_events(struct mpr_softc *, struct mpr_event_handle *); | int mpr_deregister_events(struct mpr_softc *, struct mpr_event_handle *); | ||||
int mpr_push_sge(struct mpr_command *, MPI2_SGE_SIMPLE64 *, size_t, int); | int mpr_push_sge(struct mpr_command *, MPI2_SGE_SIMPLE64 *, size_t, int); | ||||
int mpr_push_ieee_sge(struct mpr_command *, void *, int); | int mpr_push_ieee_sge(struct mpr_command *, void *, int); | ||||
int mpr_add_dmaseg(struct mpr_command *, vm_paddr_t, size_t, u_int, int); | int mpr_add_dmaseg(struct mpr_command *, vm_paddr_t, size_t, u_int, int); | ||||
int mpr_attach_sas(struct mpr_softc *sc); | int mpr_attach_sas(struct mpr_softc *sc); | ||||
int mpr_detach_sas(struct mpr_softc *sc); | int mpr_detach_sas(struct mpr_softc *sc); | ||||
int mpr_read_config_page(struct mpr_softc *, struct mpr_config_params *); | int mpr_read_config_page(struct mpr_softc *, struct mpr_config_params *); | ||||
int mpr_write_config_page(struct mpr_softc *, struct mpr_config_params *); | int mpr_write_config_page(struct mpr_softc *, struct mpr_config_params *); | ||||
void mpr_memaddr_cb(void *, bus_dma_segment_t *, int , int ); | void mpr_memaddr_cb(void *, bus_dma_segment_t *, int , int ); | ||||
void mpr_init_sge(struct mpr_command *cm, void *req, void *sge); | void mpr_init_sge(struct mpr_command *cm, void *req, void *sge); | ||||
int mpr_attach_user(struct mpr_softc *); | int mpr_attach_user(struct mpr_softc *); | ||||
void mpr_detach_user(struct mpr_softc *); | void mpr_detach_user(struct mpr_softc *); | ||||
void mprsas_record_event(struct mpr_softc *sc, | void mprsas_record_event(struct mpr_softc *sc, | ||||
MPI2_EVENT_NOTIFICATION_REPLY *event_reply); | MPI2_EVENT_NOTIFICATION_REPLY *event_reply); | ||||
int mpr_map_command(struct mpr_softc *sc, struct mpr_command *cm); | int mpr_map_command(struct mpr_softc *sc, struct mpr_command *cm); | ||||
int mpr_wait_command(struct mpr_softc *sc, struct mpr_command *cm, | int mpr_wait_command(struct mpr_softc *sc, struct mpr_command *cm, int timeout, | ||||
int timeout, int sleep_flag); | int sleep_flag); | ||||
int mpr_request_polled(struct mpr_softc *sc, struct mpr_command *cm); | int mpr_request_polled(struct mpr_softc *sc, struct mpr_command *cm); | ||||
int mpr_config_get_bios_pg3(struct mpr_softc *sc, Mpi2ConfigReply_t | int mpr_config_get_bios_pg3(struct mpr_softc *sc, Mpi2ConfigReply_t | ||||
*mpi_reply, Mpi2BiosPage3_t *config_page); | *mpi_reply, Mpi2BiosPage3_t *config_page); | ||||
int mpr_config_get_raid_volume_pg0(struct mpr_softc *sc, Mpi2ConfigReply_t | int mpr_config_get_raid_volume_pg0(struct mpr_softc *sc, Mpi2ConfigReply_t | ||||
*mpi_reply, Mpi2RaidVolPage0_t *config_page, u32 page_address); | *mpi_reply, Mpi2RaidVolPage0_t *config_page, u32 page_address); | ||||
int mpr_config_get_ioc_pg8(struct mpr_softc *sc, Mpi2ConfigReply_t *, | int mpr_config_get_ioc_pg8(struct mpr_softc *sc, Mpi2ConfigReply_t *, | ||||
Mpi2IOCPage8_t *); | Mpi2IOCPage8_t *); | ||||
Show All 38 Lines | |||||
void mpr_mapping_enclosure_dev_status_change_event(struct mpr_softc *, | void mpr_mapping_enclosure_dev_status_change_event(struct mpr_softc *, | ||||
Mpi2EventDataSasEnclDevStatusChange_t *event_data); | Mpi2EventDataSasEnclDevStatusChange_t *event_data); | ||||
void mpr_mapping_ir_config_change_event(struct mpr_softc *sc, | void mpr_mapping_ir_config_change_event(struct mpr_softc *sc, | ||||
Mpi2EventDataIrConfigChangeList_t *event_data); | Mpi2EventDataIrConfigChangeList_t *event_data); | ||||
void mprsas_evt_handler(struct mpr_softc *sc, uintptr_t data, | void mprsas_evt_handler(struct mpr_softc *sc, uintptr_t data, | ||||
MPI2_EVENT_NOTIFICATION_REPLY *event); | MPI2_EVENT_NOTIFICATION_REPLY *event); | ||||
void mprsas_prepare_remove(struct mprsas_softc *sassc, uint16_t handle); | void mprsas_prepare_remove(struct mprsas_softc *sassc, uint16_t handle); | ||||
void mprsas_prepare_volume_remove(struct mprsas_softc *sassc, | void mprsas_prepare_volume_remove(struct mprsas_softc *sassc, uint16_t handle); | ||||
uint16_t handle); | |||||
int mprsas_startup(struct mpr_softc *sc); | int mprsas_startup(struct mpr_softc *sc); | ||||
struct mprsas_target * mprsas_find_target_by_handle(struct mprsas_softc *, | struct mprsas_target * mprsas_find_target_by_handle(struct mprsas_softc *, int, | ||||
int, uint16_t); | uint16_t); | ||||
void mprsas_realloc_targets(struct mpr_softc *sc, int maxtargets); | void mprsas_realloc_targets(struct mpr_softc *sc, int maxtargets); | ||||
struct mpr_command * mprsas_alloc_tm(struct mpr_softc *sc); | struct mpr_command * mprsas_alloc_tm(struct mpr_softc *sc); | ||||
void mprsas_free_tm(struct mpr_softc *sc, struct mpr_command *tm); | void mprsas_free_tm(struct mpr_softc *sc, struct mpr_command *tm); | ||||
void mprsas_release_simq_reinit(struct mprsas_softc *sassc); | void mprsas_release_simq_reinit(struct mprsas_softc *sassc); | ||||
int mprsas_send_reset(struct mpr_softc *sc, struct mpr_command *tm, | int mprsas_send_reset(struct mpr_softc *sc, struct mpr_command *tm, | ||||
uint8_t type); | uint8_t type); | ||||
SYSCTL_DECL(_hw_mpr); | SYSCTL_DECL(_hw_mpr); | ||||
Show All 35 Lines |