Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'tty-6.18-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull serial driver fixes from Greg KH:
"Here are two serial driver fixes for reported issues for 6.18-rc8.

These are:

- fix for a much reported symbol build loop that broke the build for
some kernel configurations

- amba-pl011 driver bugfix for a reported issue

Both have been in linux next (the last for weeks, the first for a
shorter amount of time), with no reported issues"

* tag 'tty-6.18-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
serial: 8250: Fix 8250_rsa symbol loop
serial: amba-pl011: prefer dma_mapping_error() over explicit address checking

+22 -14
+2 -2
drivers/tty/serial/8250/8250.h
··· 322 322 #endif 323 323 324 324 #ifdef CONFIG_SERIAL_8250_RSA 325 - void univ8250_rsa_support(struct uart_ops *ops); 325 + void univ8250_rsa_support(struct uart_ops *ops, const struct uart_ops *core_ops); 326 326 void rsa_enable(struct uart_8250_port *up); 327 327 void rsa_disable(struct uart_8250_port *up); 328 328 void rsa_autoconfig(struct uart_8250_port *up); 329 329 void rsa_reset(struct uart_8250_port *up); 330 330 #else 331 - static inline void univ8250_rsa_support(struct uart_ops *ops) { } 331 + static inline void univ8250_rsa_support(struct uart_ops *ops, const struct uart_ops *core_ops) { } 332 332 static inline void rsa_enable(struct uart_8250_port *up) {} 333 333 static inline void rsa_disable(struct uart_8250_port *up) {} 334 334 static inline void rsa_autoconfig(struct uart_8250_port *up) {}
+1 -1
drivers/tty/serial/8250/8250_platform.c
··· 75 75 76 76 /* chain base port ops to support Remote Supervisor Adapter */ 77 77 univ8250_port_ops = *univ8250_port_base_ops; 78 - univ8250_rsa_support(&univ8250_port_ops); 78 + univ8250_rsa_support(&univ8250_port_ops, univ8250_port_base_ops); 79 79 80 80 if (share_irqs) 81 81 irqflag = IRQF_SHARED;
+17 -9
drivers/tty/serial/8250/8250_rsa.c
··· 14 14 static unsigned long probe_rsa[PORT_RSA_MAX]; 15 15 static unsigned int probe_rsa_count; 16 16 17 + static const struct uart_ops *core_port_base_ops; 18 + 17 19 static int rsa8250_request_resource(struct uart_8250_port *up) 18 20 { 19 21 struct uart_port *port = &up->port; ··· 69 67 } 70 68 } 71 69 72 - univ8250_port_base_ops->config_port(port, flags); 70 + core_port_base_ops->config_port(port, flags); 73 71 74 72 if (port->type != PORT_RSA && up->probe & UART_PROBE_RSA) 75 73 rsa8250_release_resource(up); ··· 80 78 struct uart_8250_port *up = up_to_u8250p(port); 81 79 int ret; 82 80 83 - ret = univ8250_port_base_ops->request_port(port); 81 + ret = core_port_base_ops->request_port(port); 84 82 if (ret == 0 && port->type == PORT_RSA) { 85 83 ret = rsa8250_request_resource(up); 86 84 if (ret < 0) 87 - univ8250_port_base_ops->release_port(port); 85 + core_port_base_ops->release_port(port); 88 86 } 89 87 90 88 return ret; ··· 96 94 97 95 if (port->type == PORT_RSA) 98 96 rsa8250_release_resource(up); 99 - univ8250_port_base_ops->release_port(port); 97 + core_port_base_ops->release_port(port); 100 98 } 101 99 102 - void univ8250_rsa_support(struct uart_ops *ops) 100 + /* 101 + * It is not allowed to directly reference any symbols from 8250.ko here as 102 + * that would result in a dependency loop between the 8250.ko and 103 + * 8250_base.ko modules. This function is called from 8250.ko and is used to 104 + * break the symbolic dependency cycle. Anything that is needed from 8250.ko 105 + * has to be passed as pointers to this function which then can adjust those 106 + * variables on 8250.ko side or store them locally as needed. 107 + */ 108 + void univ8250_rsa_support(struct uart_ops *ops, const struct uart_ops *core_ops) 103 109 { 110 + core_port_base_ops = core_ops; 104 111 ops->config_port = univ8250_config_port; 105 112 ops->request_port = univ8250_request_port; 106 113 ops->release_port = univ8250_release_port; 107 114 } 115 + EXPORT_SYMBOL_FOR_MODULES(univ8250_rsa_support, "8250"); 108 116 109 117 module_param_hw_array(probe_rsa, ulong, ioport, &probe_rsa_count, 0444); 110 118 MODULE_PARM_DESC(probe_rsa, "Probe I/O ports for RSA"); ··· 158 146 if (up->port.uartclk == SERIAL_RSA_BAUD_BASE * 16) 159 147 serial_out(up, UART_RSA_FRR, 0); 160 148 } 161 - EXPORT_SYMBOL_FOR_MODULES(rsa_enable, "8250_base"); 162 149 163 150 /* 164 151 * Attempts to turn off the RSA FIFO and resets the RSA board back to 115kbps compat mode. It is ··· 189 178 if (result) 190 179 up->port.uartclk = SERIAL_RSA_BAUD_BASE_LO * 16; 191 180 } 192 - EXPORT_SYMBOL_FOR_MODULES(rsa_disable, "8250_base"); 193 181 194 182 void rsa_autoconfig(struct uart_8250_port *up) 195 183 { ··· 201 191 if (__rsa_enable(up)) 202 192 up->port.type = PORT_RSA; 203 193 } 204 - EXPORT_SYMBOL_FOR_MODULES(rsa_autoconfig, "8250_base"); 205 194 206 195 void rsa_reset(struct uart_8250_port *up) 207 196 { ··· 209 200 210 201 serial_out(up, UART_RSA_FRR, 0); 211 202 } 212 - EXPORT_SYMBOL_FOR_MODULES(rsa_reset, "8250_base"); 213 203 214 204 #ifdef CONFIG_SERIAL_8250_DEPRECATED_OPTIONS 215 205 #ifndef MODULE
+1 -1
drivers/tty/serial/8250/Makefile
··· 7 7 8250-y := 8250_core.o 8 8 8250-y += 8250_platform.o 9 9 8250-$(CONFIG_SERIAL_8250_PNP) += 8250_pnp.o 10 - 8250-$(CONFIG_SERIAL_8250_RSA) += 8250_rsa.o 11 10 12 11 obj-$(CONFIG_SERIAL_8250) += 8250_base.o 13 12 8250_base-y := 8250_port.o ··· 14 15 8250_base-$(CONFIG_SERIAL_8250_DWLIB) += 8250_dwlib.o 15 16 8250_base-$(CONFIG_SERIAL_8250_FINTEK) += 8250_fintek.o 16 17 8250_base-$(CONFIG_SERIAL_8250_PCILIB) += 8250_pcilib.o 18 + 8250_base-$(CONFIG_SERIAL_8250_RSA) += 8250_rsa.o 17 19 18 20 obj-$(CONFIG_SERIAL_8250_CONSOLE) += 8250_early.o 19 21
+1 -1
drivers/tty/serial/amba-pl011.c
··· 628 628 dmatx->len = count; 629 629 dmatx->dma = dma_map_single(dma_dev->dev, dmatx->buf, count, 630 630 DMA_TO_DEVICE); 631 - if (dmatx->dma == DMA_MAPPING_ERROR) { 631 + if (dma_mapping_error(dma_dev->dev, dmatx->dma)) { 632 632 uap->dmatx.queued = false; 633 633 dev_dbg(uap->port.dev, "unable to map TX DMA\n"); 634 634 return -EBUSY;