Merge branch 'for-linus' into for-next
Back-merge 4.19-devel branch into 4.20 for applying FireWire patches cleanly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -263,6 +263,8 @@ do_registration(struct work_struct *work)
|
||||
error:
|
||||
mutex_unlock(&devices_mutex);
|
||||
snd_bebob_stream_destroy_duplex(bebob);
|
||||
kfree(bebob->maudio_special_quirk);
|
||||
bebob->maudio_special_quirk = NULL;
|
||||
snd_card_free(bebob->card);
|
||||
dev_info(&bebob->unit->device,
|
||||
"Sound card registration failed: %d\n", err);
|
||||
|
||||
@@ -96,17 +96,13 @@ int snd_bebob_maudio_load_firmware(struct fw_unit *unit)
|
||||
struct fw_device *device = fw_parent_device(unit);
|
||||
int err, rcode;
|
||||
u64 date;
|
||||
__le32 cues[3] = {
|
||||
cpu_to_le32(MAUDIO_BOOTLOADER_CUE1),
|
||||
cpu_to_le32(MAUDIO_BOOTLOADER_CUE2),
|
||||
cpu_to_le32(MAUDIO_BOOTLOADER_CUE3)
|
||||
};
|
||||
__le32 *cues;
|
||||
|
||||
/* check date of software used to build */
|
||||
err = snd_bebob_read_block(unit, INFO_OFFSET_SW_DATE,
|
||||
&date, sizeof(u64));
|
||||
if (err < 0)
|
||||
goto end;
|
||||
return err;
|
||||
/*
|
||||
* firmware version 5058 or later has date later than "20070401", but
|
||||
* 'date' is not null-terminated.
|
||||
@@ -114,20 +110,28 @@ int snd_bebob_maudio_load_firmware(struct fw_unit *unit)
|
||||
if (date < 0x3230303730343031LL) {
|
||||
dev_err(&unit->device,
|
||||
"Use firmware version 5058 or later\n");
|
||||
err = -ENOSYS;
|
||||
goto end;
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
cues = kmalloc_array(3, sizeof(*cues), GFP_KERNEL);
|
||||
if (!cues)
|
||||
return -ENOMEM;
|
||||
|
||||
cues[0] = cpu_to_le32(MAUDIO_BOOTLOADER_CUE1);
|
||||
cues[1] = cpu_to_le32(MAUDIO_BOOTLOADER_CUE2);
|
||||
cues[2] = cpu_to_le32(MAUDIO_BOOTLOADER_CUE3);
|
||||
|
||||
rcode = fw_run_transaction(device->card, TCODE_WRITE_BLOCK_REQUEST,
|
||||
device->node_id, device->generation,
|
||||
device->max_speed, BEBOB_ADDR_REG_REQ,
|
||||
cues, sizeof(cues));
|
||||
cues, 3 * sizeof(*cues));
|
||||
kfree(cues);
|
||||
if (rcode != RCODE_COMPLETE) {
|
||||
dev_err(&unit->device,
|
||||
"Failed to send a cue to load firmware\n");
|
||||
err = -EIO;
|
||||
}
|
||||
end:
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -290,10 +294,6 @@ snd_bebob_maudio_special_discover(struct snd_bebob *bebob, bool is1814)
|
||||
bebob->midi_output_ports = 2;
|
||||
}
|
||||
end:
|
||||
if (err < 0) {
|
||||
kfree(params);
|
||||
bebob->maudio_special_quirk = NULL;
|
||||
}
|
||||
mutex_unlock(&bebob->mutex);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ static void dg00x_free(struct snd_dg00x *dg00x)
|
||||
fw_unit_put(dg00x->unit);
|
||||
|
||||
mutex_destroy(&dg00x->mutex);
|
||||
kfree(dg00x);
|
||||
}
|
||||
|
||||
static void dg00x_card_free(struct snd_card *card)
|
||||
|
||||
@@ -146,6 +146,7 @@ static int ff400_switch_fetching_mode(struct snd_ff *ff, bool enable)
|
||||
{
|
||||
__le32 *reg;
|
||||
int i;
|
||||
int err;
|
||||
|
||||
reg = kcalloc(18, sizeof(__le32), GFP_KERNEL);
|
||||
if (reg == NULL)
|
||||
@@ -163,9 +164,11 @@ static int ff400_switch_fetching_mode(struct snd_ff *ff, bool enable)
|
||||
reg[i] = cpu_to_le32(0x00000001);
|
||||
}
|
||||
|
||||
return snd_fw_transaction(ff->unit, TCODE_WRITE_BLOCK_REQUEST,
|
||||
FF400_FETCH_PCM_FRAMES, reg,
|
||||
sizeof(__le32) * 18, 0);
|
||||
err = snd_fw_transaction(ff->unit, TCODE_WRITE_BLOCK_REQUEST,
|
||||
FF400_FETCH_PCM_FRAMES, reg,
|
||||
sizeof(__le32) * 18, 0);
|
||||
kfree(reg);
|
||||
return err;
|
||||
}
|
||||
|
||||
static void ff400_dump_sync_status(struct snd_ff *ff,
|
||||
|
||||
@@ -301,6 +301,8 @@ error:
|
||||
snd_efw_transaction_remove_instance(efw);
|
||||
snd_efw_stream_destroy_duplex(efw);
|
||||
snd_card_free(efw->card);
|
||||
kfree(efw->resp_buf);
|
||||
efw->resp_buf = NULL;
|
||||
dev_info(&efw->unit->device,
|
||||
"Sound card registration failed: %d\n", err);
|
||||
}
|
||||
|
||||
@@ -130,6 +130,7 @@ static void oxfw_free(struct snd_oxfw *oxfw)
|
||||
|
||||
kfree(oxfw->spec);
|
||||
mutex_destroy(&oxfw->mutex);
|
||||
kfree(oxfw);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -207,6 +208,7 @@ static int detect_quirks(struct snd_oxfw *oxfw)
|
||||
static void do_registration(struct work_struct *work)
|
||||
{
|
||||
struct snd_oxfw *oxfw = container_of(work, struct snd_oxfw, dwork.work);
|
||||
int i;
|
||||
int err;
|
||||
|
||||
if (oxfw->registered)
|
||||
@@ -269,7 +271,15 @@ error:
|
||||
snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->rx_stream);
|
||||
if (oxfw->has_output)
|
||||
snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->tx_stream);
|
||||
for (i = 0; i < SND_OXFW_STREAM_FORMAT_ENTRIES; ++i) {
|
||||
kfree(oxfw->tx_stream_formats[i]);
|
||||
oxfw->tx_stream_formats[i] = NULL;
|
||||
kfree(oxfw->rx_stream_formats[i]);
|
||||
oxfw->rx_stream_formats[i] = NULL;
|
||||
}
|
||||
snd_card_free(oxfw->card);
|
||||
kfree(oxfw->spec);
|
||||
oxfw->spec = NULL;
|
||||
dev_info(&oxfw->unit->device,
|
||||
"Sound card registration failed: %d\n", err);
|
||||
}
|
||||
|
||||
@@ -93,6 +93,7 @@ static void tscm_free(struct snd_tscm *tscm)
|
||||
fw_unit_put(tscm->unit);
|
||||
|
||||
mutex_destroy(&tscm->mutex);
|
||||
kfree(tscm);
|
||||
}
|
||||
|
||||
static void tscm_card_free(struct snd_card *card)
|
||||
|
||||
Reference in New Issue
Block a user