karma.c (cf9ce948f47640797bd19980e1d99c6d17d0bdc3) | karma.c (191648d03d20229523d9a75b8abef56421298d28) |
---|---|
1/* Driver for Rio Karma 2 * 3 * (c) 2006 Bob Copeland <me@bobcopeland.com> 4 * (c) 2006 Keith Bennett <keith@mcs.st-and.ac.uk> 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License as published by the 8 * Free Software Foundation; either version 2, or (at your option) any --- 92 unchanged lines hidden (view full) --- 101 */ 102static int rio_karma_send_command(char cmd, struct us_data *us) 103{ 104 int result, partial; 105 unsigned long timeout; 106 static unsigned char seq = 1; 107 struct karma_data *data = (struct karma_data *) us->extra; 108 | 1/* Driver for Rio Karma 2 * 3 * (c) 2006 Bob Copeland <me@bobcopeland.com> 4 * (c) 2006 Keith Bennett <keith@mcs.st-and.ac.uk> 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License as published by the 8 * Free Software Foundation; either version 2, or (at your option) any --- 92 unchanged lines hidden (view full) --- 101 */ 102static int rio_karma_send_command(char cmd, struct us_data *us) 103{ 104 int result, partial; 105 unsigned long timeout; 106 static unsigned char seq = 1; 107 struct karma_data *data = (struct karma_data *) us->extra; 108 |
109 US_DEBUGP("karma: sending command %04x\n", cmd); | 109 usb_stor_dbg(us, "sending command %04x\n", cmd); |
110 memset(us->iobuf, 0, RIO_SEND_LEN); 111 memcpy(us->iobuf, RIO_PREFIX, RIO_PREFIX_LEN); 112 us->iobuf[5] = cmd; 113 us->iobuf[6] = seq; 114 115 timeout = jiffies + msecs_to_jiffies(6000); 116 for (;;) { 117 result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, --- 16 unchanged lines hidden (view full) --- 134 us->iobuf[5] = 0; 135 msleep(50); 136 } 137 138 seq++; 139 if (seq == 0) 140 seq = 1; 141 | 110 memset(us->iobuf, 0, RIO_SEND_LEN); 111 memcpy(us->iobuf, RIO_PREFIX, RIO_PREFIX_LEN); 112 us->iobuf[5] = cmd; 113 us->iobuf[6] = seq; 114 115 timeout = jiffies + msecs_to_jiffies(6000); 116 for (;;) { 117 result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, --- 16 unchanged lines hidden (view full) --- 134 us->iobuf[5] = 0; 135 msleep(50); 136 } 137 138 seq++; 139 if (seq == 0) 140 seq = 1; 141 |
142 US_DEBUGP("karma: sent command %04x\n", cmd); | 142 usb_stor_dbg(us, "sent command %04x\n", cmd); |
143 return 0; 144err: | 143 return 0; 144err: |
145 US_DEBUGP("karma: command %04x failed\n", cmd); | 145 usb_stor_dbg(us, "command %04x failed\n", cmd); |
146 return USB_STOR_TRANSPORT_FAILED; 147} 148 149/* 150 * Trap START_STOP and READ_10 to leave/re-enter storage mode. 151 * Everything else is propagated to the normal bulk layer. 152 */ 153static int rio_karma_transport(struct scsi_cmnd *srb, struct us_data *us) --- 83 unchanged lines hidden --- | 146 return USB_STOR_TRANSPORT_FAILED; 147} 148 149/* 150 * Trap START_STOP and READ_10 to leave/re-enter storage mode. 151 * Everything else is propagated to the normal bulk layer. 152 */ 153static int rio_karma_transport(struct scsi_cmnd *srb, struct us_data *us) --- 83 unchanged lines hidden --- |