> static int ufs_bsg_verify_query_size(struct ufs_hba *hba, > unsigned int request_len, > - unsigned int reply_len, > - int desc_len, enum query_opcode desc_op) > + unsigned int reply_len) > { > int min_req_len = sizeof(struct ufs_bsg_request); > int min_rsp_len = sizeof(struct ufs_bsg_reply); > > - if (desc_op == UPIU_QUERY_OPCODE_WRITE_DESC) > - min_req_len += desc_len; > - I think this calling convention cleanup should go into a ѕeparate prep patch with its own changelog. > + descp = kzalloc(*desc_len, GFP_KERNEL); > + if (!descp) > + return -ENOMEM; > + > + if (desc_op == UPIU_QUERY_OPCODE_WRITE_DESC) > + sg_copy_to_buffer(job->request_payload.sg_list, > + job->request_payload.sg_cnt, descp, > + *desc_len); So we always need to bounce buffer here? Is there any good reason we can't pass through the sglist to the low-level functions? and share the low-level code used in ->queuecommand? Also isn't this an ABI change for the write side? Are we sure there are not existing users relying on it? Is there an API document that needs to be updated? Last but not least the commit log needs to be a lot more detailed.