Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Conflicts were all overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
此提交包含在:
@@ -1063,6 +1063,7 @@ static void gsi_isr_gp_int1(struct gsi *gsi)
|
||||
|
||||
complete(&gsi->completion);
|
||||
}
|
||||
|
||||
/* Inter-EE interrupt handler */
|
||||
static void gsi_isr_glob_ee(struct gsi *gsi)
|
||||
{
|
||||
@@ -1515,6 +1516,12 @@ static int gsi_generic_command(struct gsi *gsi, u32 channel_id,
|
||||
struct completion *completion = &gsi->completion;
|
||||
u32 val;
|
||||
|
||||
/* First zero the result code field */
|
||||
val = ioread32(gsi->virt + GSI_CNTXT_SCRATCH_0_OFFSET);
|
||||
val &= ~GENERIC_EE_RESULT_FMASK;
|
||||
iowrite32(val, gsi->virt + GSI_CNTXT_SCRATCH_0_OFFSET);
|
||||
|
||||
/* Now issue the command */
|
||||
val = u32_encode_bits(opcode, GENERIC_OPCODE_FMASK);
|
||||
val |= u32_encode_bits(channel_id, GENERIC_CHID_FMASK);
|
||||
val |= u32_encode_bits(GSI_EE_MODEM, GENERIC_EE_FMASK);
|
||||
@@ -1820,9 +1827,9 @@ static int gsi_channel_init_one(struct gsi *gsi,
|
||||
|
||||
/* Worst case we need an event for every outstanding TRE */
|
||||
if (data->channel.tre_count > data->channel.event_count) {
|
||||
dev_warn(gsi->dev, "channel %u limited to %u TREs\n",
|
||||
data->channel_id, data->channel.tre_count);
|
||||
tre_count = data->channel.event_count;
|
||||
dev_warn(gsi->dev, "channel %u limited to %u TREs\n",
|
||||
data->channel_id, tre_count);
|
||||
} else {
|
||||
tre_count = data->channel.tre_count;
|
||||
}
|
||||
|
@@ -410,6 +410,8 @@
|
||||
#define INTER_EE_RESULT_FMASK GENMASK(2, 0)
|
||||
#define GENERIC_EE_RESULT_FMASK GENMASK(7, 5)
|
||||
#define GENERIC_EE_SUCCESS_FVAL 1
|
||||
#define GENERIC_EE_INCORRECT_DIRECTION_FVAL 3
|
||||
#define GENERIC_EE_INCORRECT_CHANNEL_FVAL 5
|
||||
#define GENERIC_EE_NO_RESOURCES_FVAL 7
|
||||
#define USB_MAX_PACKET_FMASK GENMASK(15, 15) /* 0: HS; 1: SS */
|
||||
#define MHI_BASE_CHANNEL_FMASK GENMASK(31, 24)
|
||||
|
@@ -1269,6 +1269,67 @@ static void ipa_endpoint_reset(struct ipa_endpoint *endpoint)
|
||||
ret, endpoint->channel_id, endpoint->endpoint_id);
|
||||
}
|
||||
|
||||
static int ipa_endpoint_stop_rx_dma(struct ipa *ipa)
|
||||
{
|
||||
u16 size = IPA_ENDPOINT_STOP_RX_SIZE;
|
||||
struct gsi_trans *trans;
|
||||
dma_addr_t addr;
|
||||
int ret;
|
||||
|
||||
trans = ipa_cmd_trans_alloc(ipa, 1);
|
||||
if (!trans) {
|
||||
dev_err(&ipa->pdev->dev,
|
||||
"no transaction for RX endpoint STOP workaround\n");
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
/* Read into the highest part of the zero memory area */
|
||||
addr = ipa->zero_addr + ipa->zero_size - size;
|
||||
|
||||
ipa_cmd_dma_task_32b_addr_add(trans, size, addr, false);
|
||||
|
||||
ret = gsi_trans_commit_wait_timeout(trans, ENDPOINT_STOP_DMA_TIMEOUT);
|
||||
if (ret)
|
||||
gsi_trans_free(trans);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* ipa_endpoint_stop() - Stops a GSI channel in IPA
|
||||
* @client: Client whose endpoint should be stopped
|
||||
*
|
||||
* This function implements the sequence to stop a GSI channel
|
||||
* in IPA. This function returns when the channel is is STOP state.
|
||||
*
|
||||
* Return value: 0 on success, negative otherwise
|
||||
*/
|
||||
int ipa_endpoint_stop(struct ipa_endpoint *endpoint)
|
||||
{
|
||||
u32 retries = IPA_ENDPOINT_STOP_RX_RETRIES;
|
||||
int ret;
|
||||
|
||||
do {
|
||||
struct ipa *ipa = endpoint->ipa;
|
||||
struct gsi *gsi = &ipa->gsi;
|
||||
|
||||
ret = gsi_channel_stop(gsi, endpoint->channel_id);
|
||||
if (ret != -EAGAIN || endpoint->toward_ipa)
|
||||
break;
|
||||
|
||||
/* For IPA v3.5.1, send a DMA read task and check again */
|
||||
if (ipa->version == IPA_VERSION_3_5_1) {
|
||||
ret = ipa_endpoint_stop_rx_dma(ipa);
|
||||
if (ret)
|
||||
break;
|
||||
}
|
||||
|
||||
msleep(1);
|
||||
} while (retries--);
|
||||
|
||||
return retries ? ret : -EIO;
|
||||
}
|
||||
|
||||
static void ipa_endpoint_program(struct ipa_endpoint *endpoint)
|
||||
{
|
||||
if (endpoint->toward_ipa) {
|
||||
|
新增問題並參考
封鎖使用者