> > > 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. Done > > > + 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? This is a device management command - there isn't really a data phase here, And we are not using any component of queuecommand, Specifically not the scsi command sg list. > > 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? Right. I did updated Documentation/scsi/ufs.txt. It's in the beginning of the patch, you might have missed it. I am counting that ufs-utils will be the first utility to use ufs-bsg, and it's waiting for this series to get accepted first. > > Last but not least the commit log needs to be a lot more detailed. Done.