Lines Matching +full:everything +full:- +full:else

1 // SPDX-License-Identifier: GPL-2.0+
6 * (c) 2006 Keith Bennett <keith@mcs.st-and.ac.uk>
21 #define DRV_NAME "ums-karma"
24 MODULE_AUTHOR("Bob Copeland <me@bobcopeland.com>, Keith Bennett <keith@mcs.st-and.ac.uk>");
89 * with a 512-byte packet with the high four bits set and everything
90 * else null. Then we send 'RIOP\x80' followed by a zero and the
99 struct karma_data *data = (struct karma_data *) us->extra; 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()
115 data->recv, RIO_RECV_LEN, NULL); in rio_karma_send_command()
119 if (data->recv[5] == seq) 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()
142 * Trap START_STOP and READ_10 to leave/re-enter storage mode.
143 * Everything else is propagated to the normal bulk layer.
148 struct karma_data *data = (struct karma_data *) us->extra; in rio_karma_transport()
150 if (srb->cmnd[0] == READ_10 && !data->in_storage) { in rio_karma_transport()
155 data->in_storage = 1; in rio_karma_transport()
157 } else if (srb->cmnd[0] == START_STOP) { in rio_karma_transport()
162 data->in_storage = 0; in rio_karma_transport()
172 kfree(data->recv); in rio_karma_destructor()
183 data->recv = kmalloc(RIO_RECV_LEN, GFP_NOIO); in rio_karma_init()
184 if (!data->recv) { in rio_karma_init()
189 us->extra = data; in rio_karma_init()
190 us->extra_destructor = rio_karma_destructor; in rio_karma_init()
192 data->in_storage = (ret == 0); in rio_karma_init()
206 (id - karma_usb_ids) + karma_unusual_dev_list, 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()