Lines Matching refs:us
81 struct us_data *us = host_to_us(sdev->host); in slave_alloc() local
116 if (us->subclass == US_SC_UFI) in slave_alloc()
124 struct us_data *us = host_to_us(sdev->host); in slave_configure() local
130 if (us->fflags & (US_FL_MAX_SECTORS_64 | US_FL_MAX_SECTORS_MIN)) { in slave_configure()
133 if (us->fflags & US_FL_MAX_SECTORS_MIN) in slave_configure()
145 if (!us->pusb_dev->bus->controller->dma_mask) in slave_configure()
159 switch (le16_to_cpu(us->pusb_dev->descriptor.idVendor)) { in slave_configure()
164 if (!(us->fflags & (US_FL_FIX_CAPACITY | in slave_configure()
166 us->fflags |= US_FL_CAPACITY_HEURISTICS; in slave_configure()
173 if (us->subclass != US_SC_SCSI && us->subclass != US_SC_CYP_ATACB) in slave_configure()
187 if (us->fflags & US_FL_NO_WP_DETECT) in slave_configure()
197 if (us->fflags & US_FL_FIX_CAPACITY) in slave_configure()
203 if (us->fflags & US_FL_CAPACITY_HEURISTICS) in slave_configure()
208 us->fflags |= US_FL_SANE_SENSE; in slave_configure()
240 if (!(us->fflags & (US_FL_FIX_CAPACITY | US_FL_CAPACITY_OK | in slave_configure()
242 us->protocol == US_PR_BULK) in slave_configure()
243 us->use_last_sector_hacks = 1; in slave_configure()
258 if ((us->protocol == US_PR_CB || us->protocol == US_PR_CBI) && in slave_configure()
260 us->max_lun = 0; in slave_configure()
264 if (us->fflags & US_FL_NOT_LOCKABLE) in slave_configure()
277 struct us_data *us = host_to_us(srb->device->host); in queuecommand() local
282 if (us->srb != NULL) { in queuecommand()
284 __func__, us->srb); in queuecommand()
289 if (test_bit(US_FLIDX_DISCONNECTING, &us->dflags)) { in queuecommand()
298 us->srb = srb; in queuecommand()
299 complete(&us->cmnd_ready); in queuecommand()
311 struct us_data *us = host_to_us(srb->device->host); in command_abort() local
317 scsi_lock(us_to_host(us)); in command_abort()
320 if (us->srb != srb) { in command_abort()
321 scsi_unlock(us_to_host(us)); in command_abort()
331 set_bit(US_FLIDX_TIMED_OUT, &us->dflags); in command_abort()
332 if (!test_bit(US_FLIDX_RESETTING, &us->dflags)) { in command_abort()
333 set_bit(US_FLIDX_ABORTING, &us->dflags); in command_abort()
334 usb_stor_stop_transport(us); in command_abort()
336 scsi_unlock(us_to_host(us)); in command_abort()
339 wait_for_completion(&us->notify); in command_abort()
347 struct us_data *us = host_to_us(srb->device->host); in device_reset() local
353 mutex_lock(&(us->dev_mutex)); in device_reset()
354 result = us->transport_reset(us); in device_reset()
355 mutex_unlock(&us->dev_mutex); in device_reset()
363 struct us_data *us = host_to_us(srb->device->host); in bus_reset() local
367 result = usb_stor_port_reset(us); in bus_reset()
374 void usb_stor_report_device_reset(struct us_data *us) in usb_stor_report_device_reset() argument
377 struct Scsi_Host *host = us_to_host(us); in usb_stor_report_device_reset()
380 if (us->fflags & US_FL_SCM_MULT_TARG) { in usb_stor_report_device_reset()
389 void usb_stor_report_bus_reset(struct us_data *us) in usb_stor_report_bus_reset() argument
391 struct Scsi_Host *host = us_to_host(us); in usb_stor_report_bus_reset()
410 struct us_data *us = host_to_us(host); in proc_info() local
422 if (us->pusb_dev->manufacturer) in proc_info()
423 string = us->pusb_dev->manufacturer; in proc_info()
424 else if (us->unusual_dev->vendorName) in proc_info()
425 string = us->unusual_dev->vendorName; in proc_info()
429 if (us->pusb_dev->product) in proc_info()
430 string = us->pusb_dev->product; in proc_info()
431 else if (us->unusual_dev->productName) in proc_info()
432 string = us->unusual_dev->productName; in proc_info()
436 if (us->pusb_dev->serial) in proc_info()
437 string = us->pusb_dev->serial; in proc_info()
443 SPRINTF(" Protocol: %s\n", us->protocol_name); in proc_info()
444 SPRINTF(" Transport: %s\n", us->transport_name); in proc_info()
451 if (us->fflags & value) pos += sprintf(pos, " " #name); in proc_info()