From owner-freebsd-current@FreeBSD.ORG Sun Aug 14 11:13:50 2011 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D46B91065670 for ; Sun, 14 Aug 2011 11:13:50 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 67B5A8FC14 for ; Sun, 14 Aug 2011 11:13:50 +0000 (UTC) Received: by fxe4 with SMTP id 4so4033448fxe.13 for ; Sun, 14 Aug 2011 04:13:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=yiQn982oY0I/XHcMXeM4zjNpVOuHEgI4vfn4D7VEGC4=; b=WwbMH4yDPIcIfRLm+IT4tbezM8u4GRoSjDBtaJjK0aYpXRXVi//Lf0YgoIVGuRY3uE Oo3TxuCpU3lXsdkvMvavHmoDc6TKa4HGarXFtcfmlE32SlfN5Khg5vG0dE91vmr+dM7U ncQMeKcUU405dQIQro1UVTwlflF6x2czVLtSc= Received: by 10.223.26.69 with SMTP id d5mr3965705fac.136.1313320429186; Sun, 14 Aug 2011 04:13:49 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id w16sm944679fah.44.2011.08.14.04.13.45 (version=SSLv3 cipher=OTHER); Sun, 14 Aug 2011 04:13:46 -0700 (PDT) Sender: Alexander Motin Message-ID: <4E47ADD9.5000609@FreeBSD.org> Date: Sun, 14 Aug 2011 14:13:29 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:5.0) Gecko/20110709 Thunderbird/5.0 MIME-Version: 1.0 To: Michael Butler References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: current Subject: Re: oddity mounting MMC/SD cards X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Aug 2011 11:13:51 -0000 Hi. On 13.08.2011 23:56, Michael Butler wrote: > I tried to mount a card from my phone (it's quicker to copy directly > than through USB) but I get this .. what am I missing here? > > Aug 13 16:53:37 toshi kernel: sdhci0-slot0: Card inserted > Aug 13 16:53:37 toshi kernel: mmc0: on sdhci0 > Aug 13 16:53:37 toshi kernel: mmc0: Probing bus > Aug 13 16:53:37 toshi kernel: mmc0: SD probe: OK (OCR: 0x00ff8000) > Aug 13 16:53:37 toshi kernel: mmc0: Current OCR: 0x00ff8000 > Aug 13 16:53:38 toshi kernel: mmc0: Probing cards > Aug 13 16:53:38 toshi kernel: mmc0: New card detected (CID > 03534453553136478080d4290400a300) > Aug 13 16:53:38 toshi kernel: mmc0: Card at relative address 36832 added: > Aug 13 16:53:38 toshi kernel: mmc0: card: SD High Capacity > (0x3/0x5344/"SU16G" rev 8.0 m/d 03.2010 s/n 80d42904) > Aug 13 16:53:38 toshi kernel: mmc0: bus: 4bit, 50MHz, high speed timing > Aug 13 16:53:38 toshi kernel: mmc0: memory: 31116288 blocks, erase > sector 8192 blocks, read-only > Aug 13 16:53:38 toshi kernel: mmc0: setting transfer rate to 30.000MHz > Aug 13 16:53:38 toshi kernel: mmcsd0: 2905MB > (read-only) at mmc0 24MHz/4bit > Aug 13 16:53:38 toshi kernel: GEOM: new disk mmcsd0 > Aug 13 16:53:38 toshi kernel: mmc0: setting bus width to 4 bits > > vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv > Aug 13 16:53:38 toshi kernel: GEOM_PART: partition 1 has end offset > beyond last LBA: 31116287> 5950463 > Aug 13 16:53:38 toshi kernel: GEOM_PART: integrity check failed (mmcsd0, > MBR) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ It looks like consequence of r222475. Could you try this patch: --- dev/mmc/mmcsd.c.prev 2011-08-14 14:09:35.000000000 +0300 +++ dev/mmc/mmcsd.c 2011-08-14 14:09:14.000000000 +0300 @@ -137,7 +137,7 @@ mmcsd_attach(device_t dev) d->d_drv1 = sc; d->d_maxsize = 4*1024*1024; /* Maximum defined SD card AU size. */ d->d_sectorsize = mmc_get_sector_size(dev); - d->d_mediasize = mmc_get_media_size(dev) * d->d_sectorsize; + d->d_mediasize = (off_t)mmc_get_media_size(dev) * d->d_sectorsize; d->d_stripeoffset = 0; d->d_stripesize = mmc_get_erase_sector(dev) * d->d_sectorsize; d->d_unit = device_get_unit(dev); -- Alexander Motin