From owner-freebsd-scsi@FreeBSD.ORG Wed Feb 13 14:11:22 2013 Return-Path: Delivered-To: freebsd-scsi@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A6713456; Wed, 13 Feb 2013 14:11:22 +0000 (UTC) (envelope-from xenophon@irtnog.org) Received: from mx1.irtnog.org (rrcs-24-123-13-61.central.biz.rr.com [24.123.13.61]) by mx1.freebsd.org (Postfix) with ESMTP id 4B19168F; Wed, 13 Feb 2013 14:11:22 +0000 (UTC) Received: from cinep001bsdgw.irtnog.net (localhost [127.0.0.1]) by mx1.irtnog.org (Postfix) with ESMTP id E12191C76F; Wed, 13 Feb 2013 09:11:20 -0500 (EST) X-Virus-Scanned: amavisd-new at irtnog.org Received: from mx1.irtnog.org ([127.0.0.1]) by cinep001bsdgw.irtnog.net (mx1.irtnog.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vxQwCU_Nlg1k; Wed, 13 Feb 2013 09:11:11 -0500 (EST) Received: from cinip100ntsbs.irtnog.net (cinip100ntsbs.irtnog.net [10.63.1.100]) by mx1.irtnog.org (Postfix) with ESMTP; Wed, 13 Feb 2013 09:11:11 -0500 (EST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: kern/151564: [ciss] ciss(4) should increase CISS_MAX_LOGICAL to 107 Date: Wed, 13 Feb 2013 09:11:09 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5 Message-ID: In-Reply-To: <201301120120.r0C1K1Hp024632@freefall.freebsd.org> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: kern/151564: [ciss] ciss(4) should increase CISS_MAX_LOGICAL to 107 Thread-Index: Ac3wYw5p+f6y/3KZTPqjLGzp0heCnQZjuKEA References: <201301120120.r0C1K1Hp024632@freefall.freebsd.org> From: "Matthew X. Economou" To: Cc: peter@FreeBSD.org, leon.kos@lecad.fs.uni-lj.si, bug-followup@FreeBSD.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2013 14:11:22 -0000 Sean, After I applied your patch to FreeBSD 9.1, the server locks up during boot. I'm working on attaching a serial console in order to capture the boot log. Best wishes, Matthew --=20 I FIGHT FOR THE USERS > -----Original Message----- > From: owner-freebsd-scsi@freebsd.org [mailto:owner-freebsd- > scsi@freebsd.org] On Behalf Of Sean Bruno > Sent: Friday, January 11, 2013 8:20 PM > To: freebsd-scsi@FreeBSD.org > Subject: Re: kern/151564: [ciss] ciss(4) should increase > CISS_MAX_LOGICAL to 107 >=20 > The following reply was made to PR kern/151564; it has been noted by > GNATS. >=20 > From: Sean Bruno > To: bug-followup@FreeBSD.org, leon.kos@lecad.fs.uni-lj.si > Cc: peter > Subject: Re: kern/151564: [ciss] ciss(4) should increase > CISS_MAX_LOGICAL > to 107 > Date: Fri, 11 Jan 2013 17:17:51 -0800 >=20 > --=3D-VU6ICzSz8eqrj1bn7pu+ > Content-Type: text/plain; charset=3D"UTF-8" > Content-Transfer-Encoding: 7bit >=20 > ok, fixed on the 6i and older with the attached patch. Try this one > instead, basically I had a typo in a variable name and I was making core > logic decisions in boot_verbose code. :-) >=20 > this also means, I'm probably going to revert svn r242089 as it might > not be the right thing to do, but impossible to hit on older > controllers. >=20 > ciss0: port 0x4000-0x40ff mem > 0xfdff0000-0xfdff1fff,0xfdf80000-0xfdfbffff irq 51 at device 3.0 on pci4 > ciss0: PERFORMANT Transport > ciss0: got 0 MSI messages] > ioapic2: routing intpin 3 (PCI IRQ 51) to lapic 0 vector 52 > ciss0: using 1024 of 1024 available commands > ciss0: 1 logical drive configured > ciss0: firmware 2.26 > ciss0: 2 SCSI channels > ciss0: signature 'CISS' > ciss0: valence 1 > ciss0: supported I/O methods 0x80000006 > ciss0: active I/O method 0x5 > ciss0: 4G page base 0x00000000 > ciss0: interrupt coalesce delay 0us > ciss0: interrupt coalesce count 16 > ciss0: max outstanding commands 1024 > ciss0: bus types 0x2 > ciss0: server name '' > ciss0: heartbeat 0x1000008d > ciss0: max logical logical volumes: 63 > ciss0: max physical disks supported: 1024 > ciss0: max physical disks per logical volume: 0 > ciss0: 7 physical devices > ciss0: 1 logical drive > ciss0: logical drive (b0t0): RAID 1(1+0), 103936MB online >=20 >=20 > --=3D-VU6ICzSz8eqrj1bn7pu+ > Content-Disposition: attachment; > filename=3D"ciss_probe_logical_physical.diff" > Content-Type: text/x-patch; = name=3D"ciss_probe_logical_physical.diff"; > charset=3D"UTF-8" > Content-Transfer-Encoding: 7bit >=20 > --- //depot/yahoo/ybsd_9/src/sys/dev/ciss/ciss.c 2012-03-17 > 00:14:40.000000000 0000 > +++ /home/seanbru/ybsd_9/sys/dev/ciss/ciss.c 2012-03-17 > 00:14:40.000000000 0000 > @@ -1202,13 +1202,21 @@ > /* XXX only really required for old 5300 adapters? */ > sc->ciss_flags |=3D CISS_FLAG_BMIC_ABORT; >=20 > + /* > + * Earlier controller specs do not contain these config > + * entries, so assume that a 0 means its old and assign > + * these values to the defaults that were established > + * when this driver was developed for them > + */ > + if (sc->ciss_cfg->max_logical_supported =3D=3D 0) > + sc->ciss_cfg->max_logical_supported =3D CISS_MAX_LOGICAL; > + if (sc->ciss_cfg->max_physical_supported =3D=3D 0) > + sc->ciss_cfg->max_physical_supported =3D > CISS_MAX_PHYSICAL; > /* print information */ > if (bootverbose) { > -#if 0 /* XXX proxy volumes??? */ > ciss_printf(sc, " %d logical drive%s configured\n", > sc->ciss_id->configured_logical_drives, > (sc->ciss_id->configured_logical_drives =3D=3D 1) ? "" : > "s"); > -#endif > ciss_printf(sc, " firmware %4.4s\n", sc->ciss_id- > >running_firmware_revision); > ciss_printf(sc, " %d SCSI channels\n", sc->ciss_id- > >scsi_bus_count); >=20 > @@ -1231,6 +1239,9 @@ > "\20\1ultra2\2ultra3\10fibre1\11fibre2\n"); > ciss_printf(sc, " server name '%.16s'\n", sc->ciss_cfg- > >server_name); > ciss_printf(sc, " heartbeat 0x%x\n", sc->ciss_cfg->heartbeat); > + ciss_printf(sc, " max logical logical volumes: %d\n", sc- > >ciss_cfg->max_logical_supported); > + ciss_printf(sc, " max physical disks supported: %d\n", sc- > >ciss_cfg->max_physical_supported); > + ciss_printf(sc, " max physical disks per logical volume: %d\n", > sc->ciss_cfg->max_physical_per_logical); > } >=20 > out: > @@ -1318,7 +1329,7 @@ > break; > case CISS_CMD_STATUS_DATA_OVERRUN: > ciss_printf(sc, "WARNING: more units than driver limit > (%d)\n", > - CISS_MAX_LOGICAL); > + sc->ciss_cfg->max_logical_supported); > break; > default: > ciss_printf(sc, "error detecting logical drive configuration > (%s)\n", > @@ -1352,7 +1363,7 @@ > debug_called(1); >=20 > cll =3D ciss_report_luns(sc, CISS_OPCODE_REPORT_LOGICAL_LUNS, > - CISS_MAX_LOGICAL); > + sc->ciss_cfg->max_logical_supported); > if (cll =3D=3D NULL) { > error =3D ENXIO; > goto out; > @@ -1360,9 +1371,9 @@ >=20 > /* sanity-check reply */ > ndrives =3D (ntohl(cll->list_size) / sizeof(union ciss_device_address)); > - if ((ndrives < 0) || (ndrives > CISS_MAX_LOGICAL)) { > + if ((ndrives < 0) || (ndrives > sc->ciss_cfg- > >max_logical_supported)) { > ciss_printf(sc, "adapter claims to report absurd number of > logical drives (%d > %d)\n", > - ndrives, CISS_MAX_LOGICAL); > + ndrives, sc->ciss_cfg->max_logical_supported); > error =3D ENXIO; > goto out; > } > @@ -1385,19 +1396,20 @@ >=20 > for (i =3D 0; i <=3D sc->ciss_max_logical_bus; i++) { > sc->ciss_logical[i] =3D > - malloc(CISS_MAX_LOGICAL * sizeof(struct ciss_ldrive), > + malloc(sc->ciss_cfg->max_logical_supported * > + sizeof(struct ciss_ldrive), > CISS_MALLOC_CLASS, M_NOWAIT | M_ZERO); > if (sc->ciss_logical[i] =3D=3D NULL) { > error =3D ENXIO; > goto out; > } >=20 > - for (j =3D 0; j < CISS_MAX_LOGICAL; j++) > + for (j =3D 0; j < sc->ciss_cfg->max_logical_supported; j++) > sc->ciss_logical[i][j].cl_status =3D CISS_LD_NONEXISTENT; > } >=20 >=20 > - for (i =3D 0; i < CISS_MAX_LOGICAL; i++) { > + for (i =3D 0; i < sc->ciss_cfg->max_logical_supported; i++) { > if (i < ndrives) { > struct ciss_ldrive *ld; > int bus, target; > @@ -1439,7 +1451,7 @@ > target =3D 0; >=20 > cll =3D ciss_report_luns(sc, CISS_OPCODE_REPORT_PHYSICAL_LUNS, > - CISS_MAX_PHYSICAL); > + sc->ciss_cfg->max_physical_supported); > if (cll =3D=3D NULL) { > error =3D ENXIO; > goto out; > @@ -1982,7 +1994,7 @@ > bus_dma_tag_destroy(sc->ciss_parent_dmat); > if (sc->ciss_logical) { > for (i =3D 0; i <=3D sc->ciss_max_logical_bus; i++) { > - for (j =3D 0; j < CISS_MAX_LOGICAL; j++) { > + for (j =3D 0; j < sc->ciss_cfg->max_logical_supported; j++) { > if (sc->ciss_logical[i][j].cl_ldrive) > free(sc->ciss_logical[i][j].cl_ldrive, > CISS_MALLOC_CLASS); > if (sc->ciss_logical[i][j].cl_lstatus) > @@ -2965,9 +2977,9 @@ > cpi->hba_inquiry =3D PI_TAG_ABLE; /* XXX is this correct? > */ > cpi->target_sprt =3D 0; > cpi->hba_misc =3D 0; > - cpi->max_target =3D CISS_MAX_LOGICAL; > + cpi->max_target =3D sc->ciss_cfg->max_logical_supported; > cpi->max_lun =3D 0; /* 'logical drive' channel only */ > - cpi->initiator_id =3D CISS_MAX_LOGICAL; > + cpi->initiator_id =3D sc->ciss_cfg->max_logical_supported; > strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); > strncpy(cpi->hba_vid, "msmith@freebsd.org", HBA_IDLEN); > strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); > @@ -3878,7 +3890,7 @@ > * drive address. > */ > cll =3D ciss_report_luns(sc, CISS_OPCODE_REPORT_LOGICAL_LUNS, > - CISS_MAX_LOGICAL); > + sc->ciss_cfg->max_logical_supported); > if (cll =3D=3D NULL) > return; >=20 > @@ -3889,7 +3901,7 @@ > * firmware. > */ > for (i =3D 0; i < sc->ciss_max_logical_bus; i++) { > - for (j =3D 0; j < CISS_MAX_LOGICAL; j++) { > + for (j =3D 0; j < sc->ciss_cfg->max_logical_supported; j++) { > ld =3D &sc->ciss_logical[i][j]; >=20 > if (ld->cl_update =3D=3D 0) > @@ -4058,7 +4070,7 @@ > * Rescan the physical lun list for new items > */ > cll =3D ciss_report_luns(sc, > CISS_OPCODE_REPORT_PHYSICAL_LUNS, > - CISS_MAX_PHYSICAL); > + sc->ciss_cfg- > >max_physical_supported); > if (cll =3D=3D NULL) { > ciss_printf(sc, "Warning, cannot get physical lun > list\n"); > break; > @@ -4306,7 +4318,7 @@ >=20 > "\20\1notify_ok\2control_open\3aborting\4running\21fake_s > ynch\22bmic_abort\n"); >=20 > for (i =3D 0; i < sc->ciss_max_logical_bus; i++) { > - for (j =3D 0; j < CISS_MAX_LOGICAL; j++) { > + for (j =3D 0; j < sc->ciss_cfg->max_logical_supported; j++) { > ciss_printf(sc, "LOGICAL DRIVE %d: ", i); > ciss_print_ldrive(sc, &sc->ciss_logical[i][j]); > } > --- //depot/yahoo/ybsd_9/src/sys/dev/ciss/cissreg.h 2011-11-02 > 23:46:55.000000000 0000 > +++ /home/seanbru/ybsd_9/sys/dev/ciss/cissreg.h 2011-11-02 > 23:46:55.000000000 0000 > @@ -425,6 +425,15 @@ > #define CISS_DRIVER_DAUGHTER_ATTACHED (1<<8) > #define CISS_DRIVER_SCSI_PREFETCH (1<<9) > u_int32_t max_sg_length; /* 31 in older firmware > */ > +/* > + * these fields appear in OpenCISS Spec 1.06 > + * http://cciss.sourceforge.net/#docs > + */ > + u_int32_t max_logical_supported; > + u_int32_t max_physical_supported; > + u_int32_t max_physical_per_logical; > + u_int32_t max_perfomant_mode_cmds; > + u_int32_t max_block_fetch_count; > } __packed; >=20 > /* >=20 > --=3D-VU6ICzSz8eqrj1bn7pu+-- >=20 > _______________________________________________ > freebsd-scsi@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-scsi > To unsubscribe, send any mail to "freebsd-scsi- > unsubscribe@freebsd.org"