Home
last modified time | relevance | path

Searched refs:sdev (Results 1 – 25 of 133) sorted by relevance

123456

/drivers/scsi/
Dscsi_scan.c209 static void scsi_unlock_floptical(struct scsi_device *sdev, in scsi_unlock_floptical() argument
221 scsi_execute_req(sdev, scsi_cmd, DMA_FROM_DEVICE, result, 0x2a, NULL, in scsi_unlock_floptical()
242 struct scsi_device *sdev; in scsi_alloc_sdev() local
247 sdev = kzalloc(sizeof(*sdev) + shost->transportt->device_size, in scsi_alloc_sdev()
249 if (!sdev) in scsi_alloc_sdev()
252 sdev->vendor = scsi_null_device_strs; in scsi_alloc_sdev()
253 sdev->model = scsi_null_device_strs; in scsi_alloc_sdev()
254 sdev->rev = scsi_null_device_strs; in scsi_alloc_sdev()
255 sdev->host = shost; in scsi_alloc_sdev()
256 sdev->id = starget->id; in scsi_alloc_sdev()
[all …]
Dscsi_sysfs.c285 struct scsi_device *sdev; in scsi_device_cls_release() local
287 sdev = class_to_sdev(class_dev); in scsi_device_cls_release()
288 put_device(&sdev->sdev_gendev); in scsi_device_cls_release()
293 struct scsi_device *sdev; in scsi_device_dev_release_usercontext() local
299 sdev = container_of(work, struct scsi_device, ew.work); in scsi_device_dev_release_usercontext()
301 parent = sdev->sdev_gendev.parent; in scsi_device_dev_release_usercontext()
304 spin_lock_irqsave(sdev->host->host_lock, flags); in scsi_device_dev_release_usercontext()
306 list_del(&sdev->siblings); in scsi_device_dev_release_usercontext()
307 list_del(&sdev->same_target_siblings); in scsi_device_dev_release_usercontext()
308 list_del(&sdev->starved_entry); in scsi_device_dev_release_usercontext()
[all …]
Dscsi_ioctl.c88 static int ioctl_internal_command(struct scsi_device *sdev, char *cmd, in ioctl_internal_command() argument
96 result = scsi_execute_req(sdev, cmd, DMA_NONE, NULL, 0, in ioctl_internal_command()
106 sdev->lockable = 0; in ioctl_internal_command()
113 if (sdev->removable) in ioctl_internal_command()
116 if (sdev->removable) { in ioctl_internal_command()
117 sdev->changed = 1; in ioctl_internal_command()
122 sdev_printk(KERN_INFO, sdev, in ioctl_internal_command()
134 int scsi_set_medium_removal(struct scsi_device *sdev, char state) in scsi_set_medium_removal() argument
139 if (!sdev->removable || !sdev->lockable) in scsi_set_medium_removal()
149 ret = ioctl_internal_command(sdev, scsi_cmd, in scsi_set_medium_removal()
[all …]
Dscsi.c342 struct scsi_device *sdev = cmd->device; in scsi_put_command() local
351 __scsi_put_command(cmd->device->host, cmd, &sdev->sdev_gendev); in scsi_put_command()
802 struct scsi_device *sdev = cmd->device; in scsi_finish_command() local
803 struct scsi_target *starget = scsi_target(sdev); in scsi_finish_command()
804 struct Scsi_Host *shost = sdev->host; in scsi_finish_command()
808 scsi_device_unbusy(sdev); in scsi_finish_command()
820 sdev->device_blocked = 0; in scsi_finish_command()
829 SCSI_LOG_MLCOMPLETE(4, sdev_printk(KERN_INFO, sdev, in scsi_finish_command()
870 void scsi_adjust_queue_depth(struct scsi_device *sdev, int tagged, int tags) in scsi_adjust_queue_depth() argument
880 spin_lock_irqsave(sdev->request_queue->queue_lock, flags); in scsi_adjust_queue_depth()
[all …]
Dscsi_lib.c208 int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, in scsi_execute() argument
217 req = blk_get_request(sdev->request_queue, write, __GFP_WAIT); in scsi_execute()
219 if (bufflen && blk_rq_map_kern(sdev->request_queue, req, in scsi_execute()
257 int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd, in scsi_execute_req() argument
270 result = scsi_execute(sdev, cmd, data_direction, buffer, bufflen, in scsi_execute_req()
419 int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, in scsi_execute_async() argument
433 req = blk_get_request(sdev->request_queue, write, gfp); in scsi_execute_async()
490 void scsi_device_unbusy(struct scsi_device *sdev) in scsi_device_unbusy() argument
492 struct Scsi_Host *shost = sdev->host; in scsi_device_unbusy()
493 struct scsi_target *starget = scsi_target(sdev); in scsi_device_unbusy()
[all …]
Dses.c51 struct scsi_device *sdev = to_scsi_device(dev); in ses_probe() local
54 if (sdev->type != TYPE_ENCLOSURE) in ses_probe()
58 sdev_printk(KERN_NOTICE, sdev, "Attached Enclosure device\n"); in ses_probe()
67 static int ses_recv_diag(struct scsi_device *sdev, int page_code, in ses_recv_diag() argument
79 return scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, buf, bufflen, in ses_recv_diag()
83 static int ses_send_diag(struct scsi_device *sdev, int page_code, in ses_send_diag() argument
97 result = scsi_execute_req(sdev, cmd, DMA_TO_DEVICE, buf, bufflen, in ses_send_diag()
100 sdev_printk(KERN_ERR, sdev, "SEND DIAGNOSTIC result: %8x\n", in ses_send_diag()
110 struct scsi_device *sdev = to_scsi_device(edev->edev.parent); in ses_set_page2_descriptor() local
133 return ses_send_diag(sdev, 2, ses_dev->page2, ses_dev->page2_len); in ses_set_page2_descriptor()
[all …]
Dscsi_transport_spi.c101 static int spi_execute(struct scsi_device *sdev, const void *cmd, in spi_execute() argument
110 result = scsi_execute(sdev, cmd, dir, buffer, bufflen, in spi_execute()
208 struct scsi_device *sdev = to_scsi_device(dev); in spi_device_configure() local
209 struct scsi_target *starget = sdev->sdev_target; in spi_device_configure()
214 spi_support_sync(starget) = scsi_device_sync(sdev); in spi_device_configure()
215 spi_support_wide(starget) = scsi_device_wide(sdev); in spi_device_configure()
216 spi_support_dt(starget) = scsi_device_dt(sdev); in spi_device_configure()
217 spi_support_dt_only(starget) = scsi_device_dt_only(sdev); in spi_device_configure()
218 spi_support_ius(starget) = scsi_device_ius(sdev); in spi_device_configure()
219 spi_support_qas(starget) = scsi_device_qas(sdev); in spi_device_configure()
[all …]
Dscsi_proc.c193 struct scsi_device *sdev; in proc_print_scsidevice() local
200 sdev = to_scsi_device(dev); in proc_print_scsidevice()
203 sdev->host->host_no, sdev->channel, sdev->id, sdev->lun); in proc_print_scsidevice()
205 if (sdev->vendor[i] >= 0x20) in proc_print_scsidevice()
206 seq_printf(s, "%c", sdev->vendor[i]); in proc_print_scsidevice()
213 if (sdev->model[i] >= 0x20) in proc_print_scsidevice()
214 seq_printf(s, "%c", sdev->model[i]); in proc_print_scsidevice()
221 if (sdev->rev[i] >= 0x20) in proc_print_scsidevice()
222 seq_printf(s, "%c", sdev->rev[i]); in proc_print_scsidevice()
229 seq_printf(s, " Type: %s ", scsi_device_type(sdev->type)); in proc_print_scsidevice()
[all …]
Dscsi_error.c156 int scsi_block_when_processing_errors(struct scsi_device *sdev) in scsi_block_when_processing_errors() argument
160 wait_event(sdev->host->host_wait, !scsi_host_in_recovery(sdev->host)); in scsi_block_when_processing_errors()
162 online = scsi_device_online(sdev); in scsi_block_when_processing_errors()
181 struct scsi_device *sdev; in scsi_eh_prt_fail_stats() local
187 shost_for_each_device(sdev, shost) { in scsi_eh_prt_fail_stats()
189 if (scmd->device == sdev) { in scsi_eh_prt_fail_stats()
200 sdev_printk(KERN_INFO, sdev, in scsi_eh_prt_fail_stats()
229 struct scsi_device *sdev = scmd->device; in scsi_check_sense() local
238 if (sdev->scsi_dh_data && sdev->scsi_dh_data->scsi_dh && in scsi_check_sense()
239 sdev->scsi_dh_data->scsi_dh->check_sense) { in scsi_check_sense()
[all …]
/drivers/staging/usbip/
Dstub_dev.c77 struct stub_device *sdev = dev_get_drvdata(dev); in show_status() local
80 if (!sdev) { in show_status()
85 spin_lock(&sdev->ud.lock); in show_status()
86 status = sdev->ud.status; in show_status()
87 spin_unlock(&sdev->ud.lock); in show_status()
101 struct stub_device *sdev = dev_get_drvdata(dev); in store_sockfd() local
105 if (!sdev) { in store_sockfd()
115 spin_lock(&sdev->ud.lock); in store_sockfd()
117 if (sdev->ud.status != SDEV_ST_AVAILABLE) { in store_sockfd()
119 spin_unlock(&sdev->ud.lock); in store_sockfd()
[all …]
Dstub_tx.c36 void stub_enqueue_ret_unlink(struct stub_device *sdev, __u32 seqnum, in stub_enqueue_ret_unlink() argument
43 dev_err(&sdev->interface->dev, "alloc stub_unlink\n"); in stub_enqueue_ret_unlink()
44 usbip_event_add(&sdev->ud, VDEV_EVENT_ERROR_MALLOC); in stub_enqueue_ret_unlink()
51 list_add_tail(&unlink->list, &sdev->unlink_tx); in stub_enqueue_ret_unlink()
66 struct stub_device *sdev = priv->sdev; in stub_complete() local
94 spin_lock_irqsave(&sdev->priv_lock, flags); in stub_complete()
97 stub_enqueue_ret_unlink(sdev, priv->seqnum, urb->status); in stub_complete()
100 list_move_tail(&priv->list, &sdev->priv_tx); in stub_complete()
103 spin_unlock_irqrestore(&sdev->priv_lock, flags); in stub_complete()
106 wake_up(&sdev->tx_waitq); in stub_complete()
[all …]
Dstub_rx.c234 static int stub_recv_cmd_unlink(struct stub_device *sdev, in stub_recv_cmd_unlink() argument
242 spin_lock_irqsave(&sdev->priv_lock, flags); in stub_recv_cmd_unlink()
244 list_for_each_entry(priv, &sdev->priv_init, list) { in stub_recv_cmd_unlink()
269 spin_unlock_irqrestore(&sdev->priv_lock, flags); in stub_recv_cmd_unlink()
303 stub_enqueue_ret_unlink(sdev, pdu->base.seqnum, 0); in stub_recv_cmd_unlink()
305 spin_unlock_irqrestore(&sdev->priv_lock, flags); in stub_recv_cmd_unlink()
311 static int valid_request(struct stub_device *sdev, struct usbip_header *pdu) in valid_request() argument
313 struct usbip_device *ud = &sdev->ud; in valid_request()
315 if (pdu->base.devid == sdev->devid) { in valid_request()
328 static struct stub_priv *stub_priv_alloc(struct stub_device *sdev, in stub_priv_alloc() argument
[all …]
Dstub_main.c183 static struct stub_priv *stub_priv_pop(struct stub_device *sdev) in stub_priv_pop() argument
188 spin_lock_irqsave(&sdev->priv_lock, flags); in stub_priv_pop()
190 priv = stub_priv_pop_from_listhead(&sdev->priv_init); in stub_priv_pop()
192 spin_unlock_irqrestore(&sdev->priv_lock, flags); in stub_priv_pop()
196 priv = stub_priv_pop_from_listhead(&sdev->priv_tx); in stub_priv_pop()
198 spin_unlock_irqrestore(&sdev->priv_lock, flags); in stub_priv_pop()
202 priv = stub_priv_pop_from_listhead(&sdev->priv_free); in stub_priv_pop()
204 spin_unlock_irqrestore(&sdev->priv_lock, flags); in stub_priv_pop()
208 spin_unlock_irqrestore(&sdev->priv_lock, flags); in stub_priv_pop()
212 void stub_device_cleanup_urbs(struct stub_device *sdev) in stub_device_cleanup_urbs() argument
[all …]
/drivers/scsi/device_handler/
Dscsi_dh.c55 scsi_dh_cache_lookup(struct scsi_device *sdev) in scsi_dh_cache_lookup() argument
62 if (!strncmp(sdev->vendor, tmp->vendor, strlen(tmp->vendor)) && in scsi_dh_cache_lookup()
63 !strncmp(sdev->model, tmp->model, strlen(tmp->model))) { in scsi_dh_cache_lookup()
74 struct scsi_device *sdev) in scsi_dh_handler_lookup() argument
79 if (!strncmp(sdev->vendor, scsi_dh->devlist[i].vendor, in scsi_dh_handler_lookup()
81 !strncmp(sdev->model, scsi_dh->devlist[i].model, in scsi_dh_handler_lookup()
101 struct scsi_device *sdev) in device_handler_match() argument
106 found_dh = scsi_dh_cache_lookup(sdev); in device_handler_match()
111 if (scsi_dh_handler_lookup(scsi_dh, sdev)) in device_handler_match()
118 if (scsi_dh_handler_lookup(tmp_dh, sdev)) in device_handler_match()
[all …]
Dscsi_dh_emc.c115 *get_clariion_data(struct scsi_device *sdev) in get_clariion_data() argument
117 struct scsi_dh_data *scsi_dh_data = sdev->scsi_dh_data; in get_clariion_data()
125 static int trespass_endio(struct scsi_device *sdev, char *sense) in trespass_endio() argument
131 sdev_printk(KERN_ERR, sdev, "%s: Found valid sense data 0x%2x, " in trespass_endio()
142 sdev_printk(KERN_INFO, sdev, "%s: Array Based Copy in " in trespass_endio()
152 sdev_printk(KERN_INFO, sdev, "%s: Detected in-progress " in trespass_endio()
159 sdev_printk(KERN_INFO, sdev, in trespass_endio()
166 static int parse_sp_info_reply(struct scsi_device *sdev, in parse_sp_info_reply() argument
173 sdev_printk(KERN_NOTICE, sdev, "%s: Detected in-progress " in parse_sp_info_reply()
181 sdev_printk(KERN_NOTICE, sdev, in parse_sp_info_reply()
[all …]
Dscsi_dh_hp_sw.c44 static inline struct hp_sw_dh_data *get_hp_sw_data(struct scsi_device *sdev) in get_hp_sw_data() argument
46 struct scsi_dh_data *scsi_dh_data = sdev->scsi_dh_data; in get_hp_sw_data()
58 static int tur_done(struct scsi_device *sdev, unsigned char *sense) in tur_done() argument
65 sdev_printk(KERN_WARNING, sdev, in tur_done()
87 sdev_printk(KERN_WARNING, sdev, in tur_done()
105 static int hp_sw_tur(struct scsi_device *sdev, struct hp_sw_dh_data *h) in hp_sw_tur() argument
111 req = blk_get_request(sdev->request_queue, WRITE, GFP_NOIO); in hp_sw_tur()
128 ret = tur_done(sdev, h->sense); in hp_sw_tur()
130 sdev_printk(KERN_WARNING, sdev, in hp_sw_tur()
158 static int start_done(struct scsi_device *sdev, unsigned char *sense) in start_done() argument
[all …]
Dscsi_dh_alua.c68 static inline struct alua_dh_data *get_alua_data(struct scsi_device *sdev) in get_alua_data() argument
70 struct scsi_dh_data *scsi_dh_data = sdev->scsi_dh_data; in get_alua_data()
90 static struct request *get_alua_req(struct scsi_device *sdev, in get_alua_req() argument
94 struct request_queue *q = sdev->request_queue; in get_alua_req()
99 sdev_printk(KERN_INFO, sdev, in get_alua_req()
106 sdev_printk(KERN_INFO, sdev, in get_alua_req()
124 static int submit_std_inquiry(struct scsi_device *sdev, struct alua_dh_data *h) in submit_std_inquiry() argument
129 rq = get_alua_req(sdev, h->inq, ALUA_INQUIRY_SIZE, READ); in submit_std_inquiry()
146 sdev_printk(KERN_INFO, sdev, in submit_std_inquiry()
161 static int submit_vpd_inquiry(struct scsi_device *sdev, struct alua_dh_data *h) in submit_vpd_inquiry() argument
[all …]
Dscsi_dh_rdac.c201 static inline struct rdac_dh_data *get_rdac_data(struct scsi_device *sdev) in get_rdac_data() argument
203 struct scsi_dh_data *scsi_dh_data = sdev->scsi_dh_data; in get_rdac_data()
208 static struct request *get_rdac_req(struct scsi_device *sdev, in get_rdac_req() argument
212 struct request_queue *q = sdev->request_queue; in get_rdac_req()
217 sdev_printk(KERN_INFO, sdev, in get_rdac_req()
224 sdev_printk(KERN_INFO, sdev, in get_rdac_req()
238 static struct request *rdac_failover_get(struct scsi_device *sdev, in rdac_failover_get() argument
273 rq = get_rdac_req(sdev, &h->ctlr->mode_select, data_size, WRITE); in rdac_failover_get()
335 static int submit_inquiry(struct scsi_device *sdev, int page_code, in submit_inquiry() argument
339 struct request_queue *q = sdev->request_queue; in submit_inquiry()
[all …]
/drivers/switch/
Dswitch_class.c32 struct switch_dev *sdev = (struct switch_dev *) in state_show() local
35 if (sdev->print_state) { in state_show()
36 int ret = sdev->print_state(sdev, buf); in state_show()
40 return sprintf(buf, "%d\n", sdev->state); in state_show()
46 struct switch_dev *sdev = (struct switch_dev *) in name_show() local
49 if (sdev->print_name) { in name_show()
50 int ret = sdev->print_name(sdev, buf); in name_show()
54 return sprintf(buf, "%s\n", sdev->name); in name_show()
60 void switch_set_state(struct switch_dev *sdev, int state) in switch_set_state() argument
69 if (sdev->state != state) { in switch_set_state()
[all …]
Dswitch_gpio.c28 struct switch_dev sdev; member
45 switch_set_state(&data->sdev, state); in gpio_switch_work()
57 static ssize_t switch_gpio_print_state(struct switch_dev *sdev, char *buf) in switch_gpio_print_state() argument
60 container_of(sdev, struct gpio_switch_data, sdev); in switch_gpio_print_state()
62 if (switch_get_state(sdev)) in switch_gpio_print_state()
85 switch_data->sdev.name = pdata->name; in gpio_switch_probe()
91 switch_data->sdev.print_state = switch_gpio_print_state; in gpio_switch_probe()
93 ret = switch_dev_register(&switch_data->sdev); in gpio_switch_probe()
128 switch_dev_unregister(&switch_data->sdev); in gpio_switch_probe()
141 switch_dev_unregister(&switch_data->sdev); in gpio_switch_remove()
/drivers/usb/storage/
Dscsiglue.c79 static int slave_alloc (struct scsi_device *sdev) in slave_alloc() argument
81 struct us_data *us = host_to_us(sdev->host); in slave_alloc()
88 sdev->inquiry_len = 36; in slave_alloc()
105 blk_queue_update_dma_alignment(sdev->request_queue, (512 - 1)); in slave_alloc()
117 sdev->sdev_target->pdt_1f_for_no_lun = 1; in slave_alloc()
122 static int slave_configure(struct scsi_device *sdev) in slave_configure() argument
124 struct us_data *us = host_to_us(sdev->host); in slave_configure()
135 if (sdev->request_queue->max_sectors > max_sectors) in slave_configure()
136 blk_queue_max_sectors(sdev->request_queue, in slave_configure()
146 blk_queue_bounce_limit(sdev->request_queue, BLK_BOUNCE_HIGH); in slave_configure()
[all …]
/drivers/message/fusion/
Dmptspi.c108 struct scsi_device *sdev) in mptspi_setTargetNegoParms() argument
122 if (sdev->scsi_level < SCSI_2) { in mptspi_setTargetNegoParms()
128 if (scsi_device_wide(sdev)) in mptspi_setTargetNegoParms()
131 if (scsi_device_sync(sdev)) { in mptspi_setTargetNegoParms()
133 if (!scsi_device_dt(sdev)) in mptspi_setTargetNegoParms()
136 if (!scsi_device_ius(sdev) && in mptspi_setTargetNegoParms()
137 !scsi_device_qas(sdev)) in mptspi_setTargetNegoParms()
141 if (scsi_device_qas(sdev)) { in mptspi_setTargetNegoParms()
145 scsi_device_qas(sdev), id)); in mptspi_setTargetNegoParms()
148 if (sdev->type == TYPE_TAPE && in mptspi_setTargetNegoParms()
[all …]
/drivers/net/
Db44.c146 static inline void b44_sync_dma_desc_for_device(struct ssb_device *sdev, in b44_sync_dma_desc_for_device() argument
151 ssb_dma_sync_single_range_for_device(sdev, dma_base, in b44_sync_dma_desc_for_device()
156 static inline void b44_sync_dma_desc_for_cpu(struct ssb_device *sdev, in b44_sync_dma_desc_for_cpu() argument
161 ssb_dma_sync_single_range_for_cpu(sdev, dma_base, in b44_sync_dma_desc_for_cpu()
168 return ssb_read32(bp->sdev, reg); in br32()
174 ssb_write32(bp->sdev, reg, val); in bw32()
616 ssb_dma_unmap_single(bp->sdev, in b44_tx()
656 mapping = ssb_dma_map_single(bp->sdev, skb->data, in b44_alloc_rx_skb()
662 if (ssb_dma_mapping_error(bp->sdev, mapping) || in b44_alloc_rx_skb()
665 if (!ssb_dma_mapping_error(bp->sdev, mapping)) in b44_alloc_rx_skb()
[all …]
/drivers/ssb/
Ddriver_gige.c168 static int ssb_gige_probe(struct ssb_device *sdev, const struct ssb_device_id *id) in ssb_gige_probe() argument
176 dev->dev = sdev; in ssb_gige_probe()
191 if (!ssb_device_is_enabled(sdev)) in ssb_gige_probe()
192 ssb_device_enable(sdev, 0); in ssb_gige_probe()
195 base = ssb_admatch_base(ssb_read32(sdev, SSB_ADMATCH1)); in ssb_gige_probe()
219 tmslow = ssb_read32(sdev, SSB_TMSLOW); in ssb_gige_probe()
220 tmshigh = ssb_read32(sdev, SSB_TMSHIGH); in ssb_gige_probe()
231 ssb_write32(sdev, SSB_TMSLOW, tmslow); in ssb_gige_probe()
233 ssb_set_drvdata(sdev, dev); in ssb_gige_probe()
247 int ssb_gige_pcibios_plat_dev_init(struct ssb_device *sdev, in ssb_gige_pcibios_plat_dev_init() argument
[all …]
/drivers/ata/
Dlibata-scsi.c190 struct scsi_device *sdev = to_scsi_device(device); in ata_scsi_park_show() local
198 ap = ata_shost_to_port(sdev->host); in ata_scsi_park_show()
201 dev = ata_scsi_find_dev(ap, sdev); in ata_scsi_park_show()
230 struct scsi_device *sdev = to_scsi_device(device); in ata_scsi_park_store() local
245 ap = ata_shost_to_port(sdev->host); in ata_scsi_park_store()
248 dev = ata_scsi_find_dev(ap, sdev); in ata_scsi_park_store()
337 struct scsi_device *sdev = to_scsi_device(dev); in ata_scsi_activity_show() local
338 struct ata_port *ap = ata_shost_to_port(sdev->host); in ata_scsi_activity_show()
339 struct ata_device *atadev = ata_scsi_find_dev(ap, sdev); in ata_scsi_activity_show()
350 struct scsi_device *sdev = to_scsi_device(dev); in ata_scsi_activity_store() local
[all …]

123456