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

net: dsa: mv88e6xxx: Prevent truncation of longer interrupt names

When adding support for unique interrupt names, after testing on a few
devices, it was assumed 32 characters would be sufficient. This
assumption turned out to be incorrect, ZII RDU2 for example uses a
device base name of mv88e6xxx-30be0000.ethernet-1:0, leaving no space
for post fixes such as -g1-atu-prob and -watchdog. The names then
become identical, defeating the point of the patch.

Increase the length of the string to 64 charactoes.

Reported-by: Chris Healy <Chris.Healy@zii.aero>
Fixes: 3095383a8ab4 ("net: dsa: mv88e6xxx: Unique IRQ name")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Andrew Lunn and committed by
David S. Miller
5d1fbdf2 88bf5460

+6 -6
+6 -6
drivers/net/dsa/mv88e6xxx/chip.h
··· 236 236 bool mirror_ingress; 237 237 bool mirror_egress; 238 238 unsigned int serdes_irq; 239 - char serdes_irq_name[32]; 239 + char serdes_irq_name[64]; 240 240 }; 241 241 242 242 struct mv88e6xxx_chip { ··· 293 293 struct mv88e6xxx_irq g1_irq; 294 294 struct mv88e6xxx_irq g2_irq; 295 295 int irq; 296 - char irq_name[32]; 296 + char irq_name[64]; 297 297 int device_irq; 298 - char device_irq_name[32]; 298 + char device_irq_name[64]; 299 299 int watchdog_irq; 300 - char watchdog_irq_name[32]; 300 + char watchdog_irq_name[64]; 301 301 302 302 int atu_prob_irq; 303 - char atu_prob_irq_name[32]; 303 + char atu_prob_irq_name[64]; 304 304 int vtu_prob_irq; 305 - char vtu_prob_irq_name[32]; 305 + char vtu_prob_irq_name[64]; 306 306 struct kthread_worker *kworker; 307 307 struct kthread_delayed_work irq_poll_work; 308 308