• Home
  • Raw
  • Download

Lines Matching full:us

104 static inline int jumpshot_bulk_read(struct us_data *us,  in jumpshot_bulk_read()  argument
111 usb_stor_dbg(us, "len = %d\n", len); in jumpshot_bulk_read()
112 return usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, in jumpshot_bulk_read()
117 static inline int jumpshot_bulk_write(struct us_data *us, in jumpshot_bulk_write() argument
124 usb_stor_dbg(us, "len = %d\n", len); in jumpshot_bulk_write()
125 return usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, in jumpshot_bulk_write()
130 static int jumpshot_get_status(struct us_data *us) in jumpshot_get_status() argument
134 if (!us) in jumpshot_get_status()
138 rc = usb_stor_ctrl_transfer(us, us->recv_ctrl_pipe, in jumpshot_get_status()
139 0, 0xA0, 0, 7, us->iobuf, 1); in jumpshot_get_status()
144 if (us->iobuf[0] != 0x50) { in jumpshot_get_status()
145 usb_stor_dbg(us, "0x%2x\n", us->iobuf[0]); in jumpshot_get_status()
152 static int jumpshot_read_data(struct us_data *us, in jumpshot_read_data() argument
157 unsigned char *command = us->iobuf; in jumpshot_read_data()
200 result = usb_stor_ctrl_transfer(us, us->send_ctrl_pipe, in jumpshot_read_data()
206 result = jumpshot_bulk_read(us, buffer, len); in jumpshot_read_data()
210 usb_stor_dbg(us, "%d bytes\n", len); in jumpshot_read_data()
213 usb_stor_access_xfer_buf(buffer, len, us->srb, in jumpshot_read_data()
229 static int jumpshot_write_data(struct us_data *us, in jumpshot_write_data() argument
234 unsigned char *command = us->iobuf; in jumpshot_write_data()
269 usb_stor_access_xfer_buf(buffer, len, us->srb, in jumpshot_write_data()
282 result = usb_stor_ctrl_transfer(us, us->send_ctrl_pipe, in jumpshot_write_data()
288 result = jumpshot_bulk_write(us, buffer, len); in jumpshot_write_data()
297 result = jumpshot_get_status(us); in jumpshot_write_data()
306 usb_stor_dbg(us, "Gah! Waitcount = 10. Bad write!?\n"); in jumpshot_write_data()
320 static int jumpshot_id_device(struct us_data *us, in jumpshot_id_device() argument
323 unsigned char *command = us->iobuf; in jumpshot_id_device()
337 rc = usb_stor_ctrl_transfer(us, us->send_ctrl_pipe, in jumpshot_id_device()
341 usb_stor_dbg(us, "Gah! send_control for read_capacity failed\n"); in jumpshot_id_device()
347 rc = jumpshot_bulk_read(us, reply, 512); in jumpshot_id_device()
365 static int jumpshot_handle_mode_sense(struct us_data *us, in jumpshot_handle_mode_sense() argument
383 struct jumpshot_info *info = (struct jumpshot_info *) (us->extra); in jumpshot_handle_mode_sense()
384 unsigned char *ptr = us->iobuf; in jumpshot_handle_mode_sense()
391 usb_stor_dbg(us, "Current values\n"); in jumpshot_handle_mode_sense()
394 usb_stor_dbg(us, "Changeable values\n"); in jumpshot_handle_mode_sense()
397 usb_stor_dbg(us, "Default values\n"); in jumpshot_handle_mode_sense()
400 usb_stor_dbg(us, "Saves values\n"); in jumpshot_handle_mode_sense()
473 static int jumpshot_transport(struct scsi_cmnd *srb, struct us_data *us) in jumpshot_transport() argument
478 unsigned char *ptr = us->iobuf; in jumpshot_transport()
483 if (!us->extra) { in jumpshot_transport()
484 us->extra = kzalloc(sizeof(struct jumpshot_info), GFP_NOIO); in jumpshot_transport()
485 if (!us->extra) in jumpshot_transport()
488 us->extra_destructor = jumpshot_info_destructor; in jumpshot_transport()
491 info = (struct jumpshot_info *) (us->extra); in jumpshot_transport()
494 usb_stor_dbg(us, "INQUIRY - Returning bogus response\n"); in jumpshot_transport()
496 fill_inquiry_response(us, ptr, 36); in jumpshot_transport()
503 rc = jumpshot_get_status(us); in jumpshot_transport()
507 rc = jumpshot_id_device(us, info); in jumpshot_transport()
511 usb_stor_dbg(us, "READ_CAPACITY: %ld sectors, %ld bytes per sector\n", in jumpshot_transport()
524 usb_stor_dbg(us, "Gah! MODE_SELECT_10\n"); in jumpshot_transport()
534 usb_stor_dbg(us, "READ_10: read block 0x%04lx count %ld\n", in jumpshot_transport()
536 return jumpshot_read_data(us, info, block, blocks); in jumpshot_transport()
548 usb_stor_dbg(us, "READ_12: read block 0x%04lx count %ld\n", in jumpshot_transport()
550 return jumpshot_read_data(us, info, block, blocks); in jumpshot_transport()
559 usb_stor_dbg(us, "WRITE_10: write block 0x%04lx count %ld\n", in jumpshot_transport()
561 return jumpshot_write_data(us, info, block, blocks); in jumpshot_transport()
573 usb_stor_dbg(us, "WRITE_12: write block 0x%04lx count %ld\n", in jumpshot_transport()
575 return jumpshot_write_data(us, info, block, blocks); in jumpshot_transport()
580 usb_stor_dbg(us, "TEST_UNIT_READY\n"); in jumpshot_transport()
581 return jumpshot_get_status(us); in jumpshot_transport()
585 usb_stor_dbg(us, "REQUEST_SENSE\n"); in jumpshot_transport()
599 usb_stor_dbg(us, "MODE_SENSE_6 detected\n"); in jumpshot_transport()
600 return jumpshot_handle_mode_sense(us, srb, 1); in jumpshot_transport()
604 usb_stor_dbg(us, "MODE_SENSE_10 detected\n"); in jumpshot_transport()
605 return jumpshot_handle_mode_sense(us, srb, 0); in jumpshot_transport()
621 usb_stor_dbg(us, "START_STOP\n"); in jumpshot_transport()
626 rc = jumpshot_id_device(us, info); in jumpshot_transport()
637 usb_stor_dbg(us, "Gah! Unknown command: %d (0x%x)\n", in jumpshot_transport()
650 struct us_data *us; in jumpshot_probe() local
653 result = usb_stor_probe1(&us, intf, id, in jumpshot_probe()
659 us->transport_name = "Lexar Jumpshot Control/Bulk"; in jumpshot_probe()
660 us->transport = jumpshot_transport; in jumpshot_probe()
661 us->transport_reset = usb_stor_Bulk_reset; in jumpshot_probe()
662 us->max_lun = 1; in jumpshot_probe()
664 result = usb_stor_probe2(us); in jumpshot_probe()