Function report | 
Source Code:block\bsg.c | 
Create Date:2022-07-28 17:37:27 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:bsg_scsi_complete_rq
Proto:static int bsg_scsi_complete_rq(struct request *rq, struct sg_io_v4 *hdr)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct request * | rq | |
| struct sg_io_v4 * | hdr | 
| 92 | ret = 0 | 
| 97 | [o] {SCSI: command completion status} = result & 0xff | 
| 98 | [o] 0 -> ok = host_byte(result) | 
| 99 | [o] 0 -> ok = driver_byte(result) | 
| 100 | [o] additional information = 0 | 
| 101 | If [o] {SCSI: command completion status} || [o] 0 -> ok || [o] 0 -> ok Then [o] additional information |= something abnormal happened | 
| 105 | If sense_len && [i], [*o] {SCSI: (auto)sense data} Then | 
| 106 | len = min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(unsignedint, [i] in bytes , sense_len) | 
| 109 | If copy_to_user(uptr64( [i], [*o] {SCSI: (auto)sense data} ), sense, len) Then ret = -EFAULT | 
| 111 | Else [o] bytes of response actually written = len | 
| 115 | If rq_data_dir(rq) == generic data direction definitions Then [o] din_xfer_len - actual_din_xfer_len = residual count | 
| 120 | Return ret | 
| Source code conversion tool public plug-in interface  | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion  |