Lines Matching defs:device

22 #include <linux/device.h>
57 MODULE_PARM_DESC(exclusive_login, "Exclusive login to sbp2 device "
67 * When scsi_mod probes the device, let the inquiry command look like that
71 * Suppress sending of mode_sense for mode page 8 if the device pretends to
91 * Useful if a blacklist entry interfered with a non-broken device.
104 MODULE_PARM_DESC(workarounds, "Work around device bugs (default = 0"
131 * to the logical unit. Thus, I/O to the device will automatically
132 * fail and get retried if it happens in a window where the device
175 static const struct device *tgt_dev(const struct sbp2_target *tgt)
177 return &tgt->unit->device;
180 static const struct device *lu_dev(const struct sbp2_logical_unit *lu)
182 return &lu->tgt->unit->device;
326 * indicator for the type of bridge chip of a device. It yields a few
493 struct fw_device *device = target_parent_device(lu->tgt);
508 fw_send_request(device->card, &orb->t, TCODE_WRITE_BLOCK_REQUEST,
509 node_id, generation, device->max_speed, offset,
515 struct fw_device *device = target_parent_device(lu->tgt);
527 if (fw_cancel_transaction(device->card, &orb->t) == 0)
553 struct fw_device *device = target_parent_device(lu->tgt);
558 if (function == SBP2_LOGOUT_REQUEST && fw_device_is_shutdown(device))
567 dma_map_single(device->card->device, &orb->response,
569 if (dma_mapping_error(device->card->device, orb->response_bus))
601 dma_map_single(device->card->device, &orb->request,
603 if (dma_mapping_error(device->card->device, orb->base.request_bus))
634 dma_unmap_single(device->card->device, orb->base.request_bus,
637 dma_unmap_single(device->card->device, orb->response_bus,
649 struct fw_device *device = target_parent_device(lu->tgt);
652 fw_run_transaction(device->card, TCODE_WRITE_QUADLET_REQUEST,
653 lu->tgt->node_id, lu->generation, device->max_speed,
666 struct fw_device *device = target_parent_device(lu->tgt);
674 fw_send_request(device->card, t, TCODE_WRITE_QUADLET_REQUEST,
675 lu->tgt->node_id, lu->generation, device->max_speed,
773 * saner value after logging into the device.
779 * 15, which is what we're trying to set for all SBP-2 device anyway, so this
787 struct fw_device *device = target_parent_device(lu->tgt);
790 fw_run_transaction(device->card, TCODE_WRITE_QUADLET_REQUEST,
791 lu->tgt->node_id, lu->generation, device->max_speed,
802 struct fw_device *device = target_parent_device(tgt);
808 if (fw_device_is_shutdown(device))
811 generation = device->generation;
813 node_id = device->node_id;
814 local_node_id = device->card->node_id;
818 sbp2_send_management_orb(lu, device->node_id, generation,
880 if (generation != device->card->generation) {
895 generation = device->generation;
898 sbp2_send_management_orb(lu, device->node_id, generation,
912 struct fw_device *device = target_parent_device(tgt);
915 if (fw_device_is_shutdown(device))
918 generation = device->generation;
920 node_id = device->node_id;
921 local_node_id = device->card->node_id;
934 if (generation == device->card->generation ||
1126 struct fw_device *device = fw_parent_device(unit);
1133 if (device->is_local)
1141 dev_set_drvdata(&unit->device, tgt);
1145 tgt->guid = (u64)device->config_rom[3] << 32 | device->config_rom[4];
1147 if (fw_device_enable_phys_dma(device) < 0)
1152 if (scsi_add_host_with_dma(shost, &unit->device,
1153 device->card->device) < 0)
1157 tgt->directory_id = ((unit->directory - device->config_rom) * 4
1176 tgt->max_payload = min3(device->max_speed + 7, 10U,
1177 device->card->max_receive - 1);
1196 struct sbp2_target *tgt = dev_get_drvdata(&unit->device);
1214 struct fw_device *device = fw_parent_device(unit);
1215 struct sbp2_target *tgt = dev_get_drvdata(&unit->device);
1238 generation = device->generation;
1240 node_id = device->node_id;
1250 dev_notice(&unit->device, "released target %d:0:0\n", shost->host_no);
1280 static void sbp2_unmap_scatterlist(struct device *card_device,
1341 struct fw_device *device = target_parent_device(base_orb->lu->tgt);
1375 dma_unmap_single(device->card->device, orb->base.request_bus,
1377 sbp2_unmap_scatterlist(device->card->device, orb);
1384 struct fw_device *device, struct sbp2_logical_unit *lu)
1416 dma_map_single(device->card->device, orb->page_table,
1418 if (dma_mapping_error(device->card->device, orb->page_table_bus))
1446 struct sbp2_logical_unit *lu = cmd->device->hostdata;
1447 struct fw_device *device = target_parent_device(lu->tgt);
1462 COMMAND_ORB_SPEED(device->max_speed) |
1468 generation = device->generation;
1471 if (scsi_sg_count(cmd) && sbp2_map_scatterlist(orb, device, lu) < 0)
1478 dma_map_single(device->card->device, &orb->request,
1480 if (dma_mapping_error(device->card->device, orb->base.request_bus)) {
1481 sbp2_unmap_scatterlist(device->card->device, orb);
1552 struct sbp2_logical_unit *lu = cmd->device->hostdata;
1568 static ssize_t sbp2_sysfs_ieee1394_id_show(struct device *dev,