lkml.org 
[lkml]   [2020]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: WARNING in hif_usb_send/usb_submit_urb
On Fri, Oct 09, 2020 at 02:55:08PM -0700, syzbot wrote:
> Hello,
>
> syzbot tried to test the proposed patch but the build/boot failed:
>
> drivers/net/wireless/ath/ath9k/hif_usb.c:1319:7: error: implicit declaration of function 'usb_find_bulk_in'; did you mean 'usb_fill_bulk_urb'? [-Werror=implicit-function-declaration]

Let's try again, using a different repository.

#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git v5.9-rc8

Index: usb-devel/drivers/net/wireless/ath/ath9k/hif_usb.c
===================================================================
--- usb-devel.orig/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ usb-devel/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -1307,6 +1307,20 @@ static int ath9k_hif_usb_probe(struct us
struct usb_device *udev = interface_to_usbdev(interface);
struct hif_device_usb *hif_dev;
int ret = 0;
+ struct usb_host_interface *alt;
+ struct usb_endpoint_descriptor *epd;
+
+ /* Verify the expected endpoints are present */
+ alt = interface->cur_altsetting;
+ if (!usb_find_int_in_endpoint(alt, &epd) ||
+ usb_endpoint_num(epd) != USB_REG_IN_PIPE ||
+ !usb_find_int_out_endpoint(alt, &epd) ||
+ usb_endpoint_num(epd) != USB_REG_OUT_PIPE ||
+ !usb_find_bulk_in(endpoint(alt, &epd) ||
+ usb_endpoint_num(epd) != USB_WLAN_RX_PIPE ||
+ !usb_find_bulk_out(endpoint(alt, &epd) ||
+ usb_endpoint_num(epd) != USB_WLAN_TX_PIPE)
+ return -ENODEV;

if (id->driver_info == STORAGE_DEVICE)
return send_eject_command(interface);
\
 
 \ /
  Last update: 2020-10-10 04:02    [W:0.101 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site