summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-10-14 14:42:46 +0100
committerMark Brown <broonie@kernel.org>2026-10-14 14:42:46 +0100
commit14fdc39fc83f0bcace07b329e392abe1ce734c45 (patch)
tree9a7d3fd017bd4dad15361ea022f35fd30ac960f7 /include/linux
parent4b2c27b391d5300651fdac7b22dfe10e05e77f7c (diff)
parentbbf6b99a57b2479bf51c3c8ad0946f4b8c33ed69 (diff)
downloadlinux-next-14fdc39fc83f0bcace07b329e392abe1ce734c45.tar.gz
linux-next-14fdc39fc83f0bcace07b329e392abe1ce734c45.zip
Merge branch 'usb-next' of https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
# Conflicts: # drivers/thunderbolt/tb.c
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/thunderbolt.h47
-rw-r--r--include/linux/ulpi/driver.h4
-rw-r--r--include/linux/usb.h6
-rw-r--r--include/linux/usb/typec_altmode.h4
5 files changed, 52 insertions, 10 deletions
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 0693e4532a68..030c86dd6d67 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -889,6 +889,7 @@
#define PCI_DEVICE_ID_TI_XX12 0x8039
#define PCI_DEVICE_ID_TI_XX12_FM 0x803b
#define PCI_DEVICE_ID_TI_XIO2000A 0x8231
+#define PCI_DEVICE_ID_TI_TUSB73X0 0x8241
#define PCI_DEVICE_ID_TI_1130 0xac12
#define PCI_DEVICE_ID_TI_1031 0xac13
#define PCI_DEVICE_ID_TI_1131 0xac15
diff --git a/include/linux/thunderbolt.h b/include/linux/thunderbolt.h
index b62dfa52b149..57502da29080 100644
--- a/include/linux/thunderbolt.h
+++ b/include/linux/thunderbolt.h
@@ -370,7 +370,7 @@ int tb_xdomain_request(struct tb_xdomain *xd, const void *request,
* @uuid: XDomain messages with this UUID are dispatched to this handler
* @callback: Callback called with the XDomain message. Returning %1
* here tells the XDomain core that the message was handled
- * by this handler and should not be forwared to other
+ * by this handler and should not be forwarded to other
* handlers.
* @data: Data passed with the callback
* @list: Handlers are linked using this
@@ -507,6 +507,7 @@ void tb_service_properties_changed(struct tb_service *svc);
* @iobase: MMIO space of the NHI
* @tx_rings: All Tx rings available on this host controller
* @rx_rings: All Rx rings available on this host controller
+ * @interrupt_mask: Shadow copy of the ring interrupt mask register
* @going_away: The host controller device is about to disappear so when
* this flag is set, avoid touching the hardware anymore.
* @iommu_dma_protection: An IOMMU will isolate external-facing ports.
@@ -528,6 +529,7 @@ struct tb_nhi {
void __iomem *iobase;
struct tb_ring **tx_rings;
struct tb_ring **rx_rings;
+ u32 *interrupt_mask;
bool going_away;
bool iommu_dma_protection;
struct work_struct interrupt_work;
@@ -553,6 +555,8 @@ struct tb_nhi {
* @work: Interrupt work structure
* @is_tx: Is the ring Tx or Rx
* @running: Is the ring running
+ * @notify_pending: Controller has not been notified about the posted
+ * descriptors yet
* @irq: MSI-X irq number if the ring uses MSI-X. %0 otherwise.
* @vector: MSI-X vector number the ring uses (only set if @irq is > 0)
* @flags: Ring specific flags
@@ -582,6 +586,7 @@ struct tb_ring {
struct work_struct work;
bool is_tx:1;
bool running:1;
+ bool notify_pending:1;
int irq;
u8 vector;
unsigned int flags;
@@ -672,7 +677,8 @@ bool tb_ring_flush(struct tb_ring *ring, unsigned int timeout_msec);
void tb_ring_stop(struct tb_ring *ring);
void tb_ring_free(struct tb_ring *ring);
-int __tb_ring_enqueue(struct tb_ring *ring, struct ring_frame *frame);
+int __tb_ring_enqueue(struct tb_ring *ring, struct ring_frame *frame, bool more);
+void tb_ring_notify(struct tb_ring *ring);
/**
* tb_ring_rx() - enqueue a frame on an RX ring
@@ -693,7 +699,24 @@ int __tb_ring_enqueue(struct tb_ring *ring, struct ring_frame *frame);
static inline int tb_ring_rx(struct tb_ring *ring, struct ring_frame *frame)
{
WARN_ON(ring->is_tx);
- return __tb_ring_enqueue(ring, frame);
+ return __tb_ring_enqueue(ring, frame, false);
+}
+
+/**
+ * tb_ring_rx_more() - enqueue a frame on an RX ring without notifying
+ * @ring: Ring to enqueue the frame
+ * @frame: Frame to enqueue
+ *
+ * Same as tb_ring_rx() but does not notify the controller about the
+ * enqueued frame. The caller must call tb_ring_notify() once it is done
+ * enqueuing frames.
+ *
+ * Return: %-ESHUTDOWN if tb_ring_stop() has been called, %0 otherwise.
+ */
+static inline int tb_ring_rx_more(struct tb_ring *ring, struct ring_frame *frame)
+{
+ WARN_ON(ring->is_tx);
+ return __tb_ring_enqueue(ring, frame, true);
}
/**
@@ -714,11 +737,27 @@ static inline int tb_ring_rx(struct tb_ring *ring, struct ring_frame *frame)
static inline int tb_ring_tx(struct tb_ring *ring, struct ring_frame *frame)
{
WARN_ON(!ring->is_tx);
- return __tb_ring_enqueue(ring, frame);
+ return __tb_ring_enqueue(ring, frame, false);
+}
+
+/**
+ * tb_ring_tx_more() - enqueue a frame on a TX ring without notifying
+ * @ring: Ring to enqueue the frame
+ * @frame: Frame to enqueue
+ *
+ * Same as tb_ring_rx_more() but for TX ring.
+ *
+ * Return: %-ESHUTDOWN if tb_ring_stop() has been called, %0 otherwise.
+ */
+static inline int tb_ring_tx_more(struct tb_ring *ring, struct ring_frame *frame)
+{
+ WARN_ON(!ring->is_tx);
+ return __tb_ring_enqueue(ring, frame, true);
}
/* Used only when the ring is in polling mode */
struct ring_frame *tb_ring_poll(struct tb_ring *ring);
+bool tb_ring_poll_pending(struct tb_ring *ring);
void tb_ring_poll_complete(struct tb_ring *ring);
int tb_ring_throttling(struct tb_ring *ring, unsigned int interval_nsec);
diff --git a/include/linux/ulpi/driver.h b/include/linux/ulpi/driver.h
index c668d9c8d876..c899197e0aa8 100644
--- a/include/linux/ulpi/driver.h
+++ b/include/linux/ulpi/driver.h
@@ -51,8 +51,8 @@ struct ulpi_driver {
/*
* use a macro to avoid include chaining to get THIS_MODULE
*/
-#define ulpi_register_driver(drv) __ulpi_register_driver(drv, THIS_MODULE)
-int __ulpi_register_driver(struct ulpi_driver *drv, struct module *module);
+#define ulpi_register_driver(drv) __ulpi_register_driver(drv, THIS_MODULE, KBUILD_MODNAME)
+int __ulpi_register_driver(struct ulpi_driver *drv, struct module *module, const char *mod_name);
void ulpi_unregister_driver(struct ulpi_driver *drv);
#define module_ulpi_driver(__ulpi_driver) \
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 49ab8dbb885f..4377eeae541e 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -1369,8 +1369,10 @@ extern void usb_deregister(struct usb_driver *);
module_driver(__usb_driver, usb_register, \
usb_deregister)
-extern int usb_register_device_driver(struct usb_device_driver *,
- struct module *);
+#define usb_register_device_driver(new_udriver) \
+ __usb_register_device_driver(new_udriver, THIS_MODULE, KBUILD_MODNAME)
+extern int __usb_register_device_driver(struct usb_device_driver *,
+ struct module *, const char *);
extern void usb_deregister_device_driver(struct usb_device_driver *);
extern int usb_register_dev(struct usb_interface *intf,
diff --git a/include/linux/usb/typec_altmode.h b/include/linux/usb/typec_altmode.h
index ef21ead551be..92309b569c3a 100644
--- a/include/linux/usb/typec_altmode.h
+++ b/include/linux/usb/typec_altmode.h
@@ -227,9 +227,9 @@ struct typec_altmode_driver {
* handle all SVID specific communication.
*/
#define typec_altmode_register_driver(drv) \
- __typec_altmode_register_driver(drv, THIS_MODULE)
+ __typec_altmode_register_driver(drv, THIS_MODULE, KBUILD_MODNAME)
int __typec_altmode_register_driver(struct typec_altmode_driver *drv,
- struct module *module);
+ struct module *module, const char *mod_name);
/**
* typec_altmode_unregister_driver - unregisters a USB Type-C alternate mode
* device driver