1. 16 Feb, 2016 2 commits
    • Sudeep Holla's avatar
      firmware: arm_scpi: decrease Tx timeout to 20ms · 3bdd8843
      Sudeep Holla authored
      Currently we have Tx timeout of 50ms while Rx timeout of 20 ms. Tx state
      machine is maintained by the mailbox framework and Rx by SCPI driver.
      
      It is possible that before msg_submit call tx_prepare(because of other
      message in the queue and the channel being active), wait for completion
      in scpi_send_message times out and the buffers are freed. In that case
      when Tx state machine timer goes off later, poll_txdone calls
      scpi_tx_prepare on that message, which adds it to the rx_pending list,
      corrupting link pointers.
      
      This patch reduces the Tx timeout to 20ms and increases Rx timeout to
      30ms to avoid the above mentioned issue.
      Reported-by: default avatarJon Medhurst (Tixy) <tixy@linaro.org>
      Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
      3bdd8843
    • Sudeep Holla's avatar
      firmware: arm_scpi: fix send_message and sensor_get_value for big-endian · dd9a1d69
      Sudeep Holla authored
      scpi_process_cmd converts the status word from little endian to cpu
      endianness. However scpi_send_message again does the conversion which is
      wrong and shows up as a bug only when running in big-endian kernel.
      
      Similarly scpi_sensor_get_value passes the sensor index in the cpu
      endianness to SCP which results in SCPI_ERR_RANGE in big-endian mode.
      
      This patch fixes the above mentioned issue for big-endian kernel.
      Acked-by: default avatarPunit Agrawal <punit.agrawal@arm.com>
      Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
      dd9a1d69
  2. 24 Jan, 2016 38 commits