FreeBSD Bugzilla – Attachment 218194 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]
revert.patch
file_249395.txt (text/plain), 2.03 KB, created by
John Baldwin
on 2020-09-22 21:33:35 UTC
(
hide
)
Description:
revert.patch
Filename:
MIME Type:
Creator:
John Baldwin
Created:
2020-09-22 21:33:35 UTC
Size:
2.03 KB
patch
obsolete
>Index: scsi_sg.c >=================================================================== >--- scsi_sg.c (revision 364733) >+++ scsi_sg.c (working copy) >@@ -508,7 +508,6 @@ sgioctl(struct cdev *dev, u_long cmd, caddr_t arg, > struct cam_periph *periph; > struct sg_softc *softc; > struct sg_io_hdr *req; >- void *data_ptr; > int dir, error; > > periph = (struct cam_periph *)dev->si_drv1; >@@ -553,13 +552,6 @@ sgioctl(struct cdev *dev, u_long cmd, caddr_t arg, > break; > } > >- if (req->dxfer_len > MAXPHYS) { >- error = EINVAL; >- break; >- } >- >- data_ptr = malloc(req->dxfer_len, M_DEVBUF, M_WAITOK); >- > ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); > csio = &ccb->csio; > >@@ -566,7 +558,6 @@ sgioctl(struct cdev *dev, u_long cmd, caddr_t arg, > error = copyin(req->cmdp, &csio->cdb_io.cdb_bytes, > req->cmd_len); > if (error) { >- free(data_ptr, M_DEVBUF); > xpt_release_ccb(ccb); > break; > } >@@ -587,21 +578,12 @@ sgioctl(struct cdev *dev, u_long cmd, caddr_t arg, > break; > } > >- if (dir == CAM_DIR_IN || dir == CAM_DIR_BOTH) { >- error = copyin(req->dxferp, data_ptr, req->dxfer_len); >- if (error) { >- free(data_ptr, M_DEVBUF); >- xpt_release_ccb(ccb); >- break; >- } >- } >- > cam_fill_csio(csio, > /*retries*/1, > /*cbfcnp*/NULL, > dir|CAM_DEV_QFRZDIS, > MSG_SIMPLE_Q_TAG, >- data_ptr, >+ req->dxferp, > req->dxfer_len, > req->mx_sb_len, > req->cmd_len, >@@ -611,7 +593,6 @@ sgioctl(struct cdev *dev, u_long cmd, caddr_t arg, > if (error) { > req->host_status = DID_ERROR; > req->driver_status = DRIVER_INVALID; >- free(data_ptr, M_DEVBUF); > xpt_release_ccb(ccb); > break; > } >@@ -630,10 +611,6 @@ sgioctl(struct cdev *dev, u_long cmd, caddr_t arg, > req->sb_len_wr); > } > >- if ((dir == CAM_DIR_OUT || dir == CAM_DIR_BOTH) && error == 0) >- error = copyout(data_ptr, req->dxferp, req->dxfer_len); >- >- free(data_ptr, M_DEVBUF); > xpt_release_ccb(ccb); > break; >
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