Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ipmi/ipmivars.h
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | |||||
struct ipmi_smic { | struct ipmi_smic { | ||||
}; | }; | ||||
struct ipmi_ssif { | struct ipmi_ssif { | ||||
device_t smbus; | device_t smbus; | ||||
int smbus_address; | int smbus_address; | ||||
}; | }; | ||||
/* | |||||
* More than enough for any request / reply when we're using the | |||||
* static buffer in restricted situtions. Request + reply lengths must | |||||
* be less than this. | |||||
*/ | |||||
#define IPMI_STATIC_REQ_LEN 32 | |||||
struct ipmi_softc { | struct ipmi_softc { | ||||
device_t ipmi_dev; | device_t ipmi_dev; | ||||
union { | union { | ||||
struct ipmi_kcs kcs; | struct ipmi_kcs kcs; | ||||
struct ipmi_smic smic; | struct ipmi_smic smic; | ||||
struct ipmi_ssif ssif; | struct ipmi_ssif ssif; | ||||
} _iface; | } _iface; | ||||
int ipmi_io_rid; | int ipmi_io_rid; | ||||
int ipmi_io_type; | int ipmi_io_type; | ||||
struct mtx ipmi_io_lock; | struct mtx ipmi_io_lock; | ||||
struct resource *ipmi_io_res[MAX_RES]; | struct resource *ipmi_io_res[MAX_RES]; | ||||
int ipmi_io_spacing; | int ipmi_io_spacing; | ||||
int ipmi_irq_rid; | int ipmi_irq_rid; | ||||
struct resource *ipmi_irq_res; | struct resource *ipmi_irq_res; | ||||
void *ipmi_irq; | void *ipmi_irq; | ||||
int ipmi_detaching; | int ipmi_detaching; | ||||
int ipmi_opened; | int ipmi_opened; | ||||
uint8_t ipmi_dev_support; /* IPMI_ADS_* */ | |||||
struct cdev *ipmi_cdev; | struct cdev *ipmi_cdev; | ||||
TAILQ_HEAD(,ipmi_request) ipmi_pending_requests; | TAILQ_HEAD(,ipmi_request) ipmi_pending_requests; | ||||
int ipmi_driver_requests_polled; | int ipmi_driver_requests_polled; | ||||
eventhandler_tag ipmi_power_cycle_tag; | |||||
eventhandler_tag ipmi_watchdog_tag; | eventhandler_tag ipmi_watchdog_tag; | ||||
int ipmi_watchdog_active; | int ipmi_watchdog_active; | ||||
struct intr_config_hook ipmi_ich; | struct intr_config_hook ipmi_ich; | ||||
struct mtx ipmi_requests_lock; | struct mtx ipmi_requests_lock; | ||||
struct cv ipmi_request_added; | struct cv ipmi_request_added; | ||||
struct proc *ipmi_kthread; | struct proc *ipmi_kthread; | ||||
union { | |||||
struct ipmi_request _req; | |||||
char buff[sizeof(ipmi_request) + IPMI_STATIC_REQ_LEN]; | |||||
} _u; | |||||
driver_intr_t *ipmi_intr; | driver_intr_t *ipmi_intr; | ||||
int (*ipmi_startup)(struct ipmi_softc *); | int (*ipmi_startup)(struct ipmi_softc *); | ||||
int (*ipmi_enqueue_request)(struct ipmi_softc *, struct ipmi_request *); | int (*ipmi_enqueue_request)(struct ipmi_softc *, struct ipmi_request *); | ||||
int (*ipmi_driver_request)(struct ipmi_softc *, struct ipmi_request *, int); | int (*ipmi_driver_request)(struct ipmi_softc *, struct ipmi_request *, int); | ||||
}; | }; | ||||
#define ipmi_static_req _u.req | |||||
jtl: Is this what you used as ipmi_req before? Also, as I noted before, does… | |||||
impAuthorUnsubmitted Done Inline ActionsYes. I think I'll simplify as you suggest. I think I may have been paranoid about the stack for no good reason. imp: Yes. I think I'll simplify as you suggest. I think I may have been paranoid about the stack for… | |||||
#define ipmi_ssif_smbus_address _iface.ssif.smbus_address | #define ipmi_ssif_smbus_address _iface.ssif.smbus_address | ||||
#define ipmi_ssif_smbus _iface.ssif.smbus | #define ipmi_ssif_smbus _iface.ssif.smbus | ||||
struct ipmi_ipmb { | struct ipmi_ipmb { | ||||
u_char foo; | u_char foo; | ||||
}; | }; | ||||
#define KCS_MODE 0x01 | #define KCS_MODE 0x01 | ||||
▲ Show 20 Lines • Show All 126 Lines • Show Last 20 Lines |
Is this what you used as ipmi_req before? Also, as I noted before, does IPMI_ALLOC_DRIVER_REQUEST() - which uses alloca - obviate the need for this?