mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 03:28:45 +07:00
mt76: usb: add lockdep_assert_held in __mt76u_vendor_request
Introduce lockdep_assert_held macro in __mt76u_vendor_request routine and remove comments regarding usb_ctrl_mtx lock Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
a670111131
commit
af3076db14
@ -15,7 +15,6 @@ static bool disable_usb_sg;
|
|||||||
module_param_named(disable_usb_sg, disable_usb_sg, bool, 0644);
|
module_param_named(disable_usb_sg, disable_usb_sg, bool, 0644);
|
||||||
MODULE_PARM_DESC(disable_usb_sg, "Disable usb scatter-gather support");
|
MODULE_PARM_DESC(disable_usb_sg, "Disable usb scatter-gather support");
|
||||||
|
|
||||||
/* should be called with usb_ctrl_mtx locked */
|
|
||||||
static int __mt76u_vendor_request(struct mt76_dev *dev, u8 req,
|
static int __mt76u_vendor_request(struct mt76_dev *dev, u8 req,
|
||||||
u8 req_type, u16 val, u16 offset,
|
u8 req_type, u16 val, u16 offset,
|
||||||
void *buf, size_t len)
|
void *buf, size_t len)
|
||||||
@ -24,6 +23,8 @@ static int __mt76u_vendor_request(struct mt76_dev *dev, u8 req,
|
|||||||
unsigned int pipe;
|
unsigned int pipe;
|
||||||
int i, ret;
|
int i, ret;
|
||||||
|
|
||||||
|
lockdep_assert_held(&dev->usb.usb_ctrl_mtx);
|
||||||
|
|
||||||
pipe = (req_type & USB_DIR_IN) ? usb_rcvctrlpipe(udev, 0)
|
pipe = (req_type & USB_DIR_IN) ? usb_rcvctrlpipe(udev, 0)
|
||||||
: usb_sndctrlpipe(udev, 0);
|
: usb_sndctrlpipe(udev, 0);
|
||||||
for (i = 0; i < MT_VEND_REQ_MAX_RETRY; i++) {
|
for (i = 0; i < MT_VEND_REQ_MAX_RETRY; i++) {
|
||||||
@ -60,7 +61,6 @@ int mt76u_vendor_request(struct mt76_dev *dev, u8 req,
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(mt76u_vendor_request);
|
EXPORT_SYMBOL_GPL(mt76u_vendor_request);
|
||||||
|
|
||||||
/* should be called with usb_ctrl_mtx locked */
|
|
||||||
static u32 __mt76u_rr(struct mt76_dev *dev, u32 addr)
|
static u32 __mt76u_rr(struct mt76_dev *dev, u32 addr)
|
||||||
{
|
{
|
||||||
struct mt76_usb *usb = &dev->usb;
|
struct mt76_usb *usb = &dev->usb;
|
||||||
@ -103,7 +103,6 @@ static u32 mt76u_rr(struct mt76_dev *dev, u32 addr)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* should be called with usb_ctrl_mtx locked */
|
|
||||||
static void __mt76u_wr(struct mt76_dev *dev, u32 addr, u32 val)
|
static void __mt76u_wr(struct mt76_dev *dev, u32 addr, u32 val)
|
||||||
{
|
{
|
||||||
struct mt76_usb *usb = &dev->usb;
|
struct mt76_usb *usb = &dev->usb;
|
||||||
|
Loading…
Reference in New Issue
Block a user