kern/21220: mlx0: I/O error - attempt to write beyond end of drive

lindroos at nls.fi lindroos at nls.fi
Thu Nov 25 01:20:29 PST 2004


The following reply was made to PR kern/21220; it has been noted by GNATS.

From: lindroos at nls.fi
To: FreeBSD-gnats-submit at FreeBSD.org
Cc:  
Subject: Re: kern/21220: mlx0: I/O error - attempt to write beyond end of drive
Date: Thu, 25 Nov 2004 11:16:06 +0200 (EET)

 The same problem appears on my Alpha. Seems like the controller doesn't like
 I/O size larger than 64k, and by hacking PAGE_SIZE (8k on alpha) to 4k will
 make the driver decide the max. 65536 bytes I/O block.
 
 This hack works for me, but i don't know how to fix it on i386 and/or other
 Mylex controllers. I suggest you try something like:
 # dd if=/dev/rmlxd0c bs=XXX of=/dev/zero
 with different block sizes and see when the I/O errors will appear.
 
 --- mlx_disk.c.orig	Mon Jun 25 07:37:51 2001
 +++ mlx_disk.c	Fri Nov  5 12:42:54 2004
 @@ -267,8 +267,10 @@
       * maximum.
       */
      s1 = sc->mlxd_controller->mlx_enq2->me_maxblk * MLX_BLKSIZE;
 -    s2 = (sc->mlxd_controller->mlx_enq2->me_max_sg - 1) * PAGE_SIZE;
 +    s2 = (sc->mlxd_controller->mlx_enq2->me_max_sg - 1) * 4096;
      dsk->si_iosize_max = imin(s1, s2);
 +    device_printf(dev, "I/O size decided to %d after comparing %d and %d\n",
 +                  dsk->si_iosize_max, s1, s2);
  
      return (0);
  }
 Here is the driver's output on my system:
 
 mlx0: <Mylex version 2 RAID interface> port 0x10100-0x1017f mem 0x81128100-0x8112817f irq 3 at device 12.0 on pci0
 mlx0: interrupting at CIA irq 3
 mlx0: DAC960P/PD, 3 channels, firmware 2.70-0-00, 4MB RAM
 mlxd0: <Mylex System Drive> on mlx0
 mlxd0: 8182MB (16756736 sectors) RAID 5 (online)
 mlxd0: I/O size decided to 65536 after comparing 131072 and 65536
 
 --
 Dennis Lindroos <lindroos at nls.fi>
 


More information about the freebsd-scsi mailing list