/* This function re-uses a previously-allocated Command, there is no failure mode from trying to allocate a command.  */
static void DAC960_queue_partial_rw(DAC960_Command_T *Command)
/* This function re-uses a previously-allocated Command, there is no failure mode from trying to allocate a command.  */
static void DAC960_queue_partial_rw(DAC960_Command_T *Command)
{
  DAC960_Controller_T *Controller = Command->Controller;
  struct request *Request = Command->Request;
  struct request_queue *req_q = Controller->RequestQueue[Command->LogicalDriveNumber];
  if (Command->DmaDirection == PCI_DMA_FROMDEVICE)
    Command->CommandType = DAC960_ReadRetryCommand;
  else
    Command->CommandType = DAC960_WriteRetryCommand;
  (void)blk_rq_map_sg(req_q, Command->Request, Command->cmd_sglist);
  (void)pci_map_sg(Controller->PCIDevice, Command->cmd_sglist, 1, Command->DmaDirection);
  Command->SegmentCount = 1;
  Command->BlockNumber = blk_rq_pos(Request);
  Command->BlockCount = 1;
  DAC960_QueueReadWriteCommand(Command);
  return;
}