Lines Matching full:us
42 static int rio_karma_init(struct us_data *us);
94 static int rio_karma_send_command(char cmd, struct us_data *us) in rio_karma_send_command() argument
99 struct karma_data *data = (struct karma_data *) us->extra; in rio_karma_send_command()
101 usb_stor_dbg(us, "sending command %04x\n", cmd); in rio_karma_send_command()
102 memset(us->iobuf, 0, RIO_SEND_LEN); in rio_karma_send_command()
103 memcpy(us->iobuf, RIO_PREFIX, RIO_PREFIX_LEN); in rio_karma_send_command()
104 us->iobuf[5] = cmd; in rio_karma_send_command()
105 us->iobuf[6] = seq; in rio_karma_send_command()
109 result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, in rio_karma_send_command()
110 us->iobuf, RIO_SEND_LEN, NULL); in rio_karma_send_command()
114 result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, in rio_karma_send_command()
125 us->iobuf[4] = 0x80; in rio_karma_send_command()
126 us->iobuf[5] = 0; in rio_karma_send_command()
134 usb_stor_dbg(us, "sent command %04x\n", cmd); in rio_karma_send_command()
137 usb_stor_dbg(us, "command %04x failed\n", cmd); in rio_karma_send_command()
145 static int rio_karma_transport(struct scsi_cmnd *srb, struct us_data *us) in rio_karma_transport() argument
148 struct karma_data *data = (struct karma_data *) us->extra; in rio_karma_transport()
151 ret = rio_karma_send_command(RIO_ENTER_STORAGE, us); in rio_karma_transport()
156 return usb_stor_Bulk_transport(srb, us); in rio_karma_transport()
158 ret = rio_karma_send_command(RIO_LEAVE_STORAGE, us); in rio_karma_transport()
163 return rio_karma_send_command(RIO_RESET, us); in rio_karma_transport()
165 return usb_stor_Bulk_transport(srb, us); in rio_karma_transport()
175 static int rio_karma_init(struct us_data *us) in rio_karma_init() argument
189 us->extra = data; in rio_karma_init()
190 us->extra_destructor = rio_karma_destructor; in rio_karma_init()
191 ret = rio_karma_send_command(RIO_ENTER_STORAGE, us); in rio_karma_init()
202 struct us_data *us; in karma_probe() local
205 result = usb_stor_probe1(&us, intf, id, in karma_probe()
211 us->transport_name = "Rio Karma/Bulk"; in karma_probe()
212 us->transport = rio_karma_transport; in karma_probe()
213 us->transport_reset = usb_stor_Bulk_reset; in karma_probe()
215 result = usb_stor_probe2(us); in karma_probe()