Merge 885f8c873f ("Bluetooth: btusb: Fix regression with fake CSR controllers 0a12:0001") into android15-6.6-lts

Steps on the way to 6.6.57

Change-Id: If1bf8d7b0880373ba6bd551672dca086604b3941
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman 2024-11-21 22:11:21 +00:00
commit 87a957337b
22 changed files with 74 additions and 21 deletions

View File

@ -2327,10 +2327,19 @@ static int ublk_ctrl_add_dev(struct io_uring_cmd *cmd)
* TODO: provide forward progress for RECOVERY handler, so that * TODO: provide forward progress for RECOVERY handler, so that
* unprivileged device can benefit from it * unprivileged device can benefit from it
*/ */
if (info.flags & UBLK_F_UNPRIVILEGED_DEV) if (info.flags & UBLK_F_UNPRIVILEGED_DEV) {
info.flags &= ~(UBLK_F_USER_RECOVERY_REISSUE | info.flags &= ~(UBLK_F_USER_RECOVERY_REISSUE |
UBLK_F_USER_RECOVERY); UBLK_F_USER_RECOVERY);
/*
* For USER_COPY, we depends on userspace to fill request
* buffer by pwrite() to ublk char device, which can't be
* used for unprivileged device
*/
if (info.flags & UBLK_F_USER_COPY)
return -EINVAL;
}
/* the created device is always owned by current user */ /* the created device is always owned by current user */
ublk_store_owner_uid_gid(&info.owner_uid, &info.owner_gid); ublk_store_owner_uid_gid(&info.owner_uid, &info.owner_gid);

View File

@ -1354,10 +1354,15 @@ static int btusb_submit_intr_urb(struct hci_dev *hdev, gfp_t mem_flags)
if (!urb) if (!urb)
return -ENOMEM; return -ENOMEM;
/* Use maximum HCI Event size so the USB stack handles if (le16_to_cpu(data->udev->descriptor.idVendor) == 0x0a12 &&
* ZPL/short-transfer automatically. le16_to_cpu(data->udev->descriptor.idProduct) == 0x0001)
*/ /* Fake CSR devices don't seem to support sort-transter */
size = HCI_MAX_EVENT_SIZE; size = le16_to_cpu(data->intr_ep->wMaxPacketSize);
else
/* Use maximum HCI Event size so the USB stack handles
* ZPL/short-transfer automatically.
*/
size = HCI_MAX_EVENT_SIZE;
buf = kmalloc(size, mem_flags); buf = kmalloc(size, mem_flags);
if (!buf) { if (!buf) {

View File

@ -265,7 +265,7 @@ static int amdgpu_cs_pass1(struct amdgpu_cs_parser *p,
/* Only a single BO list is allowed to simplify handling. */ /* Only a single BO list is allowed to simplify handling. */
if (p->bo_list) if (p->bo_list)
ret = -EINVAL; goto free_partial_kdata;
ret = amdgpu_cs_p1_bo_handles(p, p->chunks[i].kdata); ret = amdgpu_cs_p1_bo_handles(p, p->chunks[i].kdata);
if (ret) if (ret)

View File

@ -1843,7 +1843,7 @@ static int smu_bump_power_profile_mode(struct smu_context *smu,
static int smu_adjust_power_state_dynamic(struct smu_context *smu, static int smu_adjust_power_state_dynamic(struct smu_context *smu,
enum amd_dpm_forced_level level, enum amd_dpm_forced_level level,
bool skip_display_settings, bool skip_display_settings,
bool force_update) bool init)
{ {
int ret = 0; int ret = 0;
int index = 0; int index = 0;
@ -1872,7 +1872,7 @@ static int smu_adjust_power_state_dynamic(struct smu_context *smu,
} }
} }
if (force_update || smu_dpm_ctx->dpm_level != level) { if (smu_dpm_ctx->dpm_level != level) {
ret = smu_asic_set_performance_level(smu, level); ret = smu_asic_set_performance_level(smu, level);
if (ret) { if (ret) {
dev_err(smu->adev->dev, "Failed to set performance level!"); dev_err(smu->adev->dev, "Failed to set performance level!");
@ -1889,7 +1889,7 @@ static int smu_adjust_power_state_dynamic(struct smu_context *smu,
index = index > 0 && index <= WORKLOAD_POLICY_MAX ? index - 1 : 0; index = index > 0 && index <= WORKLOAD_POLICY_MAX ? index - 1 : 0;
workload[0] = smu->workload_setting[index]; workload[0] = smu->workload_setting[index];
if (force_update || smu->power_profile_mode != workload[0]) if (init || smu->power_profile_mode != workload[0])
smu_bump_power_profile_mode(smu, workload, 0); smu_bump_power_profile_mode(smu, workload, 0);
} }

View File

@ -42,7 +42,7 @@ static uint32_t radeon_encoder_clones(struct drm_encoder *encoder)
struct radeon_device *rdev = dev->dev_private; struct radeon_device *rdev = dev->dev_private;
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
struct drm_encoder *clone_encoder; struct drm_encoder *clone_encoder;
uint32_t index_mask = 0; uint32_t index_mask = drm_encoder_mask(encoder);
int count; int count;
/* DIG routing gets problematic */ /* DIG routing gets problematic */

View File

@ -1659,6 +1659,7 @@ static struct drm_framebuffer *vmw_kms_fb_create(struct drm_device *dev,
DRM_ERROR("Surface size cannot exceed %dx%d\n", DRM_ERROR("Surface size cannot exceed %dx%d\n",
dev_priv->texture_max_width, dev_priv->texture_max_width,
dev_priv->texture_max_height); dev_priv->texture_max_height);
ret = -EINVAL;
goto err_out; goto err_out;
} }

View File

@ -415,6 +415,8 @@ config IIO_ST_ACCEL_SPI_3AXIS
config IIO_KX022A config IIO_KX022A
tristate tristate
select IIO_BUFFER
select IIO_TRIGGERED_BUFFER
config IIO_KX022A_SPI config IIO_KX022A_SPI
tristate "Kionix KX022A tri-axis digital accelerometer SPI interface" tristate "Kionix KX022A tri-axis digital accelerometer SPI interface"

View File

@ -1286,6 +1286,8 @@ config TI_ADS8344
config TI_ADS8688 config TI_ADS8688
tristate "Texas Instruments ADS8688" tristate "Texas Instruments ADS8688"
depends on SPI depends on SPI
select IIO_BUFFER
select IIO_TRIGGERED_BUFFER
help help
If you say yes here you get support for Texas Instruments ADS8684 and If you say yes here you get support for Texas Instruments ADS8684 and
and ADS8688 ADC chips and ADS8688 ADC chips
@ -1296,6 +1298,8 @@ config TI_ADS8688
config TI_ADS124S08 config TI_ADS124S08
tristate "Texas Instruments ADS124S08" tristate "Texas Instruments ADS124S08"
depends on SPI depends on SPI
select IIO_BUFFER
select IIO_TRIGGERED_BUFFER
help help
If you say yes here you get support for Texas Instruments ADS124S08 If you say yes here you get support for Texas Instruments ADS124S08
and ADS124S06 ADC chips and ADS124S06 ADC chips
@ -1330,6 +1334,7 @@ config TI_AM335X_ADC
config TI_LMP92064 config TI_LMP92064
tristate "Texas Instruments LMP92064 ADC driver" tristate "Texas Instruments LMP92064 ADC driver"
depends on SPI depends on SPI
select REGMAP_SPI
help help
Say yes here to build support for the LMP92064 Precision Current and Voltage Say yes here to build support for the LMP92064 Precision Current and Voltage
sensor. sensor.

View File

@ -27,6 +27,7 @@ config AD8366
config ADA4250 config ADA4250
tristate "Analog Devices ADA4250 Instrumentation Amplifier" tristate "Analog Devices ADA4250 Instrumentation Amplifier"
depends on SPI depends on SPI
select REGMAP_SPI
help help
Say yes here to build support for Analog Devices ADA4250 Say yes here to build support for Analog Devices ADA4250
SPI Amplifier's support. The driver provides direct access via SPI Amplifier's support. The driver provides direct access via

View File

@ -32,7 +32,7 @@ static ssize_t _hid_sensor_set_report_latency(struct device *dev,
latency = integer * 1000 + fract / 1000; latency = integer * 1000 + fract / 1000;
ret = hid_sensor_set_report_latency(attrb, latency); ret = hid_sensor_set_report_latency(attrb, latency);
if (ret < 0) if (ret < 0)
return len; return ret;
attrb->latency_ms = hid_sensor_get_report_latency(attrb); attrb->latency_ms = hid_sensor_get_report_latency(attrb);

View File

@ -9,6 +9,8 @@ menu "Digital to analog converters"
config AD3552R config AD3552R
tristate "Analog Devices AD3552R DAC driver" tristate "Analog Devices AD3552R DAC driver"
depends on SPI_MASTER depends on SPI_MASTER
select IIO_BUFFER
select IIO_TRIGGERED_BUFFER
help help
Say yes here to build support for Analog Devices AD3552R Say yes here to build support for Analog Devices AD3552R
Digital to Analog Converter. Digital to Analog Converter.
@ -214,6 +216,8 @@ config AD5764
config AD5766 config AD5766
tristate "Analog Devices AD5766/AD5767 DAC driver" tristate "Analog Devices AD5766/AD5767 DAC driver"
depends on SPI_MASTER depends on SPI_MASTER
select IIO_BUFFER
select IIO_TRIGGERED_BUFFER
help help
Say yes here to build support for Analog Devices AD5766, AD5767 Say yes here to build support for Analog Devices AD5766, AD5767
Digital to Analog Converter. Digital to Analog Converter.
@ -224,6 +228,7 @@ config AD5766
config AD5770R config AD5770R
tristate "Analog Devices AD5770R IDAC driver" tristate "Analog Devices AD5770R IDAC driver"
depends on SPI_MASTER depends on SPI_MASTER
select REGMAP_SPI
help help
Say yes here to build support for Analog Devices AD5770R Digital to Say yes here to build support for Analog Devices AD5770R Digital to
Analog Converter. Analog Converter.
@ -315,6 +320,7 @@ config LPC18XX_DAC
config LTC1660 config LTC1660
tristate "Linear Technology LTC1660/LTC1665 DAC SPI driver" tristate "Linear Technology LTC1660/LTC1665 DAC SPI driver"
depends on SPI depends on SPI
select REGMAP_SPI
help help
Say yes here to build support for Linear Technology Say yes here to build support for Linear Technology
LTC1660 and LTC1665 Digital to Analog Converters. LTC1660 and LTC1665 Digital to Analog Converters.
@ -424,6 +430,7 @@ config STM32_DAC
config STM32_DAC_CORE config STM32_DAC_CORE
tristate tristate
select REGMAP_MMIO
config TI_DAC082S085 config TI_DAC082S085
tristate "Texas Instruments 8/10/12-bit 2/4-channel DAC driver" tristate "Texas Instruments 8/10/12-bit 2/4-channel DAC driver"

View File

@ -53,6 +53,7 @@ config ADF4371
config ADF4377 config ADF4377
tristate "Analog Devices ADF4377 Microwave Wideband Synthesizer" tristate "Analog Devices ADF4377 Microwave Wideband Synthesizer"
depends on SPI && COMMON_CLK depends on SPI && COMMON_CLK
select REGMAP_SPI
help help
Say yes here to build support for Analog Devices ADF4377 Microwave Say yes here to build support for Analog Devices ADF4377 Microwave
Wideband Synthesizer. Wideband Synthesizer.

View File

@ -294,6 +294,8 @@ config ROHM_BU27008
depends on I2C depends on I2C
select REGMAP_I2C select REGMAP_I2C
select IIO_GTS_HELPER select IIO_GTS_HELPER
select IIO_BUFFER
select IIO_TRIGGERED_BUFFER
help help
Enable support for the ROHM BU27008 color sensor. Enable support for the ROHM BU27008 color sensor.
The ROHM BU27008 is a sensor with 5 photodiodes (red, green, The ROHM BU27008 is a sensor with 5 photodiodes (red, green,

View File

@ -138,6 +138,10 @@ static const struct opt3001_scale opt3001_scales[] = {
.val = 20966, .val = 20966,
.val2 = 400000, .val2 = 400000,
}, },
{
.val = 41932,
.val2 = 800000,
},
{ {
.val = 83865, .val = 83865,
.val2 = 600000, .val2 = 600000,

View File

@ -99,9 +99,8 @@ static const char * const period_values[] = {
static ssize_t in_illuminance_period_available_show(struct device *dev, static ssize_t in_illuminance_period_available_show(struct device *dev,
struct device_attribute *attr, char *buf) struct device_attribute *attr, char *buf)
{ {
struct veml6030_data *data = iio_priv(dev_to_iio_dev(dev));
int ret, reg, x; int ret, reg, x;
struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
struct veml6030_data *data = iio_priv(indio_dev);
ret = regmap_read(data->regmap, VEML6030_REG_ALS_CONF, &reg); ret = regmap_read(data->regmap, VEML6030_REG_ALS_CONF, &reg);
if (ret) { if (ret) {
@ -780,7 +779,7 @@ static int veml6030_hw_init(struct iio_dev *indio_dev)
/* Cache currently active measurement parameters */ /* Cache currently active measurement parameters */
data->cur_gain = 3; data->cur_gain = 3;
data->cur_resolution = 4608; data->cur_resolution = 5376;
data->cur_integration_time = 3; data->cur_integration_time = 3;
return ret; return ret;

View File

@ -72,6 +72,8 @@ config LIDAR_LITE_V2
config MB1232 config MB1232
tristate "MaxSonar I2CXL family ultrasonic sensors" tristate "MaxSonar I2CXL family ultrasonic sensors"
depends on I2C depends on I2C
select IIO_BUFFER
select IIO_TRIGGERED_BUFFER
help help
Say Y to build a driver for the ultrasonic sensors I2CXL of Say Y to build a driver for the ultrasonic sensors I2CXL of
MaxBotix which have an i2c interface. It can be used to measure MaxBotix which have an i2c interface. It can be used to measure

View File

@ -217,6 +217,7 @@ static const struct xpad_device {
{ 0x0c12, 0x8810, "Zeroplus Xbox Controller", 0, XTYPE_XBOX }, { 0x0c12, 0x8810, "Zeroplus Xbox Controller", 0, XTYPE_XBOX },
{ 0x0c12, 0x9902, "HAMA VibraX - *FAULTY HARDWARE*", 0, XTYPE_XBOX }, { 0x0c12, 0x9902, "HAMA VibraX - *FAULTY HARDWARE*", 0, XTYPE_XBOX },
{ 0x0d2f, 0x0002, "Andamiro Pump It Up pad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, { 0x0d2f, 0x0002, "Andamiro Pump It Up pad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX },
{ 0x0db0, 0x1901, "Micro Star International Xbox360 Controller for Windows", 0, XTYPE_XBOX360 },
{ 0x0e4c, 0x1097, "Radica Gamester Controller", 0, XTYPE_XBOX }, { 0x0e4c, 0x1097, "Radica Gamester Controller", 0, XTYPE_XBOX },
{ 0x0e4c, 0x1103, "Radica Gamester Reflex", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX }, { 0x0e4c, 0x1103, "Radica Gamester Reflex", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX },
{ 0x0e4c, 0x2390, "Radica Games Jtech Controller", 0, XTYPE_XBOX }, { 0x0e4c, 0x2390, "Radica Games Jtech Controller", 0, XTYPE_XBOX },
@ -486,6 +487,7 @@ static const struct usb_device_id xpad_table[] = {
XPAD_XBOX360_VENDOR(0x07ff), /* Mad Catz Gamepad */ XPAD_XBOX360_VENDOR(0x07ff), /* Mad Catz Gamepad */
XPAD_XBOXONE_VENDOR(0x0b05), /* ASUS controllers */ XPAD_XBOXONE_VENDOR(0x0b05), /* ASUS controllers */
XPAD_XBOX360_VENDOR(0x0c12), /* Zeroplus X-Box 360 controllers */ XPAD_XBOX360_VENDOR(0x0c12), /* Zeroplus X-Box 360 controllers */
XPAD_XBOX360_VENDOR(0x0db0), /* Micro Star International X-Box 360 controllers */
XPAD_XBOX360_VENDOR(0x0e6f), /* 0x0e6f Xbox 360 controllers */ XPAD_XBOX360_VENDOR(0x0e6f), /* 0x0e6f Xbox 360 controllers */
XPAD_XBOXONE_VENDOR(0x0e6f), /* 0x0e6f Xbox One controllers */ XPAD_XBOXONE_VENDOR(0x0e6f), /* 0x0e6f Xbox One controllers */
XPAD_XBOX360_VENDOR(0x0f0d), /* Hori controllers */ XPAD_XBOX360_VENDOR(0x0f0d), /* Hori controllers */

View File

@ -173,7 +173,13 @@
/* use ioctl encoding for uring command */ /* use ioctl encoding for uring command */
#define UBLK_F_CMD_IOCTL_ENCODE (1UL << 6) #define UBLK_F_CMD_IOCTL_ENCODE (1UL << 6)
/* Copy between request and user buffer by pread()/pwrite() */ /*
* Copy between request and user buffer by pread()/pwrite()
*
* Not available for UBLK_F_UNPRIVILEGED_DEV, otherwise userspace may
* deceive us by not filling request buffer, then kernel uninitialized
* data may be leaked.
*/
#define UBLK_F_USER_COPY (1UL << 7) #define UBLK_F_USER_COPY (1UL << 7)
/* /*

View File

@ -262,7 +262,14 @@ static inline bool io_sqring_full(struct io_ring_ctx *ctx)
{ {
struct io_rings *r = ctx->rings; struct io_rings *r = ctx->rings;
return READ_ONCE(r->sq.tail) - ctx->cached_sq_head == ctx->sq_entries; /*
* SQPOLL must use the actual sqring head, as using the cached_sq_head
* is race prone if the SQPOLL thread has grabbed entries but not yet
* committed them to the ring. For !SQPOLL, this doesn't matter, but
* since this helper is just used for SQPOLL sqring waits (or POLLOUT),
* just read the actual sqring head unconditionally.
*/
return READ_ONCE(r->sq.tail) - READ_ONCE(r->sq.head) == ctx->sq_entries;
} }
static inline unsigned int io_sqring_entries(struct io_ring_ctx *ctx) static inline unsigned int io_sqring_entries(struct io_ring_ctx *ctx)

View File

@ -825,11 +825,14 @@ cleanup_sysfs:
bt_sysfs_cleanup(); bt_sysfs_cleanup();
cleanup_led: cleanup_led:
bt_leds_cleanup(); bt_leds_cleanup();
debugfs_remove_recursive(bt_debugfs);
return err; return err;
} }
static void __exit bt_exit(void) static void __exit bt_exit(void)
{ {
iso_exit();
mgmt_exit(); mgmt_exit();
sco_exit(); sco_exit();

View File

@ -2112,13 +2112,9 @@ int iso_init(void)
hci_register_cb(&iso_cb); hci_register_cb(&iso_cb);
if (IS_ERR_OR_NULL(bt_debugfs)) if (!IS_ERR_OR_NULL(bt_debugfs))
return 0;
if (!iso_debugfs) {
iso_debugfs = debugfs_create_file("iso", 0444, bt_debugfs, iso_debugfs = debugfs_create_file("iso", 0444, bt_debugfs,
NULL, &iso_debugfs_fops); NULL, &iso_debugfs_fops);
}
iso_inited = true; iso_inited = true;

View File

@ -18,6 +18,7 @@ TEST_PROGS += hid-usb_crash.sh
TEST_PROGS += hid-wacom.sh TEST_PROGS += hid-wacom.sh
TEST_FILES := run-hid-tools-tests.sh TEST_FILES := run-hid-tools-tests.sh
TEST_FILES += tests
CXX ?= $(CROSS_COMPILE)g++ CXX ?= $(CROSS_COMPILE)g++