FreeBSD Bugzilla – Attachment 191128 Details for
Bug 225794
VM images for 12.0-CURRENT have problem with USB 3.0 ports
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Use MODE SENSE (6) for USB
usb-mode-sense-6.diff (text/plain), 2.41 KB, created by
Andriy Gapon
on 2018-03-02 09:43:36 UTC
(
hide
)
Description:
Use MODE SENSE (6) for USB
Filename:
MIME Type:
Creator:
Andriy Gapon
Created:
2018-03-02 09:43:36 UTC
Size:
2.41 KB
patch
obsolete
>diff --git a/sys/cam/cam_ccb.h b/sys/cam/cam_ccb.h >index 18022d2c125e3..794aab67bae5a 100644 >--- a/sys/cam/cam_ccb.h >+++ b/sys/cam/cam_ccb.h >@@ -601,6 +601,7 @@ typedef enum { > } pi_tmflag; > > typedef enum { >+ PIM_MODESENSE_6 = 0x400,/* Always use MODE SENSE (6) command */ > PIM_ATA_EXT = 0x200,/* ATA requests can understand ata_ext requests */ > PIM_EXTLUNS = 0x100,/* 64bit extended LUNs supported */ > PIM_SCANHILO = 0x80, /* Bus scans from high ID to low ID */ >diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c >index eb118e5026c1c..c1ad1f76f047e 100644 >--- a/sys/cam/scsi/scsi_da.c >+++ b/sys/cam/scsi/scsi_da.c >@@ -125,7 +125,8 @@ typedef enum { > DA_Q_NO_UNMAP = 0x20, > DA_Q_RETRY_BUSY = 0x40, > DA_Q_SMR_DM = 0x80, >- DA_Q_STRICT_UNMAP = 0x100 >+ DA_Q_STRICT_UNMAP = 0x100, >+ DA_Q_MODESENSE_6 = 0x200 > } da_quirks; > > #define DA_Q_BIT_STRING \ >@@ -2589,6 +2590,8 @@ daregister(struct cam_periph *periph, void *arg) > softc->disk->d_hba_device = cpi.hba_device; > softc->disk->d_hba_subvendor = cpi.hba_subvendor; > softc->disk->d_hba_subdevice = cpi.hba_subdevice; >+ if ((cpi.hba_misc & PIM_MODESENSE_6) != 0) >+ softc->quirks |= DA_Q_MODESENSE_6; > > /* > * Acquire a reference to the periph before we register with GEOM. >@@ -3095,7 +3098,12 @@ out: > { > void *mode_buf; > int mode_buf_len; >+ int cmd_size; > >+ if ((softc->quirks & DA_Q_MODESENSE_6) != 0) >+ cmd_size = 6; >+ else >+ cmd_size = softc->minimum_cmd_size; > mode_buf_len = 192; > mode_buf = malloc(mode_buf_len, M_SCSIDA, M_NOWAIT); > if (mode_buf == NULL) { >@@ -3113,7 +3121,7 @@ out: > /*page*/ SMS_ALL_PAGES_PAGE, > /*param_buf*/ mode_buf, > /*param_len*/ mode_buf_len, >- /*minimum_cmd_size*/ softc->minimum_cmd_size, >+ /*minimum_cmd_size*/ cmd_size, > /*sense_len*/ SSD_FULL_SIZE, > /*timeout*/ da_default_timeout * 1000); > start_ccb->ccb_h.ccb_bp = NULL; >diff --git a/sys/dev/usb/storage/umass.c b/sys/dev/usb/storage/umass.c >index 0f7a5713dee94..e01a06bdbeab1 100644 >--- a/sys/dev/usb/storage/umass.c >+++ b/sys/dev/usb/storage/umass.c >@@ -2309,7 +2309,7 @@ umass_cam_action(struct cam_sim *sim, union ccb *ccb) > cpi->version_num = 1; > cpi->hba_inquiry = 0; > cpi->target_sprt = 0; >- cpi->hba_misc = PIM_NO_6_BYTE; >+ cpi->hba_misc = PIM_NO_6_BYTE | PIM_MODESENSE_6; > cpi->hba_eng_cnt = 0; > cpi->max_target = UMASS_SCSIID_MAX; /* one target */ > cpi->initiator_id = UMASS_SCSIID_HOST;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 225794
:
190466
|
190467
|
190468
|
190469
|
190827
|
190845
|
190847
|
190860
|
190901
|
190908
|
191060
|
191063
|
191120
|
191128
|
191171
|
191172
|
191173
|
191215
|
191268
|
191533