History log of /freebsd/sys/cam/mmc/mmc_da.c (Results 1 – 25 of 58)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/14.1.0, release/13.3.0
# a84d91d8 21-Jan-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

mmccam: fix mmcsd disk aliases

For EXT_CSD_PART_CONFIG_ACC_BOOT<n> and possibly others with suffixes
we fail to create proper disk aliases (symlinks), which shows up as
g_dev_taste: make_dev_alias_p

mmccam: fix mmcsd disk aliases

For EXT_CSD_PART_CONFIG_ACC_BOOT<n> and possibly others with suffixes
we fail to create proper disk aliases (symlinks), which shows up as
g_dev_taste: make_dev_alias_p() failed (name=mmcsd0, error=17)

In this case we ended up with the followng two:
/dev/mmcsd0 -> sdda0
/dev/mmcsd1 -> sdda0boot1
Note that (i) it should be mmcsd0boot1 and not mmcsd1 and that
(ii) there is no mmcsd0boot0 (failed above as it tried to create a
second mmcsd0).

Adjust the code (using a highly simplified version--compared to my
original approach--suggested by imp) using an extended format string
with (sdda/mmcsd) prefix as first argument to create proper names.

MFC after: 3 days
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D43538

show more ...


Revision tags: release/14.0.0
# 2ffd30f7 06-Nov-2023 Warner Losh <imp@FreeBSD.org>

cam: Remove left-over sys/cdefs.h in sys/cam

These weren't removed when $FreeBSD$ was removed. They aren't needed and
now are a style(9) nonconformity.

Sponsored by: Netflix


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 73551d4f 25-Jul-2023 Warner Losh <imp@FreeBSD.org>

cam/mmc: Migrate to modern uintXX_t from u_intXX_t

As per https://lists.freebsd.org/archives/freebsd-scsi/2023-July/000257.html
move to the modern uintXX_t.

MFC After: 3 days
Sponsored by: Netflix


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


Revision tags: release/13.2.0, release/12.4.0
# 489ba222 13-May-2022 Mitchell Horne <mhorne@FreeBSD.org>

kerneldump: remove physical argument from d_dumper

The physical address argument is essentially ignored by every dumper
method. In addition, the dump routines don't actually pass a real
address; eve

kerneldump: remove physical argument from d_dumper

The physical address argument is essentially ignored by every dumper
method. In addition, the dump routines don't actually pass a real
address; every call to dump_append() passes a value of zero for
physical.

Reviewed by: markj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D35173

show more ...


Revision tags: release/13.1.0
# 6fd84a62 27-Jan-2022 Andriy Gapon <avg@FreeBSD.org>

mmc_da: create disk(9) for pre-2.0 SD cards

It does not look like there is anything in mmc_da code that actually
requires protocol 2.0 or later. dev/mmc code also does not have such a
restriction.

mmc_da: create disk(9) for pre-2.0 SD cards

It does not look like there is anything in mmc_da code that actually
requires protocol 2.0 or later. dev/mmc code also does not have such a
restriction.

Tested with a very old 2GB mini-SD card. Prior to this change mmc_da
would claim the card but would not expose it to GEOM.

Without MMCCAM:
mmc0: <MMC/SD bus> on sdhci_pci0
mmc0: Probing bus
mmc0: SD probe: OK (OCR: 0x00ff8000)
mmc0: Current OCR: 0x00ff8000
mmc0: CMD8 failed, RESULT: 1
mmc0: Probing cards
mmc0: New card detected (CID 1c53565344432020100002982e007600)
mmc0: New card detected (CSD 005e00325f5a83d02db7ffbf96800000)
mmc0: Card at relative address 0xb368 added:
mmc0: card: SD SDC 1.0 SN 0002982E MFG 06/2007 by 28 SV
mmc0: quirks: 0
mmc0: bus: 4bit, 50MHz (high speed timing)
mmc0: memory: 3998720 blocks, erase sector 256 blocks
mmc0: setting transfer rate to 50.000MHz (high speed timing)
GEOM: new disk mmcsd0
mmcsd0: 2GB <SD SDC 1.0 SN 0002982E MFG 06/2007 by 28 SV> at mmc0 50.0MHz/4bit/65535-block
mmc0: setting bus width to 4 bits high speed timing

With MMCCAM and this change:
sdda0 at sdhci_slot0 bus 0 scbus2 target 0 lun 0
sdda0: Relative addr: 0000b368
Card features: <Memory>
sdda0: Serial Number 0002982E
sdda0: SD SDC 1.0 SN 0002982E MFG 06/2007 by 28 SV
GEOM: new disk sdda0

Reviewed by: manu
MFC after: 3 weeks

show more ...


# dfb1c97a 12-Jan-2022 Andriy Gapon <avg@FreeBSD.org>

mmc_da: remove write-only local variables

MFC after: 1 week


# 60b7d5a2 12-Jan-2022 Andriy Gapon <avg@FreeBSD.org>

mmc_da: use MMC_SECTOR_SIZE constant in place of literals

Suggested by: manu
MFC after: 2 weeks


# 44682688 12-Jan-2022 Andriy Gapon <avg@FreeBSD.org>

mmc_da: implement d_dump method, sddadump

sddadump has been derived from sddastart.

mmc_sim interface has grown a new method, cam_poll, to support polled
operation.

mmc_sim code has been changed t

mmc_da: implement d_dump method, sddadump

sddadump has been derived from sddastart.

mmc_sim interface has grown a new method, cam_poll, to support polled
operation.

mmc_sim code has been changed to provide a sim_poll hook only if the
controller implements the new method. The hooks is implemented in terms
of the new mmc_sim_cam_poll method.
Additionally, in-progress CCB-s now have CAM_REQ_INPROG status to
satisfy xpt_pollwait().

mmc_sim_cam_poll method has been implemented in dwmmc host controller.

Reviewed by: manu, mav, imp
MFC after: 2 weeks
Relnotes: perhaps
Differential Revision: https://reviews.freebsd.org/D33843

show more ...


Revision tags: release/12.3.0
# e17b58ec 09-Jul-2021 Andriy Gapon <avg@FreeBSD.org>

sddadone: 'error' gets assigned only errno codes, never MMC_ERR codes

MFC after: 2 weeks


# d2bc7754 15-Sep-2021 John Baldwin <jhb@FreeBSD.org>

Assert that invalid bus widths can't be passed to bus_width_str().

This appeases a -Wreturn-type warning from GCC.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D31935


# 6506efea 17-Jun-2021 Emmanuel Vadot <manu@FreeBSD.org>

mmccam: Read the common members of CSD v1.0 and v2.0

And only get the differents ones based on the version.

No functional changes intented.

Sponsored by: Diablotin Systems


# 20d60168 17-Jun-2021 Emmanuel Vadot <manu@FreeBSD.org>

mmccam: Style(9) more mmc_da.c

No functional changes.
Sponsored by: Diablotin Systems


# ec5325db 10-Apr-2021 Edward Tomasz Napierala <trasz@FreeBSD.org>

cam: make sure to clear even more CCBs allocated on the stack

This is my second pass, this time over all of CAM except
for the SCSI target bits. There should be no functional
changes.

Reviewed By:

cam: make sure to clear even more CCBs allocated on the stack

This is my second pass, this time over all of CAM except
for the SCSI target bits. There should be no functional
changes.

Reviewed By: imp
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D29549

show more ...


Revision tags: release/13.0.0
# cd853791 28-Nov-2020 Konstantin Belousov <kib@FreeBSD.org>

Make MAXPHYS tunable. Bump MAXPHYS to 1M.

Replace MAXPHYS by runtime variable maxphys. It is initialized from
MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys.

Make b_pag

Make MAXPHYS tunable. Bump MAXPHYS to 1M.

Replace MAXPHYS by runtime variable maxphys. It is initialized from
MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys.

Make b_pages[] array in struct buf flexible. Size b_pages[] for buffer
cache buffers exactly to atop(maxbcachebuf) (currently it is sized to
atop(MAXPHYS)), and b_pages[] for pbufs is sized to atop(maxphys) + 1.
The +1 for pbufs allow several pbuf consumers, among them vmapbuf(),
to use unaligned buffers still sized to maxphys, esp. when such
buffers come from userspace (*). Overall, we save significant amount
of otherwise wasted memory in b_pages[] for buffer cache buffers,
while bumping MAXPHYS to desired high value.

Eliminate all direct uses of the MAXPHYS constant in kernel and driver
sources, except a place which initialize maxphys. Some random (and
arguably weird) uses of MAXPHYS, e.g. in linuxolator, are converted
straight. Some drivers, which use MAXPHYS to size embeded structures,
get private MAXPHYS-like constant; their convertion is out of scope
for this work.

Changes to cam/, dev/ahci, dev/ata, dev/mpr, dev/mpt, dev/mvs,
dev/siis, where either submitted by, or based on changes by mav.

Suggested by: mav (*)
Reviewed by: imp, mav, imp, mckusick, scottl (intermediate versions)
Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D27225

show more ...


# 2fe1b4ca 26-Nov-2020 Emmanuel Vadot <manu@FreeBSD.org>

mmccam: We can't sleep during sdda_add_part so use M_NOWAIT

Reviewed by: kibab
Differential Revision: https://reviews.freebsd.org/D25947


# 7e06495b 24-Nov-2020 Jung-uk Kim <jkim@FreeBSD.org>

Do not truncate the last character from serial number.

strlcpy() requires one more byte for the NULL character.

Submitted by: Henri Hennebert (hlh at restart dot be)
MFC after: 3 days


# b6b885c4 03-Nov-2020 Ilya Bakulin <kibab@FreeBSD.org>

Always return MMC errors from mmc_handle_reply()

There are two ways to propagate the error in MMCCAM:
* Using cmd.error which is set by the peripheral driver;
* Using CCB status which is... also s

Always return MMC errors from mmc_handle_reply()

There are two ways to propagate the error in MMCCAM:
* Using cmd.error which is set by the peripheral driver;
* Using CCB status which is... also set by the driver.

The problem is that those two error conditions don't necessarily match.
This leads to the confusion when handling the MMC reply. So enforce the consistency
by panicking if request is marked as completed successfully but MMC-level error
is present (this hints to the programming error).

Reviewed by: manu
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D26925

show more ...


Revision tags: release/12.2.0
# 15f4848a 08-Sep-2020 Andriy Gapon <avg@FreeBSD.org>

mmc_da: universally use uint8_t for the partition index

Also, assert in sdda_init_switch_part() that the index is within the
defined range.

MFC after: 1 week


# fd38fa39 08-Sep-2020 Andriy Gapon <avg@FreeBSD.org>

mmc_da: fix a typo and a too long line

MFC after: 1 week


# 4dfdaf4d 08-Sep-2020 Andriy Gapon <avg@FreeBSD.org>

mmc_da: make sure that part_index is not used uninitialized in sddastart

This is a fix to r334065.

Without this change I once got stuck I/O with endless partition switching:

(sdda0:aw_mmc_sim2:0:0

mmc_da: make sure that part_index is not used uninitialized in sddastart

This is a fix to r334065.

Without this change I once got stuck I/O with endless partition switching:

(sdda0:aw_mmc_sim2:0:0:0): sddastart
(sdda0:aw_mmc_sim2:0:0:0): Partition 0 -> -525703168
(sdda0:aw_mmc_sim2:0:0:0): xpt_action: func 0x91d XPT_MMC_IO
(sdda0:aw_mmc_sim2:0:0:0): xpt_done: func= 0x91d XPT_MMC_IO status 0x1
(sdda0:aw_mmc_sim2:0:0:0): sddadone
(sdda0:aw_mmc_sim2:0:0:0): Card status: 00000000
(sdda0:aw_mmc_sim2:0:0:0): Current state: 4
(sdda0:aw_mmc_sim2:0:0:0): Compteting partition switch to 0

Note that -525703168 (an int) is 0xe0aa6800 in binary representation.
The partition indexes are actually stored as uint8_t, so that value
was converted / truncated to zero.

MFC after: 1 week

show more ...


# 27dcd3d9 02-Sep-2020 Mateusz Guzik <mjg@FreeBSD.org>

cam: clean up empty lines in .c and .h files


# 440cec3f 12-Aug-2020 Glen Barber <gjb@FreeBSD.org>

MFH

Sponsored by: Rubicon Communications, LLC (netgate.com)


# a3030502 08-Aug-2020 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r364041 through r364050.


123