mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Cássio Gabriel" <cassiogabrielcontato@gmail.com>
Cc: Takashi Iwai <tiwai@suse.com>, "Geoffrey D. Bennett" <g@b4.vu>,
	Jaroslav Kysela <perex@perex.cz>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] ALSA: scarlett2: Allow flash writes ending at segment boundary
Date: Wed, 20 May 2026 07:53:26 +0200	[thread overview]
Message-ID: <87fr3mlj8p.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260519-alsa-scarlett2-flash-write-boundary-v1-1-b550480e92da@gmail.com>

On Tue, 19 May 2026 16:46:19 +0200,
Cássio Gabriel wrote:
> 
> scarlett2_hwdep_write() rejects writes when offset + count is greater than
> or equal to the selected flash segment size. That incorrectly treats a
> write ending exactly at the end of the segment as out of space, although
> the last byte written is still within the segment.
> 
> Split invalid argument checks from the segment-space check, keep
> zero-length writes as no-ops, and compare count against the remaining
> segment size. This permits exact-end writes and avoids relying on
> offset + count before deciding whether the request is in bounds.
> 
> Fixes: 1abfbd3c9527 ("ALSA: scarlett2: Add support for uploading new firmware")
> Cc: stable@vger.kernel.org
> Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>

Applied now.  Thanks.


Takashi

      reply	other threads:[~2026-05-20  5:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-19 14:46 Cássio Gabriel
2026-05-20  5:53 ` Takashi Iwai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fr3mlj8p.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=cassiogabrielcontato@gmail.com \
    --cc=g@b4.vu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=stable@vger.kernel.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome