Commit b83a7080 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull staging driver updates from Greg KH:
 "Here is the large set of staging driver changes for 6.2-rc1.

  Another round of cleanups for staging drivers with no big additions.
  Overall more lines were removed than added, always a nice sign, with
  nothing happening in here other than general coding style cleanups and
  minor fixes in the drivers. Full, boring, details are in the shortlog.

  All of these have been in linux-next for a while with no reported
  problems"

* tag 'staging-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (253 commits)
  vme: Use root_device_register() not underlined version
  staging: rtl8192e: Fix spelling mistake "ContryIE" -> "CountryIE"
  vme: Fix error not catched in fake_init()
  staging: vme_user: remove multiple blank lines
  staging: r8188eu: use subtype helper in rtw_check_bcn_info
  staging: r8188eu: use subtype helpers in collect_bss_info
  staging: r8188eu: remove unused da parameter
  staging: r8188eu: merge two probereq_p2p functions
  staging: r8188eu: simplify err handling for unknown station
  staging: r8188eu: handle the non-ap case first
  staging: r8188eu: move bBusyTraffic update
  staging: r8188eu: read reason code from ieee80211_mgmt
  staging: r8188eu: use ieee80211_mgmt to parse addresses
  staging: r8188eu: remove a variable
  staging: r8188eu: simplify error handling for missing station
  staging: r8188eu: stop beacon processing if kmalloc fails
  staging: r8188eu: exit if beacon is not from our bss
  staging: r8188eu: simplify update_sta_support_rate params
  staging: r8188eu: use ie buffer in update_beacon_info
  staging: r8188eu: pass only ies to process_p2p_ps_ie
  ...
parents 58bcac11 37aa6b98
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -154,13 +154,13 @@ static inline uint64_t cvmx_build_bits(uint64_t high_bit,

/**
 * Convert a memory pointer (void*) into a hardware compatible
 * memory address (uint64_t). Octeon hardware widgets don't
 * memory address (phys_addr_t). Octeon hardware widgets don't
 * understand logical addresses.
 *
 * @ptr:    C style memory pointer
 * Returns Hardware physical address
 */
static inline uint64_t cvmx_ptr_to_phys(void *ptr)
static inline phys_addr_t cvmx_ptr_to_phys(void *ptr)
{
	if (sizeof(void *) == 8) {
		/*
+1 −4
Original line number Diff line number Diff line
@@ -1004,10 +1004,7 @@ static int _nbu2ss_in_dma(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep,
	/* MAX Packet Size */
	mpkt = _nbu2ss_readl(&preg->EP_REGS[num].EP_PCKT_ADRS) & EPN_MPKT;

	if ((DMA_MAX_COUNT * mpkt) < length)
		i_write_length = DMA_MAX_COUNT * mpkt;
	else
		i_write_length = length;
	i_write_length = min(DMA_MAX_COUNT * mpkt, length);

	/*------------------------------------------------------------*/
	/* Number of transmission packets */
+7 −10
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ static ssize_t online_show(struct device *dev, struct device_attribute *attr,
{
	struct fieldbus_dev *fb = dev_get_drvdata(dev);

	return sprintf(buf, "%d\n", !!fb->online);
	return sysfs_emit(buf, "%d\n", !!fb->online);
}
static DEVICE_ATTR_RO(online);

@@ -39,7 +39,7 @@ static ssize_t enabled_show(struct device *dev, struct device_attribute *attr,

	if (!fb->enable_get)
		return -EINVAL;
	return sprintf(buf, "%d\n", !!fb->enable_get(fb));
	return sysfs_emit(buf, "%d\n", !!fb->enable_get(fb));
}

static ssize_t enabled_store(struct device *dev, struct device_attribute *attr,
@@ -66,11 +66,8 @@ static ssize_t card_name_show(struct device *dev, struct device_attribute *attr,
{
	struct fieldbus_dev *fb = dev_get_drvdata(dev);

	/*
	 * card_name was provided by child driver, could potentially be long.
	 * protect against buffer overrun.
	 */
	return snprintf(buf, PAGE_SIZE, "%s\n", fb->card_name);
	/* card_name was provided by child driver. */
	return sysfs_emit(buf, "%s\n", fb->card_name);
}
static DEVICE_ATTR_RO(card_name);

@@ -79,7 +76,7 @@ static ssize_t read_area_size_show(struct device *dev,
{
	struct fieldbus_dev *fb = dev_get_drvdata(dev);

	return sprintf(buf, "%zu\n", fb->read_area_sz);
	return sysfs_emit(buf, "%zu\n", fb->read_area_sz);
}
static DEVICE_ATTR_RO(read_area_size);

@@ -88,7 +85,7 @@ static ssize_t write_area_size_show(struct device *dev,
{
	struct fieldbus_dev *fb = dev_get_drvdata(dev);

	return sprintf(buf, "%zu\n", fb->write_area_sz);
	return sysfs_emit(buf, "%zu\n", fb->write_area_sz);
}
static DEVICE_ATTR_RO(write_area_size);

@@ -116,7 +113,7 @@ static ssize_t fieldbus_type_show(struct device *dev,
		break;
	}

	return sprintf(buf, "%s\n", t);
	return sysfs_emit(buf, "%s\n", t);
}
static DEVICE_ATTR_RO(fieldbus_type);

+8 −5
Original line number Diff line number Diff line
@@ -21,7 +21,10 @@

#define MUX_TX_MAX_SIZE 2048

#define GDM_TTY_READY(gdm) (gdm && gdm->tty_dev && gdm->port.count)
static inline bool gdm_tty_ready(struct gdm *gdm)
{
	return gdm && gdm->tty_dev && gdm->port.count;
}

static struct tty_driver *gdm_driver[TTY_MAX_COUNT];
static struct gdm *gdm_table[TTY_MAX_COUNT][GDM_TTY_MINOR];
@@ -113,7 +116,7 @@ static int gdm_tty_recv_complete(void *data,
{
	struct gdm *gdm = tty_dev->gdm[index];

	if (!GDM_TTY_READY(gdm)) {
	if (!gdm_tty_ready(gdm)) {
		if (complete == RECV_PACKET_PROCESS_COMPLETE)
			gdm->tty_dev->recv_func(gdm->tty_dev->priv_dev,
						gdm_tty_recv_complete);
@@ -140,7 +143,7 @@ static void gdm_tty_send_complete(void *arg)
{
	struct gdm *gdm = arg;

	if (!GDM_TTY_READY(gdm))
	if (!gdm_tty_ready(gdm))
		return;

	tty_port_tty_wakeup(&gdm->port);
@@ -154,7 +157,7 @@ static int gdm_tty_write(struct tty_struct *tty, const unsigned char *buf,
	int sent_len = 0;
	int sending_len = 0;

	if (!GDM_TTY_READY(gdm))
	if (!gdm_tty_ready(gdm))
		return -ENODEV;

	if (!len)
@@ -181,7 +184,7 @@ static unsigned int gdm_tty_write_room(struct tty_struct *tty)
{
	struct gdm *gdm = tty->driver_data;

	if (!GDM_TTY_READY(gdm))
	if (!gdm_tty_ready(gdm))
		return 0;

	return WRITE_SIZE;
+1 −14
Original line number Diff line number Diff line
@@ -239,7 +239,6 @@ static void show_loopback_devices(struct loopback_test *t)

	for (i = 0; i < t->device_count; i++)
		printf("device[%d] = %s\n", i, t->devices[i].name);

}

int open_sysfs(const char *sys_pfx, const char *node, int flags)
@@ -274,7 +273,6 @@ float read_sysfs_float_fd(int fd, const char *sys_pfx, const char *node)
	char buf[SYSFS_MAX_INT];

	if (read(fd, buf, sizeof(buf)) < 0) {

		fprintf(stderr, "unable to read from %s%s %s\n", sys_pfx, node,
			strerror(errno));
		close(fd);
@@ -367,7 +365,6 @@ static int get_results(struct loopback_test *t)
			r->apbridge_unipro_latency_max - r->apbridge_unipro_latency_min;
		r->gbphy_firmware_latency_jitter =
			r->gbphy_firmware_latency_max - r->gbphy_firmware_latency_min;

	}

	/*calculate the aggregate results of all enabled devices */
@@ -407,7 +404,6 @@ static int get_results(struct loopback_test *t)
			r->apbridge_unipro_latency_max - r->apbridge_unipro_latency_min;
		r->gbphy_firmware_latency_jitter =
			r->gbphy_firmware_latency_max - r->gbphy_firmware_latency_min;

	}

	return 0;
@@ -536,7 +532,6 @@ static int log_results(struct loopback_test *t)
			fprintf(stderr, "unable to open %s for appending\n", file_name);
			abort();
		}

	}
	for (i = 0; i < t->device_count; i++) {
		if (!device_enabled(t, i))
@@ -550,10 +545,8 @@ static int log_results(struct loopback_test *t)
			if (ret == -1)
				fprintf(stderr, "unable to write %d bytes to csv.\n", len);
		}

	}


	if (t->aggregate_output) {
		len = format_output(t, &t->aggregate_results, "aggregate",
				    data, sizeof(data), &tm);
@@ -675,6 +668,7 @@ static int open_poll_files(struct loopback_test *t)
static int close_poll_files(struct loopback_test *t)
{
	int i;

	for (i = 0; i < t->poll_count; i++)
		close(t->fds[i].fd);

@@ -740,7 +734,6 @@ static int wait_for_complete(struct loopback_test *t)
		ts = &t->poll_timeout;

	while (1) {

		ret = ppoll(t->fds, t->poll_count, ts, &mask_old);
		if (ret <= 0) {
			stop_tests(t);
@@ -780,7 +773,6 @@ static void prepare_devices(struct loopback_test *t)
		if (t->stop_all || device_enabled(t, i))
			write_sysfs_val(t->devices[i].sysfs_entry, "type", 0);


	for (i = 0; i < t->device_count; i++) {
		if (!device_enabled(t, i))
			continue;
@@ -823,7 +815,6 @@ static int start(struct loopback_test *t)
	return 0;
}


void loopback_run(struct loopback_test *t)
{
	int i;
@@ -852,7 +843,6 @@ void loopback_run(struct loopback_test *t)
	if (ret)
		goto err;


	get_results(t);

	log_results(t);
@@ -861,7 +851,6 @@ void loopback_run(struct loopback_test *t)

err:
	printf("Error running test\n");
	return;
}

static int sanity_check(struct loopback_test *t)
@@ -881,10 +870,8 @@ static int sanity_check(struct loopback_test *t)
			fprintf(stderr, "Bad device mask %x\n", (1 << i));
			return -1;
		}

	}


	return 0;
}

Loading