Module Name:    src
Committed By:   martin
Date:           Mon Jan  7 13:49:39 UTC 2019

Modified Files:
        src/sys/dev/pci [netbsd-8]: mpii.c

Log Message:
Pull up following revision(s) (requested by kardel in ticket #1157):

        sys/dev/pci/mpii.c: revision 1.19

fix LUN handling (byte order issue)

now ch0 on a NEOSeries FlexStor II is detected again on LUN 1
this is a regression introduced in 1.15 update and 1.8.10.3 pullup

Tested with NEOSeries FlexStor II:
mpii0 at pci1 dev 0 function 0: vendor 1000 product 00ab (rev. 0x01)
mpii0: interrupting at irq 11
mpii0: HBA 9400-8i8e, firmware 3.0.4.0, MPI 2.6
mpii0: physical disk inserted in slot 9
mpii0: physical disk inserted in slot 13
mpii0: physical disk inserted in slot 16
st0 at scsibus0 target 9 lun 0: <IBM, ULTRIUM-HH7, J4D1> tape removable
st0: drive empty
st0: tagged queueing
st1 at scsibus0 target 13 lun 0: <IBM, ULTRIUM-HH7, J4D1> tape removable
st1: drive empty
ch0 at scsibus0 target 13 lun 1: <BDT, FlexStor II, 5.50> changer removable
ch0: 23 slots, 2 drives, 1 picker, 1 portal
st1: tagged queueing
ch0: tagged queueing
ses0 at scsibus0 target 16 lun 0: <LSI, VirtualSES, 01> enclosure
services fixed
ses0: SCSI-3 SES Device


To generate a diff of this commit:
cvs rdiff -u -r1.8.10.3 -r1.8.10.4 src/sys/dev/pci/mpii.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/mpii.c
diff -u src/sys/dev/pci/mpii.c:1.8.10.3 src/sys/dev/pci/mpii.c:1.8.10.4
--- src/sys/dev/pci/mpii.c:1.8.10.3	Sat Dec  8 12:17:13 2018
+++ src/sys/dev/pci/mpii.c	Mon Jan  7 13:49:39 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: mpii.c,v 1.8.10.3 2018/12/08 12:17:13 martin Exp $ */
+/* $NetBSD: mpii.c,v 1.8.10.4 2019/01/07 13:49:39 martin Exp $ */
 /*	OpenBSD: mpii.c,v 1.115 2012/04/11 13:29:14 naddy Exp 	*/
 /*
  * Copyright (c) 2010 Mike Belopuhov <m...@crypt.org.ru>
@@ -20,7 +20,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.8.10.3 2018/12/08 12:17:13 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.8.10.4 2019/01/07 13:49:39 martin Exp $");
 
 #include "bio.h"
 
@@ -3035,7 +3035,7 @@ mpii_scsipi_request(struct scsipi_channe
 	io->sgl_offset0 = sizeof(struct mpii_msg_scsi_io) / 4;
 	io->io_flags = htole16(xs->cmdlen);
 	io->dev_handle = htole16(ccb->ccb_dev_handle);
-	io->lun[0] = htole16(periph->periph_lun);
+	io->lun[0] = htobe16(periph->periph_lun);
 
 	switch (xs->xs_control & (XS_CTL_DATA_IN | XS_CTL_DATA_OUT)) {
 	case XS_CTL_DATA_IN:

Reply via email to