From: <sean.wang@mediatek.com>
To: <lorenzo.bianconi@redhat.com>
Cc: <nbd@nbd.name>, <sean.wang@mediatek.com>,
<Soul.Huang@mediatek.com>, <YN.Chen@mediatek.com>,
<Leon.Yen@mediatek.com>, <Eric-SY.Chang@mediatek.com>,
<Mark-YW.Chen@mediatek.com>, <Deren.Wu@mediatek.com>,
<km.lin@mediatek.com>, <jenhao.yang@mediatek.com>,
<robin.chiu@mediatek.com>, <Eddie.Chen@mediatek.com>,
<ch.yeh@mediatek.com>, <posh.sun@mediatek.com>,
<ted.huang@mediatek.com>, <Eric.Liang@mediatek.com>,
<Stella.Chang@mediatek.com>, <Tom.Chou@mediatek.com>,
<steve.lee@mediatek.com>, <jsiuda@google.com>,
<frankgor@google.com>, <jemele@google.com>,
<abhishekpandit@google.com>, <shawnku@google.com>,
<linux-wireless@vger.kernel.org>,
<linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH 2/3] mt76: sdio: honor the largest Tx buffer the hardware can support
Date: Fri, 14 Jan 2022 06:43:38 +0800 [thread overview]
Message-ID: <1642113818-9675-1-git-send-email-sean.wang@mediatek.com> (raw)
In-Reply-To: <Yd/sYYP1XJ3J8RuR@lore-desk--annotate>
From: Sean Wang <sean.wang@mediatek.com>
<snip>
>> @@ -299,6 +301,17 @@ int mt76s_hw_init(struct mt76_dev *dev, struct
>> sdio_func *func, int hw_ver) } EXPORT_SYMBOL_GPL(mt76s_hw_init);
>>
>> +u32 mt76s_get_xmit_buf_sz(struct mt76_dev *dev, u32 dev_max_len) {
>> + struct sdio_func *func = dev->sdio.func;
>> + u32 host_max_len = min_t(u32, func->card->host->max_req_size,
>> + func->cur_blksize *
>> + func->card->host->max_blk_count);
>> +
>> + return min_t(u32, host_max_len, dev_max_len); }
>> +EXPORT_SYMBOL_GPL(mt76s_get_xmit_buf_sz);
>
>I think we can squash this patch with the previous one and move the code above in mt76s_init(). Agree?
these comments you have in the patchset all look fine to me, I will post v2 soon.
Sean
>
>Regards,
>Lorenzo
>
>> +
>> int mt76s_alloc_rx_queue(struct mt76_dev *dev, enum mt76_rxq_id qid)
>> {
>> struct mt76_queue *q = &dev->q_rx[qid]; diff --git
>> a/drivers/net/wireless/mediatek/mt76/sdio_txrx.c
>> b/drivers/net/wireless/mediatek/mt76/sdio_txrx.c
>> index a04cd2444247..9fcf507e09bd 100644
>> --- a/drivers/net/wireless/mediatek/mt76/sdio_txrx.c
>> +++ b/drivers/net/wireless/mediatek/mt76/sdio_txrx.c
>> @@ -254,7 +254,7 @@ static int mt76s_tx_run_queue(struct mt76_dev *dev, struct mt76_queue *q)
>> }
>>
>> pad = roundup(e->skb->len, 4) - e->skb->len;
>> - if (len + e->skb->len + pad + 4 > MT76S_XMIT_BUF_SZ)
>> + if (len + e->skb->len + pad + 4 > dev->sdio.xmit_buf_sz)
>> break;
>>
>> if (mt76s_tx_pick_quota(sdio, mcu, e->buf_sz, &pse_sz,
>> --
>> 2.25.1
>>
>
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
next parent reply other threads:[~2022-01-13 22:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Yd/sYYP1XJ3J8RuR@lore-desk--annotate>
2022-01-13 22:43 ` sean.wang [this message]
2022-01-13 8:23 [PATCH 1/3] mt76: sdio: remove those unnecessary buffers in sdio.xmit_buf sean.wang
2022-01-13 8:23 ` [PATCH 2/3] mt76: sdio: honor the largest Tx buffer the hardware can support sean.wang
2022-01-13 9:09 ` Lorenzo Bianconi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1642113818-9675-1-git-send-email-sean.wang@mediatek.com \
--to=sean.wang@mediatek.com \
--cc=Deren.Wu@mediatek.com \
--cc=Eddie.Chen@mediatek.com \
--cc=Eric-SY.Chang@mediatek.com \
--cc=Eric.Liang@mediatek.com \
--cc=Leon.Yen@mediatek.com \
--cc=Mark-YW.Chen@mediatek.com \
--cc=Soul.Huang@mediatek.com \
--cc=Stella.Chang@mediatek.com \
--cc=Tom.Chou@mediatek.com \
--cc=YN.Chen@mediatek.com \
--cc=abhishekpandit@google.com \
--cc=ch.yeh@mediatek.com \
--cc=frankgor@google.com \
--cc=jemele@google.com \
--cc=jenhao.yang@mediatek.com \
--cc=jsiuda@google.com \
--cc=km.lin@mediatek.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=nbd@nbd.name \
--cc=posh.sun@mediatek.com \
--cc=robin.chiu@mediatek.com \
--cc=shawnku@google.com \
--cc=steve.lee@mediatek.com \
--cc=ted.huang@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox