From owner-svn-src-all@freebsd.org Sun Mar 18 18:58:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AD1DF4A3C6; Sun, 18 Mar 2018 18:58:48 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CE72D811EC; Sun, 18 Mar 2018 18:58:47 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C969124538; Sun, 18 Mar 2018 18:58:47 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2IIwl5Y037830; Sun, 18 Mar 2018 18:58:47 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2IIwlg8037829; Sun, 18 Mar 2018 18:58:47 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803181858.w2IIwlg8037829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 18 Mar 2018 18:58:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331141 - head/sys/dev/flash X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/flash X-SVN-Commit-Revision: 331141 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Mar 2018 18:58:48 -0000 Author: ian Date: Sun Mar 18 18:58:47 2018 New Revision: 331141 URL: https://svnweb.freebsd.org/changeset/base/331141 Log: Add the device/chip type to the disk d_descr field, and print more info about the chip including the erase block size at attach time. Also add myself to the copyrights since at this point svn blame would point to me as the culprit for much of this. Modified: head/sys/dev/flash/mx25l.c Modified: head/sys/dev/flash/mx25l.c ============================================================================== --- head/sys/dev/flash/mx25l.c Sun Mar 18 18:50:48 2018 (r331140) +++ head/sys/dev/flash/mx25l.c Sun Mar 18 18:58:47 2018 (r331141) @@ -3,6 +3,7 @@ * * Copyright (c) 2006 M. Warner Losh. All rights reserved. * Copyright (c) 2009 Oleksandr Tymoshenko. All rights reserved. + * Copyright (c) 2018 Ian Lepore. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -516,6 +517,8 @@ mx25l_attach(device_t dev) sc->sc_disk->d_stripesize = sc->sc_erasesize; sc->sc_disk->d_unit = device_get_unit(sc->sc_dev); sc->sc_disk->d_dump = NULL; /* NB: no dumps */ + strlcpy(sc->sc_disk->d_descr, ident->name, + sizeof(sc->sc_disk->d_descr)); disk_create(sc->sc_disk, DISK_VERSION); bioq_init(&sc->sc_bio_queue); @@ -523,8 +526,12 @@ mx25l_attach(device_t dev) kproc_create(&mx25l_task, sc, &sc->sc_p, 0, 0, "task: mx25l flash"); sc->sc_taskstate = TSTATE_RUNNING; - device_printf(sc->sc_dev, "%s, sector %d bytes, %d sectors\n", - ident->name, ident->sectorsize, ident->sectorcount); + device_printf(sc->sc_dev, + "device type %s, size %dK in %d sectors of %dK, erase size %dK\n", + ident->name, + ident->sectorcount * ident->sectorsize / 1024, + ident->sectorcount, ident->sectorsize / 1024, + sc->sc_erasesize / 1024); return (0); }