Lines Matching full:us

64 	struct us_data *us = host_to_us(host);  in host_info()  local
65 return us->scsi_name; in host_info()
70 struct us_data *us = host_to_us(sdev->host); in slave_alloc() local
86 if (us->protocol == USB_PR_BULK && us->max_lun > 0) in slave_alloc()
94 struct us_data *us = host_to_us(sdev->host); in slave_configure() local
95 struct device *dev = us->pusb_dev->bus->sysdev; in slave_configure()
102 if (us->fflags & (US_FL_MAX_SECTORS_64 | US_FL_MAX_SECTORS_MIN)) { in slave_configure()
105 if (le16_to_cpu(us->pusb_dev->descriptor.idVendor) == 0x05e3 && in slave_configure()
106 le16_to_cpu(us->pusb_dev->descriptor.idProduct) == 0x0749) in slave_configure()
109 if (us->fflags & US_FL_MAX_SECTORS_MIN) in slave_configure()
121 } else if (us->pusb_dev->speed >= USB_SPEED_SUPER) { in slave_configure()
123 * USB3 devices will be limited to 2048 sectors. This gives us in slave_configure()
142 if (!hcd_uses_dma(bus_to_hcd(us->pusb_dev->bus)) || in slave_configure()
143 (bus_to_hcd(us->pusb_dev->bus)->localmem_pool != NULL)) in slave_configure()
161 switch (le16_to_cpu(us->pusb_dev->descriptor.idVendor)) { in slave_configure()
166 if (!(us->fflags & (US_FL_FIX_CAPACITY | in slave_configure()
168 us->fflags |= US_FL_CAPACITY_HEURISTICS; in slave_configure()
177 if (us->subclass != USB_SC_SCSI && us->subclass != USB_SC_CYP_ATACB) in slave_configure()
195 if (us->fflags & US_FL_NO_WP_DETECT) in slave_configure()
221 if (us->fflags & US_FL_FIX_CAPACITY) in slave_configure()
229 if (us->fflags & US_FL_CAPACITY_HEURISTICS) in slave_configure()
233 if (us->fflags & US_FL_NO_READ_CAPACITY_16) in slave_configure()
242 if (!(us->fflags & US_FL_NEEDS_CAP16)) in slave_configure()
250 !(us->fflags & US_FL_BAD_SENSE)) in slave_configure()
251 us->fflags |= US_FL_SANE_SENSE; in slave_configure()
281 if (!(us->fflags & (US_FL_FIX_CAPACITY | US_FL_CAPACITY_OK | in slave_configure()
283 us->protocol == USB_PR_BULK) in slave_configure()
284 us->use_last_sector_hacks = 1; in slave_configure()
287 if (us->fflags & US_FL_WRITE_CACHE) in slave_configure()
291 if (us->fflags & US_FL_BROKEN_FUA) in slave_configure()
295 if (us->fflags & US_FL_ALWAYS_SYNC) { in slave_configure()
312 if (us->fflags & US_FL_NO_READ_DISC_INFO) in slave_configure()
323 if ((us->protocol == USB_PR_CB || us->protocol == USB_PR_CBI) && in slave_configure()
325 us->max_lun = 0; in slave_configure()
331 if (us->fflags & US_FL_NOT_LOCKABLE) in slave_configure()
343 struct us_data *us = host_to_us(dev_to_shost(starget->dev.parent)); in target_alloc() local
362 if (us->subclass == USB_SC_UFI) in target_alloc()
373 struct us_data *us = host_to_us(srb->device->host); in queuecommand_lck() local
376 if (us->srb != NULL) { in queuecommand_lck()
377 dev_err(&us->pusb_intf->dev, in queuecommand_lck()
378 "Error in %s: us->srb = %p\n", __func__, us->srb); in queuecommand_lck()
383 if (test_bit(US_FLIDX_DISCONNECTING, &us->dflags)) { in queuecommand_lck()
384 usb_stor_dbg(us, "Fail command during disconnect\n"); in queuecommand_lck()
390 if ((us->fflags & US_FL_NO_ATA_1X) && in queuecommand_lck()
401 us->srb = srb; in queuecommand_lck()
402 complete(&us->cmnd_ready); in queuecommand_lck()
416 struct us_data *us = host_to_us(srb->device->host); in DEF_SCSI_QCMD() local
418 usb_stor_dbg(us, "%s called\n", __func__); in DEF_SCSI_QCMD()
421 * us->srb together with the TIMED_OUT, RESETTING, and ABORTING in DEF_SCSI_QCMD()
424 scsi_lock(us_to_host(us)); in DEF_SCSI_QCMD()
427 if (us->srb != srb) { in DEF_SCSI_QCMD()
428 scsi_unlock(us_to_host(us)); in DEF_SCSI_QCMD()
429 usb_stor_dbg(us, "-- nothing to abort\n"); in DEF_SCSI_QCMD()
440 set_bit(US_FLIDX_TIMED_OUT, &us->dflags); in DEF_SCSI_QCMD()
441 if (!test_bit(US_FLIDX_RESETTING, &us->dflags)) { in DEF_SCSI_QCMD()
442 set_bit(US_FLIDX_ABORTING, &us->dflags); in DEF_SCSI_QCMD()
443 usb_stor_stop_transport(us); in DEF_SCSI_QCMD()
445 scsi_unlock(us_to_host(us)); in DEF_SCSI_QCMD()
448 wait_for_completion(&us->notify); in DEF_SCSI_QCMD()
458 struct us_data *us = host_to_us(srb->device->host); in device_reset() local
461 usb_stor_dbg(us, "%s called\n", __func__); in device_reset()
464 mutex_lock(&(us->dev_mutex)); in device_reset()
465 result = us->transport_reset(us); in device_reset()
466 mutex_unlock(&us->dev_mutex); in device_reset()
474 struct us_data *us = host_to_us(srb->device->host); in bus_reset() local
477 usb_stor_dbg(us, "%s called\n", __func__); in bus_reset()
479 result = usb_stor_port_reset(us); in bus_reset()
488 void usb_stor_report_device_reset(struct us_data *us) in usb_stor_report_device_reset() argument
491 struct Scsi_Host *host = us_to_host(us); in usb_stor_report_device_reset()
494 if (us->fflags & US_FL_SCM_MULT_TARG) { in usb_stor_report_device_reset()
505 void usb_stor_report_bus_reset(struct us_data *us) in usb_stor_report_bus_reset() argument
507 struct Scsi_Host *host = us_to_host(us); in usb_stor_report_bus_reset()
520 /* if someone is sending us data, just throw it away */ in write_info()
526 struct us_data *us = host_to_us(host); in show_info() local
533 if (us->pusb_dev->manufacturer) in show_info()
534 string = us->pusb_dev->manufacturer; in show_info()
535 else if (us->unusual_dev->vendorName) in show_info()
536 string = us->unusual_dev->vendorName; in show_info()
540 if (us->pusb_dev->product) in show_info()
541 string = us->pusb_dev->product; in show_info()
542 else if (us->unusual_dev->productName) in show_info()
543 string = us->unusual_dev->productName; in show_info()
547 if (us->pusb_dev->serial) in show_info()
548 string = us->pusb_dev->serial; in show_info()
554 seq_printf(m, " Protocol: %s\n", us->protocol_name); in show_info()
555 seq_printf(m, " Transport: %s\n", us->transport_name); in show_info()
561 if (us->fflags & value) seq_printf(m, " " #name); in show_info()