/* * Function name: twa_bus_scan_cb * Description: Callback from CAM on a bus scan request. * * Input: periph -- we don't use this * ccb -- bus scan request ccb that we sent to CAM * Output: None * Return value: None */ static TW_VOID twa_bus_scan_cb(struct cam_periph *periph, union ccb *ccb) { tw_osli_dbg_printf(3, "entering"); if (ccb->ccb_h.status != CAM_REQ_CMP) kprintf("cam_scan_callback: failure status = %x\n", ccb->ccb_h.status); else tw_osli_dbg_printf(3, "success"); xpt_free_path(ccb->ccb_h.path); kfree(ccb, M_TEMP); }
/* * Function name: twa_probe * Description: Called at driver load time. Claims 9000 ctlrs. * * Input: dev -- bus device corresponding to the ctlr * Output: None * Return value: <= 0 -- success * > 0 -- failure */ static TW_INT32 twa_probe(device_t dev) { static TW_UINT8 first_ctlr = 1; tw_osli_dbg_printf(3, "entered"); if (tw_cl_ctlr_supported(pci_get_vendor(dev), pci_get_device(dev))) { device_set_desc(dev, TW_OSLI_DEVICE_NAME); /* Print the driver version only once. */ if (first_ctlr) { printf("3ware device driver for 9000 series storage " "controllers, version: %s\n", TW_OSL_DRIVER_VERSION_STRING); first_ctlr = 0; } return(0); } return(ENXIO); }