Lines Matching refs:pMass_stor
352 struct ms_usdata *pMass_stor;
356 if ( (pMass_stor = Mass_stor_us[uPort]) == NULL)
366 host_id = pMass_stor->host_id;
370 memset(&pMass_stor->srb, 0, sizeof(struct scMsc_cmd ));
372 ms_vSCSICmd_REQUEST_SENSE(pMass_stor, uLunNum);
374 ms_usb_msc_control_thread(pMass_stor);
376 if (pMass_stor->srb.result == MS_STAT_GOOD)
378 memcpy(pSenseBuf, pMass_stor->srb.sense_buffer, DATA_LENGTH_REQUEST_SENSE);
393 struct ms_usdata *pMass_stor; in ms_bSCSI_INQUIRY() local
396 if ( (pMass_stor = Mass_stor_us[uPort]) == NULL) in ms_bSCSI_INQUIRY()
399 host_id = pMass_stor->host_id; in ms_bSCSI_INQUIRY()
405 if ( (pMass_stor = Mass_stor_us[uPort]) == NULL) in ms_bSCSI_INQUIRY()
408 memset(&pMass_stor->srb, 0, sizeof(struct scMsc_cmd )); in ms_bSCSI_INQUIRY()
409 ms_vSCSICmd_INQUIRY(pMass_stor, pIngBuf, uLunNum); in ms_bSCSI_INQUIRY()
411 ms_usb_msc_control_thread(pMass_stor); in ms_bSCSI_INQUIRY()
413 if(pMass_stor->srb.result == MS_STAT_GOOD) in ms_bSCSI_INQUIRY()
418 else if (pMass_stor->srb.result == (DID_NO_CONNECT << 16)) in ms_bSCSI_INQUIRY()
435 struct ms_usdata *pMass_stor; in ms_bSCSI_MODE_SENSE() local
438 if ( (pMass_stor = Mass_stor_us[uPort]) == NULL) in ms_bSCSI_MODE_SENSE()
441 host_id = pMass_stor->host_id; in ms_bSCSI_MODE_SENSE()
447 if ( (pMass_stor = Mass_stor_us[uPort]) == NULL) in ms_bSCSI_MODE_SENSE()
450 memset(&pMass_stor->srb, 0, sizeof(struct scMsc_cmd )); in ms_bSCSI_MODE_SENSE()
451 ms_vSCSICmd_MODE_SENSE(pMass_stor, 0x3F, pModSenBuf, uLunNum, uBufLen); in ms_bSCSI_MODE_SENSE()
452 ms_usb_msc_control_thread(pMass_stor); in ms_bSCSI_MODE_SENSE()
454 if(pMass_stor->srb.result == MS_STAT_GOOD) in ms_bSCSI_MODE_SENSE()
459 else if (pMass_stor->srb.result == (DID_NO_CONNECT << 16)) in ms_bSCSI_MODE_SENSE()
474 struct ms_usdata *pMass_stor; in ms_bSCSI_READ_CAPACITY() local
477 if ( (pMass_stor = Mass_stor_us[uPort]) == NULL) in ms_bSCSI_READ_CAPACITY()
479 host_id = pMass_stor->host_id; in ms_bSCSI_READ_CAPACITY()
485 if ( (pMass_stor = Mass_stor_us[uPort]) == NULL) in ms_bSCSI_READ_CAPACITY()
488 memset(&pMass_stor->srb, 0, sizeof(struct scMsc_cmd )); in ms_bSCSI_READ_CAPACITY()
490 ms_vSCSICmd_READ_CAPACITY(pMass_stor, CapBuf, uLunNum); in ms_bSCSI_READ_CAPACITY()
492 ms_usb_msc_control_thread(pMass_stor); in ms_bSCSI_READ_CAPACITY()
494 if(pMass_stor->srb.result == MS_STAT_GOOD) in ms_bSCSI_READ_CAPACITY()
522 else if (pMass_stor->srb.result == (DID_NO_CONNECT << 16)) in ms_bSCSI_READ_CAPACITY()
540 struct ms_usdata *pMass_stor; in ms_bSCSI_TEST_UNIT_READY() local
544 if ( (pMass_stor = Mass_stor_us[uPort]) == NULL) in ms_bSCSI_TEST_UNIT_READY()
558 LunDevice = pMass_stor->msc_device; in ms_bSCSI_TEST_UNIT_READY()
565 host_id = pMass_stor->host_id; in ms_bSCSI_TEST_UNIT_READY()
571 if ( (pMass_stor = Mass_stor_us[uPort]) == NULL) in ms_bSCSI_TEST_UNIT_READY()
574 memset(&pMass_stor->srb, 0, sizeof(struct scMsc_cmd )); in ms_bSCSI_TEST_UNIT_READY()
576 ms_vSCSICmd_TEST_UNIT_READY(pMass_stor, uLunNum); in ms_bSCSI_TEST_UNIT_READY()
578 ms_usb_msc_control_thread(pMass_stor); in ms_bSCSI_TEST_UNIT_READY()
580 if(pMass_stor->srb.result == MS_STAT_GOOD) in ms_bSCSI_TEST_UNIT_READY()
587 else if (pMass_stor->srb.result == (DID_NO_CONNECT << 16)) in ms_bSCSI_TEST_UNIT_READY()
605 struct ms_usdata *pMass_stor; in ms_bInit_USB_LUN() local
611 if ( (pMass_stor = Mass_stor_us[uPort]) == NULL) in ms_bInit_USB_LUN()
614 LunDevice = pMass_stor->msc_device; in ms_bInit_USB_LUN()
616 if(!quirk_bypass_stage(pMass_stor, QUIRK_IGNORE_TUR)) in ms_bInit_USB_LUN()
630 SCSI_DbgPrint("SCSI INQUIRY : SCSI Device ID <%s>\n",&pMass_stor->device.u8VendorID); in ms_bInit_USB_LUN()
631 SCSI_DbgPrint("SCSI INQUIRY : SCSI Product ID <%s>\n",&pMass_stor->device.u8ProductID); in ms_bInit_USB_LUN()
632 … SCSI_DbgPrint("SCSI INQUIRY : SCSI Product ver <%s>\n",&pMass_stor->device.u8ProductVer); in ms_bInit_USB_LUN()
638 LunDevice[uLunIdx].u8DevType = pMass_stor->device.u8DeviceType; in ms_bInit_USB_LUN()
640 if(!quirk_bypass_stage(pMass_stor, QUIRK_IGNORE_CD_ROM)) in ms_bInit_USB_LUN()
650 if(quirk_bypass_stage(pMass_stor, QUIRK_IGNORE_RD_CAP)) in ms_bInit_USB_LUN()
675 if(!quirk_bypass_stage(pMass_stor, QUIRK_IGNORE_MOD_SENSE)) in ms_bInit_USB_LUN()
694 struct ms_usdata *pMass_stor; in ms_bSCSI_Initial() local
699 if ( (pMass_stor = Mass_stor_us[uPort]) == NULL) in ms_bSCSI_Initial()
702 LunDevice = pMass_stor->msc_device; in ms_bSCSI_Initial()
705 for (LunIdx=0; LunIdx<=pMass_stor->max_lun; LunIdx++) in ms_bSCSI_Initial()
714 pMass_stor->device.u8DeviceType = (pIngBuf[0] & 0x1F); in ms_bSCSI_Initial()
716 memcpy(pMass_stor->device.u8VendorID, &pIngBuf[8], 8); in ms_bSCSI_Initial()
718 memcpy(pMass_stor->device.u8ProductID, &pIngBuf[16], 16); in ms_bSCSI_Initial()
720 memcpy(pMass_stor->device.u8ProductVer, &pIngBuf[32], 4); in ms_bSCSI_Initial()
721 … SCSI_DbgPrint("SCSI INQUIRY : SCSI Device ID <%s>\n",&pMass_stor->device.u8VendorID); in ms_bSCSI_Initial()
722 … SCSI_DbgPrint("SCSI INQUIRY : SCSI Product ID <%s>\n",&pMass_stor->device.u8ProductID); in ms_bSCSI_Initial()
723 … SCSI_DbgPrint("SCSI INQUIRY : SCSI Product ver <%s>\n",&pMass_stor->device.u8ProductVer); in ms_bSCSI_Initial()
737 for (LunIdx=0; LunIdx<=pMass_stor->max_lun; LunIdx++) in ms_bSCSI_Initial()
773 struct ms_usdata *pMass_stor; in ms_bInit_USB_Disk() local
776 if ( (pMass_stor = Mass_stor_us[uPort]) == NULL) in ms_bInit_USB_Disk()
779 for (i=0; i<=pMass_stor->max_lun; i++) in ms_bInit_USB_Disk()
782 pMass_stor->msc_device[i].u8LunNum = i; in ms_bInit_USB_Disk()
790 struct ms_usdata *pMass_stor; in ms_vChk_USB_LUNs() local
796 if ( (pMass_stor = Mass_stor_us[uPort]) == NULL) in ms_vChk_USB_LUNs()
799 LunDevice = pMass_stor->msc_device; in ms_vChk_USB_LUNs()
801 for (LunIdx=0; LunIdx<=pMass_stor->max_lun; LunIdx++) in ms_vChk_USB_LUNs()
826 ms_set_bit(MS_IDX_DISCONNECTING, &pMass_stor->flags, unsigned long); in ms_vChk_USB_LUNs()
848 struct ms_usdata *pMass_stor;
851 if ( (pMass_stor = Mass_stor_us[uPort]) == NULL)
854 LunDevice = pMass_stor->msc_device;
856 for (LunIdx=0; LunIdx<=pMass_stor->max_lun; LunIdx++)
876 struct ms_usdata *pMass_stor;
892 if ( (pMass_stor = Mass_stor_us[uPort]) == NULL)
898 LunDevice = pMass_stor->msc_device;
987 struct ms_usdata *pMass_stor; in ms_bSCSI_Read_10() local
996 if ( (pMass_stor = Mass_stor_us[uPort]) == NULL) in ms_bSCSI_Read_10()
999 if (ms_test_bit(MS_IDX_DISCONNECTING, &pMass_stor->flags)) in ms_bSCSI_Read_10()
1005 host_id = pMass_stor->host_id; in ms_bSCSI_Read_10()
1012 if ( (pMass_stor = Mass_stor_us[uPort]) == NULL) in ms_bSCSI_Read_10()
1018 LunDevice = pMass_stor->msc_device; in ms_bSCSI_Read_10()
1021 if (uLunNum > pMass_stor->max_lun) in ms_bSCSI_Read_10()
1055 struct usb_hcd *hcd = pMass_stor->pusb_dev->bus->hcpriv; in ms_bSCSI_Read_10()
1064 ms_set_bit(MS_IDX_DISCONNECTING, &pMass_stor->flags, unsigned long); in ms_bSCSI_Read_10()
1075 if ( (pMass_stor = Mass_stor_us[uPort]) == NULL) in ms_bSCSI_Read_10()
1082 memset(&pMass_stor->srb, 0, sizeof(struct scMsc_cmd )); in ms_bSCSI_Read_10()
1085 ms_vSCSICmd_READ_10(pMass_stor, uLunNum, in ms_bSCSI_Read_10()
1088 ms_usb_msc_control_thread(pMass_stor); in ms_bSCSI_Read_10()
1089 if (pMass_stor->srb.result != MS_STAT_GOOD) in ms_bSCSI_Read_10()
1091 if (pMass_stor->srb.result == MS_STAT_CHECK_CONDITION) in ms_bSCSI_Read_10()
1093 if(((pMass_stor->srb.sense_buffer[2] & 0xf) == 0x02) && in ms_bSCSI_Read_10()
1094 (pMass_stor->srb.sense_buffer[12] == 0x3A)) in ms_bSCSI_Read_10()
1098 else if(((pMass_stor->srb.sense_buffer[2] & 0xf) == 0x06) && in ms_bSCSI_Read_10()
1099 (pMass_stor->srb.sense_buffer[12] == 0x28)) in ms_bSCSI_Read_10()
1108 if (pMass_stor->srb.result == (DID_NO_CONNECT << 16)) in ms_bSCSI_Read_10()
1135 struct ms_usdata *pMass_stor;
1150 if ( (pMass_stor = Mass_stor_us[uPort]) == NULL)
1156 LunDevice = pMass_stor->msc_device;
1246 struct ms_usdata *pMass_stor; in ms_bSCSI_Write_10() local
1256 if ( (pMass_stor = Mass_stor_us[uPort]) == NULL) in ms_bSCSI_Write_10()
1259 if (ms_test_bit(MS_IDX_DISCONNECTING, &pMass_stor->flags)) in ms_bSCSI_Write_10()
1265 host_id = pMass_stor->host_id; in ms_bSCSI_Write_10()
1272 if ( (pMass_stor = Mass_stor_us[uPort]) == NULL) in ms_bSCSI_Write_10()
1278 LunDevice = pMass_stor->msc_device; in ms_bSCSI_Write_10()
1282 if (uLunNum > pMass_stor->max_lun) in ms_bSCSI_Write_10()
1298 if(pMass_stor->msc_device[uLunNum].bWriteProtect) in ms_bSCSI_Write_10()
1322 struct usb_hcd *hcd = pMass_stor->pusb_dev->bus->hcpriv; in ms_bSCSI_Write_10()
1331 struct usb_hcd *hcd = pMass_stor->pusb_dev->bus->hcpriv; in ms_bSCSI_Write_10()
1340 ms_set_bit(MS_IDX_DISCONNECTING, &pMass_stor->flags, unsigned long); in ms_bSCSI_Write_10()
1362 if ( (pMass_stor = Mass_stor_us[uPort]) == NULL) in ms_bSCSI_Write_10()
1382 memset(&pMass_stor->srb, 0, sizeof(struct scMsc_cmd )); in ms_bSCSI_Write_10()
1385 ms_vSCSICmd_WRITE_10(pMass_stor, uLunNum, in ms_bSCSI_Write_10()
1389 ms_usb_msc_control_thread(pMass_stor); in ms_bSCSI_Write_10()
1391 if(pMass_stor->srb.result != MS_STAT_GOOD) in ms_bSCSI_Write_10()
1393 if (pMass_stor->srb.result == MS_STAT_CHECK_CONDITION) in ms_bSCSI_Write_10()
1395 if(((pMass_stor->srb.sense_buffer[2] & 0xf) == 0x02) && in ms_bSCSI_Write_10()
1396 (pMass_stor->srb.sense_buffer[12] == 0x3A)) in ms_bSCSI_Write_10()
1400 else if(((pMass_stor->srb.sense_buffer[2] & 0xf) == 0x06) && in ms_bSCSI_Write_10()
1401 (pMass_stor->srb.sense_buffer[12] == 0x28)) in ms_bSCSI_Write_10()
1410 if (pMass_stor->srb.result == (DID_NO_CONNECT << 16)) in ms_bSCSI_Write_10()
1586 struct ms_usdata *pMass_stor = Mass_stor_us[us_id]; in ms_MSC_fast_device_disconnect() local
1587 ms_set_bit(MS_IDX_DISCONNECTING, &pMass_stor->flags, unsigned long); in ms_MSC_fast_device_disconnect()
1618 struct ms_usdata *pMass_stor = Mass_stor_us[us_id]; in ms_MSC_device_inquiry() local
1620 if (ms_test_bit(MS_IDX_DISCONNECTING, &pMass_stor->flags)) in ms_MSC_device_inquiry()
1632 struct ms_usdata *pMass_stor = Mass_stor_us[us_id]; in ms_MSC_device_inquiry() local
1633 struct LUN_Device* LunDevice = pMass_stor->msc_device; in ms_MSC_device_inquiry()