From 39af034538e5007a87e6690dab3216953fdd1170 Mon Sep 17 00:00:00 2001 From: Ben Collins Date: Sun, 13 Jun 2004 02:18:14 -0400 Subject: [PATCH] ohci1394: Handle invalid max-packet-size. Signed-off-by: Ben Collins --- drivers/ieee1394/ohci1394.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c index 88438b58b85b0..7846b3c0a74fd 100644 --- a/drivers/ieee1394/ohci1394.c +++ b/drivers/ieee1394/ohci1394.c @@ -516,6 +516,12 @@ static void ohci_initialize(struct ti_ohci *ohci) ohci->max_packet_size = 1<<(((reg_read(ohci, OHCI1394_BusOptions)>>12)&0xf)+1); + if (ohci->max_packet_size < 512) { + HPSB_WARNING("warning: Invalid max packet size of %d, setting to 512", + ohci->max_packet_size); + ohci->max_packet_size = 512; + } + /* Don't accept phy packets into AR request context */ reg_write(ohci, OHCI1394_LinkControlClear, 0x00000400); -- 2.53.0