Home
last modified time | relevance | path

Searched refs:us (Results 1 – 25 of 65) sorted by relevance

123

/drivers/usb/storage/
Dusb.c195 struct us_data *us = usb_get_intfdata(iface); in storage_suspend() local
198 mutex_lock(&us->dev_mutex); in storage_suspend()
201 if (us->suspend_resume_hook) in storage_suspend()
202 (us->suspend_resume_hook)(us, US_SUSPEND); in storage_suspend()
207 mutex_unlock(&us->dev_mutex); in storage_suspend()
213 struct us_data *us = usb_get_intfdata(iface); in storage_resume() local
215 mutex_lock(&us->dev_mutex); in storage_resume()
218 if (us->suspend_resume_hook) in storage_resume()
219 (us->suspend_resume_hook)(us, US_RESUME); in storage_resume()
221 mutex_unlock(&us->dev_mutex); in storage_resume()
[all …]
Dtransport.c125 static int usb_stor_msg_common(struct us_data *us, int timeout) in usb_stor_msg_common() argument
132 if (test_bit(US_FLIDX_ABORTING, &us->dflags)) in usb_stor_msg_common()
139 us->current_urb->context = &urb_done; in usb_stor_msg_common()
140 us->current_urb->actual_length = 0; in usb_stor_msg_common()
141 us->current_urb->error_count = 0; in usb_stor_msg_common()
142 us->current_urb->status = 0; in usb_stor_msg_common()
148 us->current_urb->transfer_flags = URB_NO_SETUP_DMA_MAP; in usb_stor_msg_common()
149 if (us->current_urb->transfer_buffer == us->iobuf) in usb_stor_msg_common()
150 us->current_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; in usb_stor_msg_common()
151 us->current_urb->transfer_dma = us->iobuf_dma; in usb_stor_msg_common()
[all …]
Dalauda.c48 #define MEDIA_PORT(us) us->srb->device->lun argument
49 #define MEDIA_INFO(us) ((struct alauda_info *)us->extra)->port[MEDIA_PORT(us)] argument
199 static int alauda_get_media_status(struct us_data *us, unsigned char *data) in alauda_get_media_status() argument
204 if (MEDIA_PORT(us) == ALAUDA_PORT_XD) in alauda_get_media_status()
209 rc = usb_stor_ctrl_transfer(us, us->recv_ctrl_pipe, in alauda_get_media_status()
222 static int alauda_ack_media(struct us_data *us) in alauda_ack_media() argument
226 if (MEDIA_PORT(us) == ALAUDA_PORT_XD) in alauda_ack_media()
231 return usb_stor_ctrl_transfer(us, us->send_ctrl_pipe, in alauda_ack_media()
239 static int alauda_get_media_signature(struct us_data *us, unsigned char *data) in alauda_get_media_signature() argument
243 if (MEDIA_PORT(us) == ALAUDA_PORT_XD) in alauda_get_media_signature()
[all …]
Dscsiglue.c81 struct us_data *us = host_to_us(sdev->host); in slave_alloc() local
116 if (us->subclass == US_SC_UFI) in slave_alloc()
124 struct us_data *us = host_to_us(sdev->host); in slave_configure() local
130 if (us->fflags & (US_FL_MAX_SECTORS_64 | US_FL_MAX_SECTORS_MIN)) { in slave_configure()
133 if (us->fflags & US_FL_MAX_SECTORS_MIN) in slave_configure()
145 if (!us->pusb_dev->bus->controller->dma_mask) in slave_configure()
159 switch (le16_to_cpu(us->pusb_dev->descriptor.idVendor)) { in slave_configure()
164 if (!(us->fflags & (US_FL_FIX_CAPACITY | in slave_configure()
166 us->fflags |= US_FL_CAPACITY_HEURISTICS; in slave_configure()
173 if (us->subclass != US_SC_SCSI && us->subclass != US_SC_CYP_ATACB) in slave_configure()
[all …]
Dshuttle_usbat.c63 static int usbat_flash_transport(struct scsi_cmnd * srb, struct us_data *us);
64 static int usbat_hp8200e_transport(struct scsi_cmnd *srb, struct us_data *us);
86 static int usbat_get_device_type(struct us_data *us) in usbat_get_device_type() argument
88 return ((struct usbat_info*)us->extra)->devicetype; in usbat_get_device_type()
94 static int usbat_read(struct us_data *us, in usbat_read() argument
99 return usb_stor_ctrl_transfer(us, in usbat_read()
100 us->recv_ctrl_pipe, in usbat_read()
112 static int usbat_write(struct us_data *us, in usbat_write() argument
117 return usb_stor_ctrl_transfer(us, in usbat_write()
118 us->send_ctrl_pipe, in usbat_write()
[all …]
Djumpshot.c61 static inline int jumpshot_bulk_read(struct us_data *us, in jumpshot_bulk_read() argument
69 return usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, in jumpshot_bulk_read()
74 static inline int jumpshot_bulk_write(struct us_data *us, in jumpshot_bulk_write() argument
82 return usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, in jumpshot_bulk_write()
87 static int jumpshot_get_status(struct us_data *us) in jumpshot_get_status() argument
91 if (!us) in jumpshot_get_status()
95 rc = usb_stor_ctrl_transfer(us, us->recv_ctrl_pipe, in jumpshot_get_status()
96 0, 0xA0, 0, 7, us->iobuf, 1); in jumpshot_get_status()
101 if (us->iobuf[0] != 0x50) { in jumpshot_get_status()
103 us->iobuf[0]); in jumpshot_get_status()
[all …]
Dkarma.c56 static int rio_karma_send_command(char cmd, struct us_data *us) in rio_karma_send_command() argument
61 struct karma_data *data = (struct karma_data *) us->extra; in rio_karma_send_command()
64 memset(us->iobuf, 0, RIO_SEND_LEN); in rio_karma_send_command()
65 memcpy(us->iobuf, RIO_PREFIX, RIO_PREFIX_LEN); in rio_karma_send_command()
66 us->iobuf[5] = cmd; in rio_karma_send_command()
67 us->iobuf[6] = seq; in rio_karma_send_command()
71 result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, in rio_karma_send_command()
72 us->iobuf, RIO_SEND_LEN, &partial); in rio_karma_send_command()
76 result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, in rio_karma_send_command()
87 us->iobuf[4] = 0x80; in rio_karma_send_command()
[all …]
Ddatafab.c63 static int datafab_determine_lun(struct us_data *us,
68 datafab_bulk_read(struct us_data *us, unsigned char *data, unsigned int len) { in datafab_bulk_read() argument
73 return usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, in datafab_bulk_read()
79 datafab_bulk_write(struct us_data *us, unsigned char *data, unsigned int len) { in datafab_bulk_write() argument
84 return usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, in datafab_bulk_write()
89 static int datafab_read_data(struct us_data *us, in datafab_read_data() argument
94 unsigned char *command = us->iobuf; in datafab_read_data()
111 result = datafab_determine_lun(us, info); in datafab_read_data()
146 result = datafab_bulk_write(us, command, 8); in datafab_read_data()
151 result = datafab_bulk_read(us, buffer, len); in datafab_read_data()
[all …]
Dsddr09.c256 sddr09_send_command(struct us_data *us, in sddr09_send_command() argument
268 pipe = us->recv_ctrl_pipe; in sddr09_send_command()
270 pipe = us->send_ctrl_pipe; in sddr09_send_command()
272 rc = usb_stor_ctrl_transfer(us, pipe, request, requesttype, in sddr09_send_command()
282 sddr09_send_scsi_command(struct us_data *us, in sddr09_send_scsi_command() argument
285 return sddr09_send_command(us, 0, USB_DIR_OUT, command, command_len); in sddr09_send_scsi_command()
294 sddr09_test_unit_ready(struct us_data *us) {
295 unsigned char *command = us->iobuf;
301 result = sddr09_send_scsi_command(us, command, 6);
315 sddr09_request_sense(struct us_data *us, unsigned char *sensebuf, int buflen) { in sddr09_request_sense() argument
[all …]
Dsddr55.c76 sddr55_bulk_transport(struct us_data *us, int direction, in sddr55_bulk_transport() argument
78 struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra; in sddr55_bulk_transport()
80 us->recv_bulk_pipe : us->send_bulk_pipe; in sddr55_bulk_transport()
85 return usb_stor_bulk_transfer_buf(us, pipe, data, len, NULL); in sddr55_bulk_transport()
92 static int sddr55_status(struct us_data *us) in sddr55_status() argument
95 unsigned char *command = us->iobuf; in sddr55_status()
96 unsigned char *status = us->iobuf; in sddr55_status()
97 struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra; in sddr55_status()
103 result = sddr55_bulk_transport(us, in sddr55_status()
114 result = sddr55_bulk_transport(us, in sddr55_status()
[all …]
Dfreecom.c107 freecom_readdata (struct scsi_cmnd *srb, struct us_data *us, in freecom_readdata() argument
111 (struct freecom_xfer_wrap *) us->iobuf; in freecom_readdata()
122 result = usb_stor_bulk_transfer_buf (us, opipe, fxfr, in freecom_readdata()
131 result = usb_stor_bulk_srb(us, ipipe, srb); in freecom_readdata()
140 freecom_writedata (struct scsi_cmnd *srb, struct us_data *us, in freecom_writedata() argument
144 (struct freecom_xfer_wrap *) us->iobuf; in freecom_writedata()
155 result = usb_stor_bulk_transfer_buf (us, opipe, fxfr, in freecom_writedata()
164 result = usb_stor_bulk_srb(us, opipe, srb); in freecom_writedata()
176 int freecom_transport(struct scsi_cmnd *srb, struct us_data *us) in freecom_transport() argument
185 fcb = (struct freecom_cb_wrap *) us->iobuf; in freecom_transport()
[all …]
Dinitializers.c47 int usb_stor_euscsi_init(struct us_data *us) in usb_stor_euscsi_init() argument
52 us->iobuf[0] = 0x1; in usb_stor_euscsi_init()
53 result = usb_stor_control_msg(us, us->send_ctrl_pipe, in usb_stor_euscsi_init()
55 0x01, 0x0, us->iobuf, 0x1, 5*HZ); in usb_stor_euscsi_init()
63 int usb_stor_ucr61s2b_init(struct us_data *us) in usb_stor_ucr61s2b_init() argument
65 struct bulk_cb_wrap *bcb = (struct bulk_cb_wrap*) us->iobuf; in usb_stor_ucr61s2b_init()
66 struct bulk_cs_wrap *bcs = (struct bulk_cs_wrap*) us->iobuf; in usb_stor_ucr61s2b_init()
81 res = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, bcb, in usb_stor_ucr61s2b_init()
87 res = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, bcs, in usb_stor_ucr61s2b_init()
94 int usb_stor_huawei_e220_init(struct us_data *us) in usb_stor_huawei_e220_init() argument
[all …]
Disd200.c363 static void isd200_build_sense(struct us_data *us, struct scsi_cmnd *srb) in isd200_build_sense() argument
365 struct isd200_info *info = (struct isd200_info *)us->extra; in isd200_build_sense()
441 static int isd200_action( struct us_data *us, int action, in isd200_action() argument
446 struct isd200_info *info = (struct isd200_info *)us->extra; in isd200_action()
522 status = usb_stor_Bulk_transport(srb, us); in isd200_action()
542 static int isd200_read_regs( struct us_data *us ) in isd200_read_regs() argument
544 struct isd200_info *info = (struct isd200_info *)us->extra; in isd200_read_regs()
550 transferStatus = isd200_action( us, ACTION_READ_STATUS, in isd200_read_regs()
571 static void isd200_invoke_transport( struct us_data *us, in isd200_invoke_transport() argument
582 transferStatus = usb_stor_Bulk_transport(srb, us); in isd200_invoke_transport()
[all …]
Doption_ms.c40 static int option_rezero(struct us_data *us, int ep_in, int ep_out) in option_rezero() argument
58 result = usb_stor_bulk_transfer_buf(us, in option_rezero()
59 usb_sndbulkpipe(us->pusb_dev, ep_out), in option_rezero()
69 result = usb_stor_bulk_transfer_buf(us, in option_rezero()
70 usb_sndbulkpipe(us->pusb_dev, ep_out), in option_rezero()
79 int option_ms_init(struct us_data *us) in option_ms_init() argument
89 udev = us->pusb_dev; in option_ms_init()
90 intf = us->pusb_intf; in option_ms_init()
135 result = option_rezero(us, ep_in, ep_out); in option_ms_init()
Dtransport.h126 extern int usb_stor_control_msg(struct us_data *us, unsigned int pipe,
129 extern int usb_stor_clear_halt(struct us_data *us, unsigned int pipe);
131 extern int usb_stor_ctrl_transfer(struct us_data *us, unsigned int pipe,
134 extern int usb_stor_bulk_transfer_buf(struct us_data *us, unsigned int pipe,
136 extern int usb_stor_bulk_transfer_sg(struct us_data *us, unsigned int pipe,
138 extern int usb_stor_bulk_srb(struct us_data* us, unsigned int pipe,
141 extern int usb_stor_port_reset(struct us_data *us);
Dprotocol.c59 void usb_stor_pad12_command(struct scsi_cmnd *srb, struct us_data *us) in usb_stor_pad12_command() argument
73 usb_stor_invoke_transport(srb, us); in usb_stor_pad12_command()
76 void usb_stor_ufi_command(struct scsi_cmnd *srb, struct us_data *us) in usb_stor_ufi_command() argument
115 usb_stor_invoke_transport(srb, us); in usb_stor_ufi_command()
119 struct us_data *us) in usb_stor_transparent_scsi_command() argument
122 usb_stor_invoke_transport(srb, us); in usb_stor_transparent_scsi_command()
Dsddr09.h30 extern int sddr09_transport(struct scsi_cmnd *srb, struct us_data *us);
31 extern int usb_stor_sddr09_init(struct us_data *us);
35 extern int dpcm_transport(struct scsi_cmnd *srb, struct us_data *us);
36 extern int usb_stor_sddr09_dpcm_init(struct us_data *us);
Dshuttle_usbat.h106 extern int usbat_transport(struct scsi_cmnd *srb, struct us_data *us);
107 extern int init_usbat_cd(struct us_data *us);
108 extern int init_usbat_flash(struct us_data *us);
109 extern int init_usbat_probe(struct us_data *us);
Dinitializers.h43 int usb_stor_euscsi_init(struct us_data *us);
47 int usb_stor_ucr61s2b_init(struct us_data *us);
50 int usb_stor_huawei_e220_init(struct us_data *us);
Dfreecom.h30 extern int freecom_transport(struct scsi_cmnd *srb, struct us_data *us);
31 extern int usb_stor_freecom_reset(struct us_data *us);
32 extern int freecom_init (struct us_data *us);
Dcypress_atacb.c39 void cypress_atacb_passthrough(struct scsi_cmnd *srb, struct us_data *us) in cypress_atacb_passthrough() argument
44 usb_stor_transparent_scsi_command(srb, us); in cypress_atacb_passthrough()
111 usb_stor_transparent_scsi_command(srb, us); in cypress_atacb_passthrough()
148 usb_stor_transparent_scsi_command(srb, us); in cypress_atacb_passthrough()
Dsierra_ms.c125 int sierra_ms_init(struct us_data *us) in sierra_ms_init() argument
137 udev = us->pusb_dev; in sierra_ms_init()
139 sh = us_to_host(us); in sierra_ms_init()
203 result = device_create_file(&us->pusb_intf->dev, &dev_attr_truinst); in sierra_ms_init()
Dusb.h164 static inline struct Scsi_Host *us_to_host(struct us_data *us) { in us_to_host() argument
165 return container_of((void *) us, struct Scsi_Host, hostdata); in us_to_host()
172 extern void fill_inquiry_response(struct us_data *us,
/drivers/staging/comedi/
Dcomedi_fops.c407 comedi_subdinfo *tmp, *us; in do_subdinfo_ioctl() local
417 us = tmp + i; in do_subdinfo_ioctl()
419 us->type = s->type; in do_subdinfo_ioctl()
420 us->n_chan = s->n_chan; in do_subdinfo_ioctl()
421 us->subd_flags = s->subdev_flags; in do_subdinfo_ioctl()
423 us->subd_flags |= SDF_RUNNING; in do_subdinfo_ioctl()
425 us->timer_type = TIMER_nanosec; in do_subdinfo_ioctl()
426 us->len_chanlist = s->len_chanlist; in do_subdinfo_ioctl()
427 us->maxdata = s->maxdata; in do_subdinfo_ioctl()
429 us->range_type = in do_subdinfo_ioctl()
[all …]
/drivers/spi/
Dtle62x0.c28 struct spi_device *us; member
53 dev_dbg(&st->us->dev, "buff %02x,%02x,%02x\n", in tle62x0_write()
56 return spi_write(st->us, buff, (st->nr_gpio == 16) ? 3 : 2); in tle62x0_write()
77 return spi_sync(st->us, &msg); in tle62x0_read()
260 st->us = spi; in tle62x0_probe()

123