]> git.hungrycats.org Git - linux/commitdiff
ohci1394: Handle invalid max-packet-size.
authorBen Collins <bcollins@debian.org>
Sun, 13 Jun 2004 06:18:14 +0000 (02:18 -0400)
committerBen Collins <bcollins@debian.org>
Sun, 13 Jun 2004 06:18:14 +0000 (02:18 -0400)
Signed-off-by: Ben Collins <bcollins@debian.org>
drivers/ieee1394/ohci1394.c

index 88438b58b85b0123ff91830c781c8627a0f2a6ed..7846b3c0a74fd3d93b1fdf38fcc78bed707b9a1b 100644 (file)
@@ -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);