Print this page
XXXX introduce drv_sectohz


 338 #define LPORT_EVENT_INITIAL_LUN_MAPPED  0
 339 
 340 /*
 341  * This needs to go into common/ddi/sunddi.h
 342  */
 343 #define DDI_NT_STMF             "ddi_scsi_target:framework"
 344 #define DDI_NT_STMF_LP          "ddi_scsi_target:lu_provider"
 345 #define DDI_NT_STMF_PP          "ddi_scsi_target:port_provider"
 346 
 347 /*
 348  * VPD page bits.
 349  */
 350 #define STMF_VPD_LU_ID          0x01
 351 #define STMF_VPD_TARGET_ID      0x02
 352 #define STMF_VPD_TP_GROUP       0x04
 353 #define STMF_VPD_RELATIVE_TP_ID 0x08
 354 
 355 /*
 356  * Common macros to simplify coding
 357  */
 358 #define STMF_SEC2TICK(x_sec)    (drv_usectohz((x_sec) * 1000000))
 359 
 360 void stmf_trace(caddr_t ident, const char *fmt, ...);
 361 void *stmf_alloc(stmf_struct_id_t sid, int additional_size, int alloc_flags);
 362 void stmf_free(void *struct_ptr);
 363 struct scsi_task *stmf_task_alloc(struct stmf_local_port *lport,
 364     struct stmf_scsi_session *ss, uint8_t *lun, uint16_t cdb_length,
 365     uint16_t ext_id);
 366 void stmf_post_task(scsi_task_t *task, stmf_data_buf_t *dbuf);
 367 stmf_data_buf_t *stmf_alloc_dbuf(scsi_task_t *task, uint32_t size,
 368     uint32_t *pminsize, uint32_t flags);
 369 void stmf_free_dbuf(scsi_task_t *task, stmf_data_buf_t *dbuf);
 370 stmf_status_t stmf_setup_dbuf(scsi_task_t *task, stmf_data_buf_t *dbuf,
 371     uint32_t flags);
 372 void stmf_teardown_dbuf(scsi_task_t *task, stmf_data_buf_t *dbuf);
 373 stmf_status_t stmf_xfer_data(scsi_task_t *task, stmf_data_buf_t *dbuf,
 374     uint32_t ioflags);
 375 stmf_status_t stmf_send_scsi_status(scsi_task_t *task, uint32_t ioflags);
 376 void stmf_data_xfer_done(scsi_task_t *task, stmf_data_buf_t *dbuf,
 377     uint32_t iof);
 378 void stmf_send_status_done(scsi_task_t *task, stmf_status_t s, uint32_t iof);




 338 #define LPORT_EVENT_INITIAL_LUN_MAPPED  0
 339 
 340 /*
 341  * This needs to go into common/ddi/sunddi.h
 342  */
 343 #define DDI_NT_STMF             "ddi_scsi_target:framework"
 344 #define DDI_NT_STMF_LP          "ddi_scsi_target:lu_provider"
 345 #define DDI_NT_STMF_PP          "ddi_scsi_target:port_provider"
 346 
 347 /*
 348  * VPD page bits.
 349  */
 350 #define STMF_VPD_LU_ID          0x01
 351 #define STMF_VPD_TARGET_ID      0x02
 352 #define STMF_VPD_TP_GROUP       0x04
 353 #define STMF_VPD_RELATIVE_TP_ID 0x08
 354 
 355 /*
 356  * Common macros to simplify coding
 357  */
 358 #define STMF_SEC2TICK(x_sec)    drv_sectohz(x_sec)
 359 
 360 void stmf_trace(caddr_t ident, const char *fmt, ...);
 361 void *stmf_alloc(stmf_struct_id_t sid, int additional_size, int alloc_flags);
 362 void stmf_free(void *struct_ptr);
 363 struct scsi_task *stmf_task_alloc(struct stmf_local_port *lport,
 364     struct stmf_scsi_session *ss, uint8_t *lun, uint16_t cdb_length,
 365     uint16_t ext_id);
 366 void stmf_post_task(scsi_task_t *task, stmf_data_buf_t *dbuf);
 367 stmf_data_buf_t *stmf_alloc_dbuf(scsi_task_t *task, uint32_t size,
 368     uint32_t *pminsize, uint32_t flags);
 369 void stmf_free_dbuf(scsi_task_t *task, stmf_data_buf_t *dbuf);
 370 stmf_status_t stmf_setup_dbuf(scsi_task_t *task, stmf_data_buf_t *dbuf,
 371     uint32_t flags);
 372 void stmf_teardown_dbuf(scsi_task_t *task, stmf_data_buf_t *dbuf);
 373 stmf_status_t stmf_xfer_data(scsi_task_t *task, stmf_data_buf_t *dbuf,
 374     uint32_t ioflags);
 375 stmf_status_t stmf_send_scsi_status(scsi_task_t *task, uint32_t ioflags);
 376 void stmf_data_xfer_done(scsi_task_t *task, stmf_data_buf_t *dbuf,
 377     uint32_t iof);
 378 void stmf_send_status_done(scsi_task_t *task, stmf_status_t s, uint32_t iof);