Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F135505212
D22312.id66739.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D22312.id66739.diff
View Options
Index: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
===================================================================
--- head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
+++ head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
@@ -2278,7 +2278,11 @@
}
ccb->csio.scsi_status = (vm_srb->scsi_status & 0xFF);
- ccb->csio.resid = ccb->csio.dxfer_len - vm_srb->transfer_len;
+ if (srb_status == SRB_STATUS_SUCCESS ||
+ srb_status == SRB_STATUS_DATA_OVERRUN)
+ ccb->csio.resid = ccb->csio.dxfer_len - vm_srb->transfer_len;
+ else
+ ccb->csio.resid = ccb->csio.dxfer_len;
if (reqp->sense_info_len != 0) {
csio->sense_resid = csio->sense_len - reqp->sense_info_len;
Index: head/sys/dev/hyperv/storvsc/hv_vstorage.h
===================================================================
--- head/sys/dev/hyperv/storvsc/hv_vstorage.h
+++ head/sys/dev/hyperv/storvsc/hv_vstorage.h
@@ -245,7 +245,8 @@
#define SRB_STATUS_SUCCESS 0x01
#define SRB_STATUS_ABORTED 0x02
#define SRB_STATUS_ERROR 0x04
-#define SRB_STATUS_INVALID_LUN 0x20
+#define SRB_STATUS_DATA_OVERRUN 0x12
+#define SRB_STATUS_INVALID_LUN 0x20
/**
* SRB Status Masks (can be combined with above status codes)
*/
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 11, 9:37 AM (17 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25153581
Default Alt Text
D22312.id66739.diff (1 KB)
Attached To
Mode
D22312: storvsc: port a Linux patch, properly set residual data length on errors
Attached
Detach File
Event Timeline
Log In to Comment