FreeBSD Bugzilla – Attachment 218033 Details for
Bug 249395
Regression in 12.stable/12.2-beta: sg driver not working for makemkv
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
debug.patch
scsi_sg.c.patch (text/plain), 1.34 KB, created by
John Baldwin
on 2020-09-17 20:35:42 UTC
(
hide
)
Description:
debug.patch
Filename:
MIME Type:
Creator:
John Baldwin
Created:
2020-09-17 20:35:42 UTC
Size:
1.34 KB
patch
obsolete
>diff --git a/sys/cam/scsi/scsi_sg.c b/sys/cam/scsi/scsi_sg.c >index 7a28ccf732af..a6359ec5c4f5 100644 >--- a/sys/cam/scsi/scsi_sg.c >+++ b/sys/cam/scsi/scsi_sg.c >@@ -553,6 +553,8 @@ sgioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td) > } > > if (req->dxfer_len > MAXPHYS) { >+ printf("%s: dxfer_len (%u) > MAXPHYS (%u)\n", >+ __func__, req->dxfer_len, MAXPHYS); > error = EINVAL; > break; > } >@@ -578,7 +580,7 @@ sgioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td) > dir = CAM_DIR_IN; > break; > case SG_DXFER_TO_FROM_DEV: >- dir = CAM_DIR_BOTH; >+ dir = CAM_DIR_IN | CAM_DIR_OUT; > break; > case SG_DXFER_NONE: > default: >@@ -586,7 +588,7 @@ sgioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td) > break; > } > >- if (dir == CAM_DIR_IN || dir == CAM_DIR_BOTH) { >+ if (dir & CAM_DIR_IN) { > error = copyin(req->dxferp, data_ptr, req->dxfer_len); > if (error) { > free(data_ptr, M_DEVBUF); >@@ -629,7 +631,7 @@ sgioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td) > req->sb_len_wr); > } > >- if ((dir == CAM_DIR_OUT || dir == CAM_DIR_BOTH) && error == 0) >+ if ((dir & CAM_DIR_OUT) && error == 0) > error = copyout(data_ptr, req->dxferp, req->dxfer_len); > > free(data_ptr, M_DEVBUF);
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 249395
: 218033 |
218184
|
218185
|
218194