Exploit databaseDownload repository ZIP
GH-b6f78b211ff4ea5e7b3ebffe1f088758
abrarkhan/linux-4.19.72_cve-2020-24490
Sources for CVE-2020-24490
5 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files66
abrarkhan/linux-4.19.72_cve-2020-24490Revision aa3f6929b62b
- ↑..Parent directory
- association.h
- audio-v2.h
- audio-v3.h
- audio.h
- c67x00.h
- cdc-wdm.h
- cdc.h
- cdc_ncm.h
- ch9.h
- chipidea.h
- composite.h
- ehci-dbgp.h
- ehci_def.h
- ehci_pdriver.h
- ezusb.h
- functionfs.h
- g_hid.h
- gadget.h
- gadget_configfs.h
- gpio_vbus.h
- hcd.h
- input.h
- iowarrior.h
- irda.h
- isp116x.h
- isp1301.h
- isp1362.h
- isp1760.h
- m66592.h
- musb-ux500.h
- musb.h
- net2280.h
- of.h
- ohci_pdriver.h
- otg-fsm.h
- otg.h
- pd.h
- pd_ado.h
- pd_bdo.h
- pd_ext_sdb.h
- pd_vdo.h
- phy.h
- phy_companion.h
- quirks.h
- r8a66597.h
- renesas_usbhs.h
- rndis_host.h
- role.h
- samsung_usb_phy.h
- serial.h
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
include/linux/usb/renesas_usbhs.h
Text · 5,081 bytes// SPDX-License-Identifier: GPL-1.0+
/*
* Renesas USB
*
* Copyright (C) 2011 Renesas Solutions Corp.
* Kuninori Morimoto <[email protected]>
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef RENESAS_USB_H
#define RENESAS_USB_H
#include <linux/notifier.h>
#include <linux/platform_device.h>
#include <linux/usb/ch9.h>
/*
* module type
*
* it will be return value from get_id
*/
enum {
USBHS_HOST = 0,
USBHS_GADGET,
USBHS_MAX,
};
/*
* callback functions table for driver
*
* These functions are called from platform for driver.
* Callback function's pointer will be set before
* renesas_usbhs_platform_callback :: hardware_init was called
*/
struct renesas_usbhs_driver_callback {
int (*notify_hotplug)(struct platform_device *pdev);
};
/*
* callback functions for platform
*
* These functions are called from driver for platform
*/
struct renesas_usbhs_platform_callback {
/*
* option:
*
* Hardware init function for platform.
* it is called when driver was probed.
*/
int (*hardware_init)(struct platform_device *pdev);
/*
* option:
*
* Hardware exit function for platform.
* it is called when driver was removed
*/
int (*hardware_exit)(struct platform_device *pdev);
/*
* option:
*
* for board specific clock control
*/
int (*power_ctrl)(struct platform_device *pdev,
void __iomem *base, int enable);
/*
* option:
*
* Phy reset for platform
*/
int (*phy_reset)(struct platform_device *pdev);
/*
* get USB ID function
* - USBHS_HOST
* - USBHS_GADGET
*/
int (*get_id)(struct platform_device *pdev);
/*
* get VBUS status function.
*/
int (*get_vbus)(struct platform_device *pdev);
/*
* option:
*
* VBUS control is needed for Host
*/
int (*set_vbus)(struct platform_device *pdev, int enable);
/*
* option:
* extcon notifier to set host/peripheral mode.
*/
int (*notifier)(struct notifier_block *nb, unsigned long event,
void *data);
};
/*
* parameters for renesas usbhs
*
* some register needs USB chip specific parameters.
* This struct show it to driver
*/
struct renesas_usbhs_driver_pipe_config {
u8 type; /* USB_ENDPOINT_XFER_xxx */
u16 bufsize;
u8 bufnum;
bool double_buf;
};
#define RENESAS_USBHS_PIPE(_type, _size, _num, _double_buf) { \
.type = (_type), \
.bufsize = (_size), \
.bufnum = (_num), \
.double_buf = (_double_buf), \
}
struct renesas_usbhs_driver_param {
/*
* pipe settings
*/
struct renesas_usbhs_driver_pipe_config *pipe_configs;
int pipe_size; /* pipe_configs array size */
/*
* option:
*
* for BUSWAIT :: BWAIT
* see
* renesas_usbhs/common.c :: usbhsc_set_buswait()
* */
int buswait_bwait;
/*
* option:
*
* delay time from notify_hotplug callback
*/
int detection_delay; /* msec */
/*
* option:
*
* dma id for dmaengine
* The data transfer direction on D0FIFO/D1FIFO should be
* fixed for keeping consistency.
* So, the platform id settings will be..
* .d0_tx_id = xx_TX,
* .d1_rx_id = xx_RX,
* or
* .d1_tx_id = xx_TX,
* .d0_rx_id = xx_RX,
*/
int d0_tx_id;
int d0_rx_id;
int d1_tx_id;
int d1_rx_id;
int d2_tx_id;
int d2_rx_id;
int d3_tx_id;
int d3_rx_id;
/*
* option:
*
* pio <--> dma border.
*/
int pio_dma_border; /* default is 64byte */
uintptr_t type;
u32 enable_gpio;
/*
* option:
*/
u32 has_otg:1; /* for controlling PWEN/EXTLP */
u32 has_sudmac:1; /* for SUDMAC */
u32 has_usb_dmac:1; /* for USB-DMAC */
#define USBHS_USB_DMAC_XFER_SIZE 32 /* hardcode the xfer size */
};
#define USBHS_TYPE_RCAR_GEN2 1
#define USBHS_TYPE_RCAR_GEN3 2
#define USBHS_TYPE_RCAR_GEN3_WITH_PLL 3
#define USBHS_TYPE_RZA1 4
/*
* option:
*
* platform information for renesas_usbhs driver.
*/
struct renesas_usbhs_platform_info {
/*
* option:
*
* platform set these functions before
* call platform_add_devices if needed
*/
struct renesas_usbhs_platform_callback platform_callback;
/*
* driver set these callback functions pointer.
* platform can use it on callback functions
*/
struct renesas_usbhs_driver_callback driver_callback;
/*
* option:
*
* driver use these param for some register
*/
struct renesas_usbhs_driver_param driver_param;
};
/*
* macro for platform
*/
#define renesas_usbhs_get_info(pdev)\
((struct renesas_usbhs_platform_info *)(pdev)->dev.platform_data)
#define renesas_usbhs_call_notify_hotplug(pdev) \
({ \
struct renesas_usbhs_driver_callback *dc; \
dc = &(renesas_usbhs_get_info(pdev)->driver_callback); \
if (dc && dc->notify_hotplug) \
dc->notify_hotplug(pdev); \
})
#endif /* RENESAS_USB_H */